You are on page 1of 6

Page1of1

B.
E/B.
Tech.
/B.
Arch.PRACTI
CALENDSEMESTEREXAMI
NATI
ONS,
APRI
L/MAY2019
Four
thSemest
er

CS8481&DATABASEMANAGEMENTSYSTEMSLABORATORY

(
Regul
ati
ons2017)

Ti
me:
3Hour
s AnsweranyoneQuest
ion Max.Mar
ks100

(
Tobef
il
ledbyt
hequest
ionpaperset
ter
)

Ai
m &Pr
ocedur
e Queri
es& Output& Viv
a- Recor
d Tot
al
Program Result Voce
20 30 30 10 10 100

1. Consi
dert
heI
nsur
ancedat
abasegi
venbel
ow.
PERSON(
dri
ver
_ID,
name,
addr
ess)
CAR(
regno,
model
,
year)
ACCI
DENT(
repor
t_number
,accd_
dat
e,l
ocat
ion)
OWNS(
dri
ver
_id,
regno)
PARTI
CIPATED(
dri
ver
_id,
regno,
repor
t_number
,damage_
amount
)
i
. Specif
ytheprimarykeysandf
orei
gnkey
sandent
eratl
eastf
ive
tupl
esforeachrel
ati
on.
i
i
. Updatethedamageamountforthecarwi
thspeci
fi
cregnoi
nthe
acci
dentwit
hrepor
tnumber1025.
i
i
i. Addanewacci
dentt
othedat
abase.
i
v. Fi
ndthetotalnumberofpeopl
ewhoownedcar
sthatwer
einv
olv
ed
i
naccident
sintheyear2018.
v
. Fi
ndthenumberofacci
dent
sinwhi
chcar
sbel
ongi
ngWagonR
werei
nvol
ved.

2. Cr
eat
etheBookdat
abaseanddot
hef
oll
owi
ng:
book(
book_
name,
aut
hor
_name,
pri
ce,
quant
it
y).
i
. Wr
it
eaquer
ytoupdat
ethequant
it
ybydoubl
eint
het
abl
ebook.
i
i
. Li
stal
lthebook_namewhosepri
cei
sgr
eat
ert
hant
hoseofbook
named"Dat
abaseforDummi
es"
.
i
i
i. Retr
iev
etheli
stofaut
hor_namewhosef
ir
stl
ett
eri
s’a’al
ongwi
th
thebook_
nameandpri
ce.
i
v. Wri
teaPL/
SQLPr
ocedur
etof
indt
het
otalnumberofbooksofsame
aut
hor
.
3. Createthe Company dat
abase wi
tht
he f
oll
owi
ng t
abl
es and do t
he
fol
lowi
ng:
Page2of2

Administ
rat
ion(
empl
oyee_
sal
ary
, dev
elopment _
cost
, f
und_
amount
,
t
urn_over,
bonus)
Emp_det
ail
s(emp_
no,emp_
name,DOB,addr
ess,doj
,mobi
l
e_no,dept
_no,
sal
ary
).
i
. Calcul
atet
hetot
alandav
eragesal
aryamountoft
heempl
oyeesof
eachdepar
tment
.
i
i
. Di
spl
ayt
otal
sal
aryspentf
orempl
oyees.
i
i
i. Devel
opaPL/ SQLfunct
iont
odi
spl
ayt
otalf
undamountspentbyt
he
admini
str
ati
ondepart
ment.

4. Cr
eat
ethest
udentdat
abasewi
tht
hef
oll
owi
ngt
abl
esanddot
hef
oll
owi
ng:
assessment
(reg_
no,
name,
mar
k1,
mar
k2,
mar
k3,
tot
al)
dept
_det
ail
s(dept
_no,
dept
_name,
locat
ion)
.
i
. Using al
tercommand dr
op t
he col
umn l
ocat
ion f
rom t
he t
abl
e
dept_
detail
s.
i
i
. Di
spl
ayal
ldept
_nameal
ongwi
thdept
_no.
i
i
i. Dr
opt
het
abl
edept
_det
ail
s.
i
v. Writ
e a PL/SQL Tr
iggert
over
if
ythe dat
a bef
orei
nser
ti
on on
assessmentt
abl
e.

