You are on page 1of 3

Due D

Date: Mon 29th Sept, 2014


Univeersity of Engineerin
E
ng & Technology, Peeshawar
Dept.. of Computer Systems Engin
neering
Databasee Management Systtems Falll 2014
Assignmen
A
nt No. 1 - SSolution

PROBLE
EMS & EXE
ERCISES
1. For each of th
he followin
ng pairs off related eentities, ind
dicate whetther there is a
o-many relationship. Then, usin
ng the shorthand notation
one-tto-many orr a many-to
introduced in the text, draw
w a diagram for each of the relation
nships.
a..STUDENTandCOURSSE(studentssregisterforrcourses)
Answer:Ma
A
nytoMany
yRelationsh
hip

b.BOOKand
dBOOKCOP
PY(booksha
avecopies)
Answer:On
A
etoManyR
Relationship
p

c..COURSEandSECTION
N(coursesh
havesectionss)
Answer:On
A
etoManyR
Relationship
p

d.SECTIONandROOM(sectionsareescheduledinrooms)
etoManyR
Answer:On
A
Relationship
p
Page1of3

TORandCO
OURSE
e..INSTRUCT
Answer:Ma
A
nytoMany
yRelationsh
hip

2. A driivers license bureau maintains


m
a database
d
of licensed drrivers. State whether eaach of
the following
f
reepresents data
d
or mettadata. If itt representss data, statte whether it is
strucctured or un
nstructured data. If itt representss metadata,, state whetther it is a fact
descrribing a pro
operty of datta or a fact describing
d
th
he context o
of data.
a.. Driversnaame,addresss,andbirthd
date
Answer:Stru
A
ucturedDattaasitrepre
esentsattrib utesofdriv
ver.Structureddatacanbe
sttoredintablles.

a30characteerfield
b.Thefactthatthedriverrsnameisa
Answer:Me
A
tadata.Itisafactdescriibingpropeertyofdata:drivernamee.

mageofthed
driver
c..Aphotoim
Answer:Uns
A
structuredD
Data.Cantb
besavedorstoredintab
ble/schema..(Note:Worrd
docs,pdfs,t
d
textfiles,au
udiofiles,prresentationss,videos,im
mages,instan
ntmsgs,text
msgs,etcall
m
areunstructtureddata)

d.Animageo
ofthedriverrsfingerprin
nt
Answer:Uns
A
structuredD
Data.Cantb
besavedorstoredintab
ble/schema..

e.. The makee and seriall number off the scann


ning device that was u
used to scan
n the
fiingerprint
Answer:Stru
A
ucturedDatta.Asmakeandserialn
numberofsccanningdev
viceusedtoscan
fiingerprintcanbestored
dintable/schema.

f.Theresoluttion(inmega
apixels)ofth
hecamerath
hatwasused
dtophotogrraphthedriv
ver
Page2of3

Answer:Me
A
tadata.Itisafactdescriibingtheco
ontextofdatta.

g.Thefactthatthedriverrsbirthdateemustpreceedetodaysd
datebyatleeast16years
Answer:Me
A
tadata.Itisafactdescriibingtheco
ontextofdatta:driversb
birthdate.

3. Draw
w a single ER
E diagram
m that repreesents the ffollowing reelationshipss in the hosspital
envirronment.

AHOSPITAL
A
Lhasonitssstaffoneorm
morePHYSIICIANs.AP
PHYSICIAN
Nisonthesttaffof
on
nlyoneHOS
SPITAL.

APHYSICIA
A
ANmayadm
mitoneormo
orePATIEN
NTs.APATIE
ENTisadmittedbyonly
yone
PHYSICIAN..

A
A HOSPITA
AL has one or more WARDs.
W
Eaach WARD is located in exactly
y one
HOSPITAL.
H

AWARD
A
hass any numbeer of EMPLO
OYEEs. An EMPLOYEE
E may work
k in one or more
WARDs.
W

Answ
wer:

Good Lu
Luck
Page3of3

You might also like