You are on page 1of 4

Databue Management Systems (SWE1004)

'=- ,,. _ _ __ = M. Tech. (lnlep'llted) Software En&lneertna

..•~it'.~~.t_t.i.t_t_~:~r5:_: :~ ., ~;:2gr.,.,·
CAT II Examination

~l,
:..:" _. ,-::=:· ----< _., ° ,~

SLOT o,. 2142 ~;,


- - - . - - - - - - - _j: ~~-_.: -~ --

" _-~-;;~I \}?::~,~~t~ ~1~a ~ !Ilimalcove~ of the set of functional dependency F CD, D, C, - _ -.----
_;:;.,~=-'.:,/ ";{'-;;;_..-~-, ,;/_ - .,, Dl $ecl~ed on a relation schema R(A, B, C, D). (5}
.~ ':...:c:--· 'oi~ ::- __ - F ·" · ·' · _Ans.Decompose AB CD Into AB C and AB D. So F reduces to
~~-- .. :~' = .. -c - • C, ~B D, D, B C, B D}.
- ?-~ -
\ _ .::-:.
·-'-
w
- · Now we find that B
dependency A~
D Is a member of this set and hence A is an extraneous attribute In the functional - -~ - ;:_=--=-~--=:_"~~~-~
D and C Is an extraneous attribute In the functional dependency BC
\ - _~-:

