Upload
shubhankar
View
219
Download
0
Embed Size (px)
Citation preview
7/25/2019 computer project on databae connectivity
1/44
IP PROJECT Database Connectivity
7/25/2019 computer project on databae connectivity
2/44
CERTIFICATEThis project on Student
Information System usingdatabase connectivity in JAVAhas been satisfactoriycompeted and submitted byShubhan!ar" studying in St#
$ichae%s &igh Schoo incass'( )E%#
*oard Ro +o#,
-----------------
Teacher%s Signature
.ate,
7/25/2019 computer project on databae connectivity
3/44
AC/+012E.3E$E+TI e4press my gratitude to5ards every individuaunder 5hose abe guidance and support" I coud
ta!e up the project on 6Student InformationRecord7 and compete it successfuy#
I 5oud i!e to than! my I8 teacher" $r# Ashutosh/umar 5ho gave a the information re9uired forthe project and guided us throughout# I asoe4tend my heartfet gratitude to5ards myparents and friends 5ho supported methroughout the project# T&A+/ :0;
7/25/2019 computer project on databae connectivity
4/44
C0+TE+TSS#+o# T08IC 8g#+o#
' Introduction =( $yS>2 ?
@ Student Record.atabase
B +etbeans I.E = Adding J.*C Connector 'D
2ogIn 8age ''
? &ome 8age 'B
Add 8age '
.eete 8age (@
'D ;pdate 8age @'
'' Sho5 8age @'( Concusion B@
'@ *ibiography BB
7/25/2019 computer project on databae connectivity
5/44
I+TR0.;CTI0+Fe5 years bac!" a information managementrecords used to be manua# As a resut" 5rongcounting or miscacuations created a ot ofprobem# The deveopment of a computeriGedinformation record system changed this# There5as a decrease in paper5or! and time 5assaved" aso increasing accuracy and eHciency# In
the foo5ing project on 6Student InformationRecord7" +etbeans I.E 5as seected as the frontend and $yS>2 as the bac! end# The appicationis protected by a pass5ord" thus ensuringsecurity#
7/25/2019 computer project on databae connectivity
6/44
I+TR0.;CTI0+0n entering the correct ogin I. and the
pass5ord in the 2ogIn 8age" the &ome 8ageappears 5here there are buttons eading toother 5indo5s for adding" deeting" updatingand sho5ing the entered records# The javaproject is in!ed to the Student Recorddatabase in $yS>2 server# The various
buttons direct the server to add" deete orupdate the records using the Admission+umber as a reference" 5hie the Sho5 buttonsho5s a the pree4isting records in thedatabase#
7/25/2019 computer project on databae connectivity
7/44
$yS>2
$yS>2 STARTI+3 1I+.01
7/25/2019 computer project on databae connectivity
8/44
ST;.E+T REC0R..ATA*ASE
T&E TA*2E IS CREATE. ;SI+3 $yS>2
7/25/2019 computer project on databae connectivity
9/44
+ET*EA+S I.E
+ET*EA+S I.E STARTI+3 1I+.01
7/25/2019 computer project on databae connectivity
10/44
A..I+3 J.*CC0++ECT0R
T&E mys9connectorjava IS A..E. ;+.ER T&E 2I*RARIES
7/25/2019 computer project on databae connectivity
11/44
.ESI3+ F0R T&E203I+ 8A3E
203I+ 8A3E 0F T&E A88
7/25/2019 computer project on databae connectivity
12/44
C0$80+E+TS 0F203I+ 8A3Ehead j2abe
Font , Tempus Sans ITC @ *od &oriGonta aignment , CenterTe4t , 203I+
' j2abe Font , 3oudy 0d Stye (B *odTe4t , 2ogIn I.,
( j2abe Font , 3oudy 0d Stye (B *odTe4t , 8ass5ord,
tf' jTe4tFied
pf' j8ass5ordFied
b' j*utton Font , 3adugi (B *odTe4t , E+TER
7/25/2019 computer project on databae connectivity
13/44
C0.E F0R T&E203I+ 8A3Eimport java4#s5ing#KL
private voidb'Action8erformedMjava#a5t#event#ActionEvent evtNO
String uid P tf'#getTe4tMNL
String p5d P ne5 String Mpf'#get8ass5ordMNNL
ifMp5d#e9uasMQpass5ordQNN O
J0ption8ane#sho5$essage.iaogMnu"Q1ecomeQuidNL
this#setVisibeMfaseNL
&ome-8age P ne5 &ome-8ageMNL
#setVisibeMtrueNL
ese O
J0ption8ane#sho5$essage.iaogMnu"QInvaid8ass5ord Try AgainQNL
tf'#setTe4tMQQNL
pf'#setTe4tMQQNL
7/25/2019 computer project on databae connectivity
14/44
.ESI3+ F0R T&E&0$E 8A3E
&0$E 8A3E 0F T&E A88
7/25/2019 computer project on databae connectivity
15/44
C0$80+E+TS 0F&0$E 8A3E
head' j2abe Font , Ravie @ *od Te4t , Student
head( j2abe Font , Ravie @ *od Te4t , Information Record
info j2abe Font , Tempus Sans ITC (B *od Te4t , Choose an action,
b' j*utton Font , 3adugi (B *od Te4t , A..
b( j*utton Font , 3adugi (B *od Te4t , ;8.ATE
7/25/2019 computer project on databae connectivity
16/44
C0$80+E+TS 0F&0$E 8A3E
b@ j*utton Font , 3adugi (B *od Te4t , .E2ETE
bB j*utton Font , 3adugi (B *od Te4t , S&01
b= j*utton Font , 3adugi (B *od Te4t , EIT
5ecome jTe4tArea Font , $onospaced '@ 8ain Te4t , 1ecome to the app for
theU
7/25/2019 computer project on databae connectivity
17/44
C0.E F0R T&E&0$E 8A3Eimport java4#s5ing#KL
private voidb'Action8erformedMjava#a5t#event#ActionEvent evtN O
this#setVisibeMfaseNL
Add P ne5 AddMNL#setVisibeMtrueNL
private voidb@Action8erformedMjava#a5t#event#ActionEven
t evtN Othis#setVisibeMfaseNL
;pdate P ne5 ;pdateMNL
#setVisibeMtrueNL
7/25/2019 computer project on databae connectivity
18/44
C0.E F0R T&E&0$E 8A3Eprivate void
b(Action8erformedMjava#a5t#event#ActionEvent evtN O
this#setVisibeMfaseNL
.eete P ne5 .eeteMNL
#setVisibeMtrueNL
private voidbBAction8erformedMjava#a5t#event#ActionEvent evtN O
this#setVisibeMfaseNL
Sho5 P ne5 Sho5MNL#setVisibeMtrueNL
private voidb=Action8erformedMjava#a5t#event#ActionEvent evtN O
System#e4itMDNL
7/25/2019 computer project on databae connectivity
19/44
.ESI3+ F0R T&EA.. 8A3E
A.. 8A3E 0F T&E A88
7/25/2019 computer project on databae connectivity
20/44
C0$80+E+TS 0FA.. 8A3E
head j2abe Font , Tempus Sans ITC @ *od Te4t , A.. REC0R.
' j2abe Font , 3oudy 0d Stye (B *od
Te4t , +A$E, ( j2abe
Font , 3oudy 0d Stye (B *od Te4t , A.$+0,
@ j2abe Font , 3oudy 0d Stye (B *od Te4t , C2ASS,
B j2abe Font , 3oudy 0d Stye (B *od Te4t , SECTI0+,
= j2abe Font , 3oudy 0d Stye (B *od Te4t , R022,
7/25/2019 computer project on databae connectivity
21/44
C0$80+E+TS 0FA.. 8A3E
tf' jTe4tFied
tf( jTe4tFied
tf@ jTe4tFied
tfB jTe4tFied tf= jTe4tFied
b' j*utton Font , 3adugi (B *od Te4t , A..
b( j*utton Font , 3adugi (B *od Te4t , REFRES&
b@ j*utton Font , 3adugi (B *od Te4t , *AC/
7/25/2019 computer project on databae connectivity
22/44
C0.E F0R T&EA.. 8A3Eimport java4#s5ing#KL
private voidb'Action8erformedMjava#a5t#event#ActionEvent evtNO
String uid P tf'#getTe4tMNL
String p5d P ne5 String Mpf'#get8ass5ordMNNL
ifMp5d#e9uasMQpass5ordQNN O
J0ption8ane#sho5$essage.iaogMnu"Q1ecomeQuidNL
this#setVisibeMfaseNL
&ome-8age P ne5 &ome-8ageMNL
#setVisibeMtrueNL
ese O
J0ption8ane#sho5$essage.iaogMnu"QInvaid8ass5ord Try AgainQNL
tf'#setTe4tMQQNL
pf'#setTe4tMQQNL
7/25/2019 computer project on databae connectivity
23/44
.ESI3+ F0R T&E
.E2ETE 8A3E
.E2ETE 8A3E 0F T&E A88
7/25/2019 computer project on databae connectivity
24/44
C0$80+E+TS 0F.E2ETE 8A3E
head j2abe Font , Tempus Sans ITC @ *od Te4t , .E2ETE REC0R.
info j2abe Font , Tempus Sans ITC ' *od Te4t , Enter Admission +o# ofU
D j2abe Font , 3oudy 0d Stye (B *od Te4t , A.$+0,
tfD jTe4tFied
b' j*utton Font , 3adugi (B *od Te4t , VERIF:
b( j*utton Font , 3adugi (B *od
Te4t , .E2ETE Enabed , Fase
7/25/2019 computer project on databae connectivity
25/44
C0$80+E+TS 0F.E2ETE 8A3E
b@ j*utton Font , 3adugi (B *odTe4t , REFRES&
b@ j*utton Font , 3adugi (B *odTe4t , *AC/
tfD jTe4tFied
j8ane' j8ane tf' j2abe
tf( j2abe tf@ j2abe tfB j2abe tf= j2abe
7/25/2019 computer project on databae connectivity
26/44
C0$80+E+TS 0F.E2ETE 8A3E
j8ane' j8ane ' j2abe
Font , Tahoma '' 8ainTe4t , +A$E,
( j2abe Font , Tahoma '' 8ainTe4t , A.$+0,
@ j2abe Font , Tahoma '' 8ainTe4t , C2ASS,
B j2abe Font , Tahoma '' 8ainTe4t , SECTI0+,
= j2abe Font , Tahoma '' 8ainTe4t , R022,
7/25/2019 computer project on databae connectivity
27/44
C0.E F0R T&E
.E2ETE 8A3E
import java4#s5ing#KL
import java#s9#KL
private voidb'Action8erformedMjava#a5t#event#ActionEvent evtN O
String 9r P tfD#getTe4tMNLtryO
Cass#for+ameMQjava#s9#.riverQNL
Connection con P.river$anager#getConnectionMQjdbc,mys9,ocahostprojectQ"QrootQ"Qpass5ordQNL
Statement stmt P con#createStatementMNLString 9uery P Qseect K from student-record 5hereadm-noQ9rQLQL
ResutSet rs P stmt#e4ecute>ueryM9ueryNL
String t' P rs#getStringM'NL
int t( P rs#getIntM(NL
int t@ P rs#getIntM@NL
String tB P rs#getStringMBNL
int t= P rs#getIntM=NL
7/25/2019 computer project on databae connectivity
28/44
C0.E F0R T&E.E2ETE 8A3E
tf'#setTe4tMt'NLtf(#setTe4tMt(QQNL
tf@#setTe4tMt@QQNL
tfB#setTe4tMtBNL
tf=#setTe4tMt=QQNL
b(#setEnabedMtrueNLrs#coseMNL
stmt#coseMNL
con#coseMNL
catchME4ception eNO
J0ption8ane#sho5$essage.iaogMnu"QErrorQNL
7/25/2019 computer project on databae connectivity
29/44
C0.E F0R T&E.E2ETE 8A3E
private voidb(Action8erformedMjava#a5t#event#ActionEventevtN O
String t' P tfD#getTe4tMNL
tryO
Cass#for+ameMQjava#s9#.riverQNL
Connection con P.river$anager#getConnectionMQjdbc,mys9,oca
hostprojectQ"QrootQ"Qpass5ordQNLStatement stmt P con#createStatementMNL
String 9ueryL
9uery P Qdeete from student-record 5hereadm-noPQt'QLQL
ResutSet rs P stmt#e4ecute>ueryM9ueryNL
rs#coseMNLstmt#coseMNL
con#coseMNL
catchME4ception eNO
J0ption8ane#sho5$essage.iaogMnu"QErrorQNL
7/25/2019 computer project on databae connectivity
30/44
C0.E F0R T&E.E2ETE 8A3E
b(#setEnabedMfaseNL
tf'#setTe4tMQQNL
tf(#setTe4tMQQNL
tf@#setTe4tMQQNL
tfB#setTe4tMQQNL
tf=#setTe4tMQQNL
private voidb@Action8erformedMjava#a5t#event#ActionEvent evtN O
tfD#setTe4tMQQNL
tf'#setTe4tMQQNL
tf(#setTe4tMQQNL
tf@#setTe4tMQQNL
tfB#setTe4tMQQNL
tf=#setTe4tMQQNL
private voidbBAction8erformedMjava#a5t#event#ActionEvent evtN O
this#setVisibeMfaseNL
&ome-8age P ne5 &ome-8ageMNL
#setVisibeMtrueNL
7/25/2019 computer project on databae connectivity
31/44
.ESI3+ F0R T&E
;8.ATE 8A3E
;8.ATE 8A3E 0F T&E A88
7/25/2019 computer project on databae connectivity
32/44
C0$80+E+TS 0F;8.ATE 8A3E
head j2abe Font , Tempus Sans ITC @ *od Te4t , ;8.ATE REC0R.
info j2abe Font , Tempus Sans ITC ' *od Te4t , Enter Admission +o# ofU
D j2abe Font , 3oudy 0d Stye (B *od Te4t , A.$+0,
tfD jTe4tFied
b' j*utton Font , 3adugi (B *od Te4t , VERIF:
b( j*utton Font , 3adugi (B *od
Te4t , ;8.ATE Enabed , Fase
7/25/2019 computer project on databae connectivity
33/44
C0$80+E+TS 0F;8.ATE 8A3E
b@ j*utton Font , 3adugi (B *odTe4t , REFRES&
b@ j*utton Font , 3adugi (B *odTe4t , *AC/
tfD jTe4tFied
j8ane' j8ane tf' jTe4tFied
Enabed , fase
tf( jTe4tFied Enabed , fase
tf@ jTe4tFied Enabed , fase
tfB jTe4tFied
Enabed , fase tf' jTe4tFied
Enabed , fase
7/25/2019 computer project on databae connectivity
34/44
C0$80+E+TS 0F;8.ATE 8A3E
j8ane' j8ane ' j2abe
Font , Tahoma '' 8ainTe4t , +A$E,
( j2abe Font , Tahoma '' 8ainTe4t , A.$+0,
@ j2abe Font , Tahoma '' 8ainTe4t , C2ASS,
B j2abe Font , Tahoma '' 8ainTe4t , SECTI0+,
= j2abe Font , Tahoma '' 8ainTe4t , R022,
7/25/2019 computer project on databae connectivity
35/44
C0.E F0R T&E;8.ATE 8A3E
import java4#s5ing#KL
import java#s9#KL
private void b'Action8erformedMjava#a5t#event#ActionEventevtN O
String 9r P tfD#getTe4tMNL
tryO
Cass#for+ameMQjava#s9#.riverQNL
Connection con P.river$anager#getConnectionMQjdbc,mys9,ocahostprojectQ"QrootQ"Qpass5ordQNL
Statement stmt P con#createStatementMNL
String 9uery P Qseect K from student-record 5hereadm-noQ9rQLQL
ResutSet rs P stmt#e4ecute>ueryM9ueryNLString t' P rs#getStringM'NL
int t( P rs#getIntM(NL
int t@ P rs#getIntM@NL
String tB P rs#getStringMBNL
int t= P rs#getIntM=NL
7/25/2019 computer project on databae connectivity
36/44
C0.E F0R T&E;8.ATE 8A3E
tf'#setTe4tMt'NL
tf(#setTe4tMt(QQNLtf@#setTe4tMt@QQNL
tfB#setTe4tMtBNL
tf=#setTe4tMt=QQNL
b(#setEnabedMtrueNL
rs#coseMNLstmt#coseMNL
con#coseMNL
catchME4ception eNO
J0ption8ane#sho5$essage.iaogMnu"QErrorQNL
7/25/2019 computer project on databae connectivity
37/44
C0.E F0R T&E;8.ATE 8A3E
private voidb(Action8erformedMjava#a5t#event#ActionEvent evtN O
String t' P tfD#getTe4tMNL
tryO
Cass#for+ameMQjava#s9#.riverQNL
Connection con P.river$anager#getConnectionMQjdbc,mys9,ocahostprojectQ"QrootQ"Qpass5ordQNL
Statement stmt P con#createStatementMNL
String 9ueryL
9uery P Qupdate student-record set namePQt'QcassPQt(Q sectionPQt@Q roPQtBQLQL
ResutSet rs P stmt#e4ecute>ueryM9ueryNL
rs#coseMNL
stmt#coseMNL
con#coseMNL
catchME4ception eNO
J0ption8ane#sho5$essage.iaogMnu"QErrorQNL
7/25/2019 computer project on databae connectivity
38/44
C0.E F0R T&E;8.ATE 8A3E
b(#setEnabedMfaseNL
tf'#setTe4tMQQNL
tf(#setTe4tMQQNL
tf@#setTe4tMQQNL
tfB#setTe4tMQQNL
tf=#setTe4tMQQNL
private void b@Action8erformedMjava#a5t#event#ActionEventevtN O
tfD#setTe4tMQQNL
tf'#setTe4tMQQNL
tf(#setTe4tMQQNL
tf@#setTe4tMQQNL
tfB#setTe4tMQQNL
tf=#setTe4tMQQNL
private void bBAction8erformedMjava#a5t#event#ActionEventevtN O
this#setVisibeMfaseNL
&ome-8age P ne5 &ome-8ageMNL
#setVisibeMtrueNL
7/25/2019 computer project on databae connectivity
39/44
.ESI3+ F0R T&ES&01 8A3E
S&01 8A3E 0F T&E A88
7/25/2019 computer project on databae connectivity
40/44
C0$80+E+TS 0FS&01 8A3Ehead j2abe
Font , Tempus Sans ITC @ *od &oriGonta aignment , CenterTe4t , 203I+
tab' jTabe $ode ,
Ro5s , D
Coumns , ='# +ame
(# Adm#+o#
@# Cass
B# Section
=# Ro
b' j*utton Font , 3adugi (B *odTe4t , S&01
b( j*utton Font , 3adugi (B *od
Te4t , *AC/
7/25/2019 computer project on databae connectivity
41/44
C0.E F0R T&ES&01 8A3E
import java4#s5ing#KL
import java#s9#KL
private voidb'Action8erformedMjava#a5t#event#ActionEventevtN O
.efautTabe$ode mode PM.efautTabe$odeN tab'#get$odeMNL
tryO
Cass#for+ameMQjava#s9#.riverQNL
Connection con P.river$anager#getConnectionMQjdbc,mys9,ocahostprojectQ"QrootQ"Qpass5ordQNL
Statement stmt P con#createStatementMNLString 9uery P Qseect K from student-recordLQL
ResutSet rs P stmt#e4ecute>ueryM9ueryNL
5hieMrs#ne4tMNN O
String t' P rs#getStringM'NL
int t( P rs#getIntM(NL
int t@ P rs#getIntM@NL
String tB P rs#getStringMBNL
int t= P rs#getIntM=NL
mode#addRo5Mne5 0bjectOt'"t("t@"tB"t=NL
7/25/2019 computer project on databae connectivity
42/44
C0.E F0R T&ES&01 8A3E
rs#coseMNL
stmt#coseMNL
con#coseMNL
catchME4ception eNOJ0ption8ane#sho5$essage.iaogMnu"QErrorQNL
private voidb(Action8erformedMjava#a5t#event#ActionEvent evtN O
this#setVisibeMfaseNL
&ome-8age P ne5 &ome-8ageMNL
#setVisibeMtrueNL
7/25/2019 computer project on databae connectivity
43/44
C0+C2;SI0+1ith the advancement of technoogy" our
information systems became computeriGed# Inschoos" the student information record storesevery data of every student 5ho has everenroed in the schoo" 5hether a presentstudent or an aumnus# This project heped meto understand the functioning of such
information systems" 5hat happens on thescreen and 5hat happens inside# This 5as a!no5edge gaining project and it broughtsevera ne5 facts# The e4perience of ta!ing upthe project and competing it successfuy 5astruy an amaGing e4perience#
7/25/2019 computer project on databae connectivity
44/44
*I*2I03RA8&:
555#googe#com
555#5i!ipedia#com
+etbeans#D#(
$ys9
http://www.google.com/http://www.wikipedia.com/http://www.wikipedia.com/http://www.google.com/