You are on page 1of 4

##**Exam-

2**

##**Dat
abas
eManagementSys
tem**

##**Ti
me-2hour**

##**Ful
lmar
k-1
00**

1
.Whati
str
anct
ion?Wr
it
eaboutDBMSt
rans
act
ion.
-5

2.
Dif
fer
encebet
weendel
ete,
tr
uncat
e,dr
op(
atl
eas
t5di
ff
erencepoi
nts
)5

3.
Wri
tes
hor
tnot
ewi
thexampl
eaboutDBMSkeys
.15

4.
a)Whati
str
igger
?wr
it
eacodef
oraut
oincr
ements
equenceandt
ri
gger
.-
6

b)
Whati
scur
sor
?Wr
it
ethet
ypesodcur
sor-
4

5.
Drawacl
assdi
agr
am f
orcommer
cial
sof
twar
eappl
i
cat
ion.
-5

6.
Dif
fer
encebet
weenRAI
Dlevel
2andRAI
Dlevel
3-5

7.
Compar
isonbet
weenRacks
erverandbl
ades
erver
s.-
5

8.
Wri
teSQLquer
ytof
inds
econdhi
ghes
tsal
ary-
5

9.
SQLquer
ies-
25
Tabl
e-Cus
tomer

cus
tomer
_i
d|cus
t_name | ci
ty |gr
ade|s
ales
man_
id

-
--
--
--
--
--
--
+--
--
--
--
--
--
--
--
+--
--
--
--
--
--
+--
--
--
-+-
--
--
--
--
--
--

3002|Ni
ckRi
mando |NewYor
k |1
00| 5001

3007|Br
adDavi
s |NewYor
k |200| 5001

3005|Gr
aham Zus
i |Cal
i
for
nia|200| 5002

3008|J
uli
anGr
een |London |300| 5002

3004|Fabi
anJ
ohns
on|Par
is |300| 5006

3009|Geof
fCamer
on|Ber
li
n |1
00| 5003

3003|
JozyAl
ti
dor |Mos
cow |200| 5007

3001|Br
adGuzan |London | | 5005

Tabl
e-Sal
esman

s
ales
man_
id| name |ci
ty |commi
ssi
on
-
--
--
--
--
--
--
+--
--
--
--
--
--
+--
--
--
--
--
+--
--
--
--
--
--

5001|
JamesHoog|NewYor
k| 0.
15

5002|Nai
lKni
te|Par
is | 0.
13

5005|Pi
tAl
ex |London | 0.
11

5006|McLyon |Par
is | 0.
14

a)Fr
om thefoll
owingtabl
eswri
teaSQLquerytofi
ndthos
es al
espersonsdonotli
vei
nthe
samecitywher et
heircus
tomersl
i
veandrecei
vedacommi s
s i
onfrom thecompanymore
than12%.ReturnCustomerName,cus
tomerci
ty,
Sales
man,sales
manci t
y,commi
ssi
on.

b)From t
hefol
lowingtabl
eswri
teaSQLquerytof
indthos
ecust
omer
swhos egr
adeless
than300.Ret
urncust_
name,cust
omercit
y,gr
ade,
Salesman,
sal
emanci
ty.
Theresul
tshoul
d
beorderedbyascendi
ngcustomer_
id.

c)Writ
eaSQLquer
ytocombi
neeachr
owofs
ales
mant
abl
ewi
theachr
owofcus
tomer
tabl
e.

d)Wri
teaSQLstat
ementtomakeacar t
esi
anproductbet
weens al
esmanandcus
tomeri
.
e.
eachsales
manwil
lappearf
oral
lcus
t omerandvi
ceversafort
hosesal
esmenwhobel
ongs
toacit
yandthecust
omerswhomus thaveagrade.

e)Fr
om t
hefol
lowi
ngtabl
eswri
teaSQLqueryt
ofi
ndthes
alesper
son(
s)andt
hecus
tomer
(s)
hehandl
e.Ret
urnCus
tomerName,ci
ty,
Sal
esman,
commiss
ion.
1
0.Tr
ans
lat
eitr
elat
ional
algebr
a:1
0

a}
From t
hef
oll
owi
ngcus
tomert
abl
efi
ndcus
tomernamewhodonotl
i
vei
nNewyor
kci
ty.

b)
From t
hef
oll
owi
ngs
ales
mant
abl
efi
ndaver
agecomi
ssi
onofs
ales
man.

11
.Whati
sdeadl
ock?Howyoudet
ectdeaDLOCK?Wr
it
ethepr
event
ionansavoi
denceof
deadl
ock.1
0

You might also like