D. Agairi~~i~~'-~ ::c:z--.-..:
_:_ -z-=~--=-~~ ; .:. ~"
·beca~ Cbelonglng to this F, A Is an extraneous attribute In the functional dependency AB ~""ef~~~:~-:_~~-:.:~:°-2~~=--
'-_.--= _:::"_:-~~~='~
- - - - =- - - - -- _ - - - - _·-:~-~~~~-:-:_ -
- :cc· sotb_e minimal ~over of F Is G= (B c, B D}. __
:. -_ l .. l{Fc.
-:R{~ s;c:D) then_find out
{AB C A, D} be a set of functional dependency specified on a relation schenur~_i.~-~-:__=:-:~~:
(BC)+ and (Acr. -crf -~~~.:__~~=--.·t
Ans. ·(ABr =ABU C = ABC ;:: ABC U A = ABC = ABC U D = ABCD.
(Ber ;: BC u D = BCD = BCDA = ABCD. ~~:~:ff~~s
(ACt = AC. - -~
o.l-,1i) wJtl!c~-ni~~i~;~~erlined.-lliff~pJ;__wfug~iddi~F~~~~:=:i~

.;:E:::~~;~R::2::~::~?.~~~~11i~~;
3. Consider a relation schema R(A, B,~

R are atomic hence R is in first normal fonn. Bu!]t~1f~ 1--:'fil ~~~~ ~ -t _.; _-s_ =-;. -:-'='·
~ - ~ ince ,the attributes of
-foJ'!]l ~
because of the functional dependency G D (which is a partial {!Jl'i~i~--:d~~~ncy~:So:we =·"'-'."_.".':i:~; :i' .-
iled,m~ R Into two schemas namely, R1(~ D) and Ri(A, B, E, _Q). The ~ :...~ -fJi=~~d ~ ~al: -"':c_ - - - --: . ~chema,"
¥=- ~_-=€-~? (1n t act it is BCNF). The schema R 2 Is In second normal form b~t it is not i~ .thlrd n~nn~ forin --
~oiifi .,
- ~-- :)-_-::- f • aJie of -the functional dependency AB E. So we decompose R2 Into tw~~the~a·; n!,llll-efy, =R3(A, B, · ·· ~.
-~ ;:- ~)~d IY(A-.=B, k ~- So the decomposition D = (R1, R3, R.i}. . _, -
=-~ _- - ~ ·llhe .PrnJ)a ry-l<ey~ are underlined in the schemas. - :::- '"·:\~,:; _
.Tbe s;;q_f -~ bl,I~ {A, B} in the schema R, Is a foreign key that refers to the schema R3 and. another •· -=-=~~ _;~_ "\. _, :
" =--~ ~ ~ y of
- -
:R~ is~ attribute G Jnd It refers to the schema R1•
.- - -~
•.
·-- ..
· -: i ~--i~· ":e..,.. -
. 4. Fjnd ounvhet:her the following sets of functional dependency ·spe<:lfled on a relation schema R(A, B, C, '. -:;. ~.,, '~ "-I "
- - ~- ~.

,. ,::.,. ·-
D, E) ar.e equiyalent. -'~ ""
F-, .- C, A P} and F2 ;:: BC, E, B D},
Ans. Consider the functlo~al dependency A BC of the set F2, (A)~ with resp~t;to Fi is ~A-):':.,i;; A\11'.C~. 0
·

AC ;. AC U -B = ABC U D = ABCD and this set contains the right han4 sl.de of A S.C' h~n~e ~i -
BC .can b"e Inferred from F 1• Again consider the other funcQonal ~e~odency A E of F 2 aild,(A)~. with
respe.ct to F I as before produces ABCD and this set does not conlaln th~ right hand side of A E ancl ··
hence A E cannot be Inferred from Fl. So F I and F 2 are not equivalent.

1
pARTB(3xtp ~ -~ ) .
.::::.. -~· . -
s. Consider the foU~g infonnation ab<,M a'-univer.dty d~tilbase. _ -- -~
Professors have a s~ial seeurity nui:llMi', a ~ame~-an:!lge/ a rank IJ!!d a research speeialty; frgjects have a,
projert number; a sponsor il\\Ille (e.i:
• · • ·· · - -~ :Jc _ '.~--= ·--::: -
ost),
-~c
-
a starting da~e, an ending date and a:budg~.-Ori®Jt.r~i:lt, .
. _·- -: - _;~~.;.-_t.;_ _, __ _
have .a sod.al sewrify nmnber, al1aiite, _a~ age and a degree progratQ (e.g., M.S;. or Pl\.D.). Ejchpto,
r :. -~ :: .. - _ _;;, -- - ~-- __ -- - · _ - -. -:..-~~- . -2:"f~
rri~ged by one proEessor (l<Qc>W;g:"as;'ilie project's principal investigator). Each projecfiswot~ olfb _
. ' . . -: :.~ ·-=~- "'" . ,.. :_·;c c::;,·...::::;; :~
·or 'More ptt>fessors (kOOWif~ J liLP!()ject's co-investigators}. Professors cart ,1na1n{ge~~ n.lor/wot~
multipte projects. Each-proj~ on by one or more graduate students. (bow\ii.f~ .'"=" =c 1r wo1J<ed
research assistaots). When gracluate students work on a project, a professor must supervt1
.. . r _
ti.
-ki=--~~
the project. Graduate students can work on multiple projects, in which case they Will have -·
different) supervisor fore~ one. Departments have a department number, a department naml/rt__ ..
office. Depmtments have a professor (known as the chairman) who runs the departmenf, ni-f~~irs~~.:"'cc,
!_asfoct~tii ·"""':;}¥rt
I,~:
work in one or more department and for each department that they work in, a time pe~en;~ge
wllh !heir Job. Graduate studems hav, l>ne major depanment In which obey an, working jm f Ir'il~ J~1,!!!i"' ,.,! --f
Each graduate student has another more senior graduate student (known as a student advis1>r) who advise~~'4. , · ', ·· ":it"
~-
;•
-
him or her on what courses to take. -
Draw an entity-relationship (ER) diagram that captures the above information about the university. Indicate
key constraints, cardinality constraints and participation co~nts on the diagram. (10)

Ans.

~--- -
-"? --=:

·.,~

i· .

.. ' :: ' .· ·1

. · ·-(~ lr+ A· ·
,~
-!'.~:-•
i'

_ :'::; . - _
l~Mt...ar1At rJa•• '-Wpala • •

6, ~J/O~~Jf1 ,the ER diagram obtained from question 5 into a relatiorutl database schema. Indicate
1
-G :)·.......
. ..

•-·Hi;: 1, :·I.. ·.;. :j; '... •

prinu~~ -~ 1
,~ f~reign key on the schem~ and document tile se~n&ry key (if »ny). (5)
Ans. R1el~'..i;.~,·~
-' ::/ ~ase schema .. , . . _.
·: · ':1 . - ·t

2
Professor
name age rank speciality dno
7

.._project
ate sponsor u get pro _ssn

"
~-
i/
B
name age eg__prog no

name Office

dno pc_time

-
W_ork_in
- ,...
emf ssn mi!

Work___proj
prof_ssn Qill.

.(b) Suppose that we have the following three tuples in a state of a relation schema R:-.wifu-~ ~-at!ributes A,. .
B, and C (listed in order): (1, 2, 3), (4, 2, 3) and (5, 3, 3). Which of the fun~onal~; ~~d;;tl~';A rf:s, j3c ·
A and B O _C does not hold on the schema R? Can you identify any functional dependen~ tlfat ll.okls·cm
(5}
R?
At Ans. A·:O B bglds because for every value of A there exists a unique value of B and for the s ~_reas<)ll B

e
C also bolds. But BC A does not hold because for the same pair (2, 3) ,on (B, C) 'there are two

.ditferent.llalues of A, namely 1 and 4.


4

~ .'; - : of Wonootloo foc an art .-um A$~• fo~Willg

· _=·:'-- ::"'---"-#ll!! ! ~ ~:Jjas~J•~on;;:.(;)_f-l flU _OBJECTS. Each ART_OBJECT has a unJque ld_no, an Artist (if
-- '"' = ~:"':£,lfu_;wil)/i~~ag ~(_w~i ~-i~~~~~.1f.~'hwn), a Title, and a -Description. The aft objects ~re cat~9dzed-,
~c;::=-· - - .. :=--.;;.~-=--=.. - E:,-e,,,.---=--:_ ~-
;; ,., '
.=m. sever~_
• .. ? --:• ---=,-· _ C . • • • . • -• ,:"'-. Af
5c..E""· . ""'"c-cP= wp.ys, -~ T-G~H:C'ES-==~ .4!!_1,ggQrized ba:se(l on uieir type. Ther~ are- maµi. typ~: · ·
-:,: .:. :. _.., _,., _ - ~~.: . . ·~=~ - --=.-:= - "";:'
~--:::~~ . .. .:.t~·
. ~--- - -P AINTING,"'SCULPTURE,~~ d""!:iTJ).'fUE;·plus. anothe·r type c_@}ed OTHER ·to accommodate objects tMt,. "'.' ",,
~:7 Jo;~!}all 1n«> ~ne:prthe rhr~-. -;-t,~ -~ i A-P~ING has a Pilfilt_~y:pe (~U, w.;.~·. t~i:ce>ldr~etc;),~ ~ab i a; "·~-
0

. ... - . .. .:. . •· ;··~ - ;.~

on-~~!Ji~ isJ >rawn_o~ (paper, <~a:nvas·, wood, etc,) and Style (mQ<lern, _abstract; eic!);i,/l: S~ ULP:f\JI}E-or , "
a ~tu~ ~ a Material from ~hich it was created (wood, sto~e. etc.), fle,ight, W~lght ~ d Styli A ~ art a ' ' ,i

obje~t i~th~-0TIIBR cai:egiiry has a Type (print, photo, etc.) and Style. ART.:.OB.Jr:CTs ~ -categorized as'<'
·: - • • .: - 0 ' 3
- ;. -., - - ;;;i
either PERMANENT_COLLECI10N (objects that are owned by the museum) and BORROWED.
Information captured a1>out objects in the PERMANENT_COLLECTION includes Date_acquire(' ,: "
(on display, on loan, or stored) and Cost. Information captured about BORROWED objects indod~ the .
Collection from which lt was borrowed, Oate_borrowed and Date_returned. Information describing the ,
counoy or culture of Origin (Italian, Egyptian, American, Indian, and so fonh) and Epoch (Renaissance,
Modem, Ancient, and so fonh) is captured for each ART_OBJECT. The museum keeps track of All'I'rST.. it ->I

information, if known.: Name, Date_bo~ (if known}, ,Date_died (lf not living), Country_of_origin, ·Epodi,:
Main_style and DesO'iption. The Name Js assumed to be unique. Different EXHIBffiONS o~cur,~eifdl ~'" ;-.
- ;;:_· ::. --:; ~.
having a Name, Start_date and End_date. -EXHIBmONS are related to all the art objects diat we_re on ~=;,
dJsplay during the exhibition. _
Or.aw an EER diagram that captures the above information. Indicate key constraints, cartllnality ci:>~traints
and participation constraints. ·(10)
Ans.

You might also like