0% found this document useful (0 votes)
77 views7 pages

(Java Answer Sheet)

1. The JDBC API supports connecting and executing queries on various database models and allows accessing data through database connection classes. 2. It consists of two layers - the JDBC API layer which provides the application-database connection, and drivers that execute calls directly or indirectly into vendor specific database protocols. 3. Common steps to connect and query an application to a database include importing driver packages, registering the driver, opening a connection, executing queries using prepared statements, and cleaning up by closing all database resources.

Uploaded by

Waseem Shaikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views7 pages

(Java Answer Sheet)

1. The JDBC API supports connecting and executing queries on various database models and allows accessing data through database connection classes. 2. It consists of two layers - the JDBC API layer which provides the application-database connection, and drivers that execute calls directly or indirectly into vendor specific database protocols. 3. Common steps to connect and query an application to a database include importing driver packages, registering the driver, opening a connection, executing queries using prepared statements, and cleaning up by closing all database resources.

Uploaded by

Waseem Shaikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

he j0BC ApI Suppodts bndh

e AOd dhsee-ti2 pioCC e55in madels


data bas CLCCesSbut isqe pegaly
DBC HXchitectue conSis otwo
aye 5.J0B APL i s P}nvde5 &he
Oppliadloo-oJDE mONNa E ConA.edion

Cx cu excut

Dive05
Cxecute
execute execute

SBAST YSQ coRALE


Sbase mysaL ace
Bi8Jo-ODBC bidge dive
heJDBC-ODeC Dfige dYve Vses
ODPCAiNeA Connect do the
dadabaGe he OB ODBC bidae
oYVe ConVex 45 TOBCe h o d Call
iAtO Ah e aDBC unCtiOn Ca
2 NatiNe- AP L dyiue26
The Nadi ve APL d7 ve8 _USes
dhe chent-side libiaYies adhe
da tabse. The dYives COONOKL5 oe
method CallG into natye Call ok dhe dua base
Her Tt is Dot YiEteD entiely
i TaVa
3 NetuNOK PXtscol diNe
The Netw ok prs to Co dive
USeS_middleANaeOpolicedion Se\ves
ConUe6 ts OB/ Cels diYectby a
indyectly into dhe VeAdo Spciti
dataoae ptOco1 5ul wyiHen
in 0N
uhin diver
he ahin dxive CoVexts opR
Call dixect Iy into dhe ends S06
database p6ötOCol 6
MEERA-
PAGE NO
DATE

-2A Xesut set s a Jab


Co0taiS dhe
esul
abie a
0 PIeCudhn
Cotaa
CoAdIa0nS o he 4MEdP
Cam mon VSed e thods a
R-esuSe intebhauce
Pnb C ooolear exL
2 Qub Cbo oleo POeviouSO
publi baolea DistO
pubc bolecuO a st
B
A ad sl Can Contain baih class and
OTheyilf p e s ike SauAd and maqe
e6which. 'may be included i dhe
poject A Ja ile KAlaitg USina ja

Mniest kiles ft desckbP the


e a t u e S o 5 &he ach iVe tach jo
aavla amuniheSt Isil by default
il
named as
p 5 M R MaDLeSt l e is
mAAi t .m O E
A his l e cycle o SeUlet
CeS be aumm ed uUP iD belouw mentioDed
Ve0LS
The Sesulet clasS5 locded
2)heSexv)et is Ceted
3 he intiO nethd 5 involk ed
d e rYde o initalize dthe ser vlet.]
The seviceOmethod is inJo ked
Kepeate dly PachClient eque St
2lacla
h 401let estoyed uSin
destXoY C)Methe
)loodin g
wh epee dhe Sebve5tert he
ConttaineX d deploYS qnd lood all
5eylet
)coLatine 10 5tance
hepe all 4he SexvetclaSer
a l lod ded dh e conttihpeCbeats5
he ynstance sos each Sebylet
3)IoNok iniAOmethod L0 E
he all i0StaACe cKeat
inid) Method is iDNdked.

)IoNdKe SeNiCe Ome thod


Evetime he seNE CCeiVS
eueste hoo he sekylet
oKe destoaymefhod
wheo Conbunei hu doA n dh
heSeryle alasSes 1
n netHaC d Calldesttoy
MethO d edh ialticlizedI
6)
wo e5a seslets
aenesiCSeVe t <
ti5 footocol independe
e y v l e t G e n e c Sezyle is a base
C l a S 5ekVEet o shich all the
SeiNlet CLKe deNed. Gene i c Sekvlet
uPpodts 500 HTTP TP on d 5M TP
o t o ColS timplements h t Setvle
and 5e7vleLCoaki c n t e t a c e
HTTP SexVlet
1TIP se}vlet i sHTP depe
Seyvlet.he HIP. Piotora
O Ue S h e t allouus
a Se d
SPS and SejveSfo co
ANeb byo SeXS an
mmUDiCoalé
Whe NNebDo
5 u p o x t dhe HTTP paotocal
SebVe) o0S axe depende,
applicadio
aA-aged e b O
o HTTP e ð V e t
A)Ccokie class io Serulet
cookie enab yoUO
otoYe
clien Sdewe Ca clcs sis y hhe
Cookie paged on tkeix exp y dime
5ession Go okies
SessioA Codkies do ns hve
expl adio ime. Ttlive5inh e bouwse
meMIy BS 50o as dhe yNeh btoWSed
iscloed Hhis Cookie cets destOYed.
Pebistent cookies:
NDKe SessioD Cookies hey
haveepikz
have hion time ke a
Stoxed inthf Useð had dNe and
gets d eG tfoyed based ondhne
eApiYaMe
B
Cw5teps do cceLt 0gC
AP0lcd tion o oYd e doCee
OB Applicafio0, uWe ne e do 5olla
u 5 teps
O
M
i)Tmpobt dhe Packages
You nftd d0 ncude dhe pack
Containing the DRC cleLs{eS ne
edatabase PKoqSamnine.mo sE oktep
POKE jasa Sql.Ail Subbi
2Reqister dheDR diVe
eke You hay eto iNitialiZe a dV
20 hat you CaD
opes C CommuOicaliowp

ChunAe
ehaith dhe data base
3oPep o ConnéctiOn
e YoU Ca uSe dhe attConnedion
Met bod cKeet a CoOnectioD abiec
which e py eSent5 aaphy 5ica LonnecioP
L h e cla Dage

Syecute e Qu e
euieS Using d abiect cb type
5tepae bobLAlAin4 an d Submutio
An 5G 5tut emMen d dhe d4tabafe
CleanD. updhe envixo men
Reesuifes eplicy Closin oll
databaseKeSalaces Ve5us xelyie
on he Oaybaq Colleciion

OE
M0

You might also like