5. Consi
dert
hef
oll
owi
ngTabl
esf
orabusr
eser
vat
ionsy
stem appl
i
cat
ion:
BUS(
ROUTENO,
SOURCE,
DESTI
NATI
ON)
PASSENGER(
PID,
PNAME,
DOB,
GENDER)
BOOK_
TICKET(
PID,
ROUTENO,
JOURNEY_
DATE,
SEAT_
NO)
i
. I
ncl
udeconst
rai
ntt
hatDOBofpassengershoul
dbeaf
ter2000
i
i
. Displ
aythepassengerswhohadbookedt
hej
our
neyf
rom Mumbai
toChennaion02-
Feb-2019
i
i
i. Li
stthedet
ail
sofpassenger
swhohav
etr
avel
edmor
ethant
hree
ti
mesonthesamer
oute.
i
v. Cr
eateaView t
hatdi
spl
aystheRouteNo,sour
ce,dest
inat
ionand
j
ourney
_dat
ewhi
chmovesfr
om Chennait
oDelhi
.
v
. I
nt heabov ecr
eatedprocedure,incl
udeexceptionstodispl
ay"
No
t
icketbookedonspeci
fi
eddat e"foragiv
enjourney_dat
e.

6. Consi
dert
hef
oll
owi
ngt
abl
es.
SAI
LOR(
sid,
sname,
rat
ing,
age)
BOATS(
bid,
bname,
col
our
)
RESERVES(
sid,
bid,
day
)
Page3of3

i
. Li
stt
hesai
l
orsi
nthedescendi
ngor
deroft
hei
rrat
ing.
i
i
. Listt
hesai
l
orswhosey
oungestsai
l
orf
oreachr
ati
ngandwhocan
vote.
i
i
i. Li
stthesai
l
orswho hav
ereser
ved f
orbot
h‘RED’and ‘
GREEN’
boat
s.
i
v. Cr
eat
esy
nony
mforsai
l
ort
abl
e.
v
. Creat
eaPL/SQLFunct
iont
hataccept
sSI
Dandr
etur
nst
hename
ofsai
lor
.

7. Consi
dert
hef
oll
owi
ngr
elat
ionsf
oranor
derpr
ocessi
ngappl
i
cat
ion:
CUSTOMER(
CID,
NAME)
PRODUCT(
PCODE,
PNAME,
UNI
T_PRI
CE)
CUST_
ORDER(
OCODE,
ODATE,
CID)
ORDER_
PRODUCT(
OCODE,
PCODE,
QTY)
i
. Devel
opaTr iggert
oensur
ethepr
oductt
obePen,Er
aser
,Penci
l
dur
inginser
ti
on
i
i
. Devel
opaPL/
SQLFunct
iont
ocal
cul
atet
het
otalcostofor
der
ed
pr
oduct.
i
i
i. UseSequencef
orPCODEi
nser
ti
oni
npr
oductt
abl
e

8. Considerthef
oll
owi
ng r
elat
ionsf
orat
ranspor
tmanagementsy
stem
appl
i
cation:
DRI
VER(
DCODE,
DNAME,
DOB,
GENDER)
CI
TY(
CCODE,
CNAME)
TRUCK(
TRUCKCODE,
TTYPE)
i
. I
ncl
udet
heconstr
aintasment
ionedabov
eandt
hegenderofdr
iver
i
sal
ways'
male'
.
i
i
. Devel
opaSQLquer ytoli
stt
hedet
ail
sofeachdr
iverandt
he
numberoft
ri
pst
rav
eled.
i
i
i. Cr
eat
eani
ndexont
ruck_
codei
nDr
ive_
truckt
abl
e.
i
v. UseCur
sort
odi
spl
ayt
hedet
ail
sofal
ldr
iver
s,andt
het
ruck_
code

9. Consider t
he f
oll
owi
ng r
elat
ionalschema f
or a banki
ng dat
abase
appl
icati
on:
CUSTOMER(
CID,
CNAME)
BRANCH(
BCODE,
BNAME)
ACCOUNT(
ANO,
ATYPE,
BALANCE,
CID,
BCODE)
TRANSACTI
ON(
TID,
ANO,
TTYPE,
TDATE,
TAMOUNT)
Page4of4

i
. Devel
opaSQLquer yt
olistt
hedet
ail
sofbr
anchesandt
henumber
ofaccount
sineachbr
anch.
i
i
. Devel
opaSQLquer
yt oli
stthedetai
l
sofcust
omer
swhohav
e
per
for
medt
hemostt
ransact
ionst
oday
i
i
i. Creat
eav iew t
hatwi
l
lkeeptr
ackoft
hedetail
sofeachcust omer
andaccountdetai
l
swhohavebot
hsav
ingsandcur
rentaccount.
i
v. Dev
elopadat
abaset
ri
ggert
hatwil
lupdatet
hev al
ueofBALANCE
i
nACCOUNTtabl
ewhenarecor
disinser
tedi
nthetr
ansact
iont
abl
e

10. Consi
derthefol
lowingdatabaseofst
udentenr
oll
menti
ncour
sesand
booksadopt
edforthatcourse.
STUDENT(
regno,
name,
maj
or,
bdat
e)
COURSE(
cour
seno,
cname,
dept
)
ENROLL(
regno,
cour
seno,
sem,
mar
ks)
i
. Displ
aythet
otalnumberofstudent
sregi
sterf
ormor
ethant
wo
coursesi
nadepar
tmentspeci
fi
ed.
i
i
. Displ
aythest
udent
swhohav
esecur
edt
hehi
ghestmar
kineach
course
i
i
i. Li
stt
hey
oungestst
udentofeachcour
sei
nal
ldepar
tment
s.
i
v. Dev
elopPL/
SQLCursorthatsel
ect
smar
ksofapar
ti
cul
arst
udent
i
naspeci
fi
edsemest
er.

11. Thef
oll
owi
ngar
emai
ntai
nedbyabookdeal
er.
AUTHOR(
aut
hor
_id,
name,
cit
y,count
ry)
PUBLI
SHER(
publ
i
sher
_id,
name,
cit
y,count
ry)
CATALOG(
book_
id,
tit
le,
aut
hor
_id,
publ
i
sher
_id,
cat
egor
y_i
d,y
ear
,pr
ice)
CATEGORY(
cat
egor
y_i
d,descr
ipt
ion)
ORDER_
DETAI
LS(
order
_no,
book_
id,
quant
it
y)
i
. Li
stt
heaut
horoft
hebookt
hathasmi
nimum sal
es.
i
i
. Di
spl
ayt
otal
numberofbooksi
neachcat
egor
y.
i
i
i. Devel
opaPL/SQLpr
ocedur
ethatupdat
est
hepr
iceoft
hebookby
10%thosewi
thmaxi
mum sal
es.

12. Createthe st
udentdat
abase wi
tht
he f
oll
owi
ng t
abl
es and do t
he
fol
lowi
ng:
mar
k_det
ail
s(r
eg_
no,
name,
mar
k1,
mar
k2,
mar
k3,
tot
al)
dept
_det
ail
s(dept
_no,
dept
_name,
HOD)
st
ud_
det
ail
s(r
eg_
no,
name,
dob,
addr
ess)
Page5of5

i
. Usi
ngal
tercommandt
oassi
gnf
orei
gnkeyi
nmar
k_det
ail
s.
i
i
. Displayt
headdr
essoft
hest
udent
swhohav
esecur
edt
het
opt
hree
ranks.
i
i
i. Wri
teaPL/ SQLpr
ocedur
etoupdat
ethegr
adeaccor
dingt
othe
markssecur
ed.

13. Cr
eat
eadat
abasef
orI
oTsi
mul
atorwi
tht
hef
oll
owi
ngt
abl
es.
Dev
ice_
det
ail
s(dev
iceI
D,dev
icename,
proper
ti
es)
Connect
_st
atus(
dev
iceI
D,l
ogi
nTi
me,
logout
Time)
Tr
ansact
ion_
det
ail
s(t
ransI
D,dev
iceI
D,updat
edPr
oper
ti
es,
timeof
Updat
ion)
i
. Li
stthedet
ail
soft
hedev
icest
hatar
econnect
edi
napar
ti
cul
ar
sessi
on
i
i
. Displ
aythedetai
lsofthedev
iceandi
tspr
oper
tyt
hathasbeen
acti
veformostoft
heti
me.
i
i
i. DevelopaPL/SQLprocedur
ethatdel
etest
hedet
ail
soft
hedev
ices
thathavebeenl
eastupdat
ed.

14. Cr
eat
eadat
abasef
ormai
ntai
ningt
hecl
ouddat
abase
PAAS_
det
ail
s(ser
ver
,pl
atf
orm,
star
tDat
e,endDat
e,r
ate)
SAAS_
det
ail
s(ser
ver
,sof
twar
e,st
art
Dat
e,endDat
e,r
ate)
DAAS_
det
ail
s(ser
ver
,dat
abase,
star
tDat
e,endDat
e,r
ate)
t
ransact
ion(
ser
vice,
logi
nti
me,
logout
ti
me)
i
. Li
stthedet
ail
soft
heser
vicesr
equest
edf
rom 5t
hFebt
o10t
hFeb,
2019.
i
i
. Di
spl
ayt
hedet
ail
soft
heser
vicet
hatar
eleastusedandmostused.
i
i
i. DevelopaPL/ SQLfunct
iont
hatret
urnsthetot
alamounti
nvest
ed
onplatf
orm serv
icei
nthemonthofFebr
uary.

15. Cr
eat
eadat
abasef
orPl
acementandTr
aini
ngcel
l
.
St
ud_
det
ail
s(r
egno,
name,
dept
,per
cent
age)
Company
(company
ID,
name,
noOf
Vacancy
)
Tr
aini
ng_
Det
ail
s(Cour
seI
D,name,
Trai
ner
)
Pl
aced(
regno,
company
ID,
minSal
)
i
. Li
stthestudent
swhoar
eel
i
gibl
eforr
ecr
uit
menti
napar
ti
cul
ar
company
.
i
i
. Di
spl
ayt
hest
udentwhohasbeenpl
acedwi
thhi
ghestsal
ary
i
i
i. Devel
op aPL/SQLex
cept
iont
hatpr
ovi
desanal
ter
nat
efornot
el
igi
blest
udent
s.
Page6of6

16. Cr
eat
eadat
abasef
orTi
met
abl
egener
ati
onusi
ngt
hef
oll
owi
ngt
abl
es:
Facul
ty_
det
ail
s(Facul
tyI
D,Facul
tyName,
dept
)
Subj
ect
_det
ail
s(Subcode,
subt
it
le,
dept
,year
)
Subj
ect
_al
l
ocat
ed(
Subcode,
year
,dept
,Facul
tyI
D)
Ti
met
abl
e(per
iod,
timef
rom,
timet
o,Subcode,
year
,dept
)
i
. Di
spl
ayt
het
imet
abl
eofi
ndi
vi
dual
facul
ty
i
i
. Di
spl
ayt
het
imet
abl
eofeachcl
asssepar
atel
y
i
i
i. Di
spl
ayt
het
imet
abl
eofpar
ti
cul
arsubj
ect
i
v. Devel
op a PL/
SQL pr
ocedur
ethat di
spl
aysi
ndi
vi
dualcl
ass
ti
metabl
e

17. Create a database for Transport


at i
on management sy stem in an
organi
zati
on.I dent
if
y appropriatet ables and opt
imize them using
normali
zati
on.Dev el
op an applicat
ion using f
rontend designi
ng wi
th
backenddatabaseconnect
ivi
ty.

18. Create a database forlist


ing the academic per
formance ofaff
li
ated
coll
eges underAnna Uni v
eri
sty. I dent
if
yt he tabl
es needed.Apply
normali
zationoni denti
fi
edtables.Developanappli
cationwi
thsuit
ableUI
designandf i
nall
ygeneratetheacademi cperf
ormance.

19. Devel
op an appl
icati
on wi
thfront end desi
gn f
or Rai
l
way Ti
cket
Reser
vat
ionsy
stem usi
ngappr
ori
atedat
abasesyst
em.

20. Devel
opanapplicat
ionforst
udentsattendancetracki
ngandr
epor
ti
ng
syst
em wi
thgoodUIdesi
gnanddatabaseconnecti
vi
ty.

You might also like