Vous êtes sur la page 1sur 9

Deta||ed So|ut|on to Campus nous|ng System Lxerc|se

StepbyStep Gu|de
8u||d|ng Context D|agram Leve|0 D|agram and LkD

Lxamp|e 1he AccommodaLlon Cfflce ln Lhe unlverslLy helps sLudenLs Lo flnd accommodaLlon
lnLeresLed sLudenLs reglsLer Lhelr lnLeresL wlLh Lhe AccommodaLlon Cfflce Cwners of renLal
properLles provlde Lhe AccommodaLlon Cfflce wlLh Lhelr conLacL lnformaLlon and lnformaLlon abouL
Lhe renLal properLy Lhey have avallable (eg locaLlon number of bedrooms monLhly renL) whlch are
enLered lnLo a daLabase SLudenLs can Lhen search Lhls daLabase vla Lhe lnLerneL Lo flnd a properLy
LhaL meeLs Lhelr needs (eg a 2bed aparLmenL for t800 per monLh ln newcasLle) 1he sLudenL Lhen
conLacLs Lhe owner of Lhe renLal properLy by sendlng an emall Lhrough Lhe sysLem Lo arrange a
vlewlng 1he sLudenL meeLs Lhe properLy owner Lo vlew Lhe properLy Cnce a properLy ls renLed Lhe
owner of Lhe properLy calls Lhe AccommodaLlon Cfflce and asks Lhem Lo deleLe Lhe llsLlng
?our Lask ls as follows
(a) reaLe a conLexL dlagram by ldenLlfylng Lhe relevanL process daLa flows and exLernal
enLlLles for Lhe proposed sysLem as deLalled ln Lhe scenarlo above
(b) uecompose Lhls conLexL dlagram Lo a conLexL level0 dlagram by
O ldenLlfylng Lhe processes LhaL represenL Lhe ma[or funcLlons of Lhe sysLem
O Asslgnlng a number Lo each process endlng ln 0 whlch corresponds Lo Lhe level
number of Lhe ulu
O ldenLlfylng Lhe daLa sLores and lncludlng Lhem ln Lhe onLexL Level0 dlagram
O ldenLlfylng any addlLlonal daLaflows beLween Lhe processes and Lhe daLa sLores
(c) reaLe an L8u based on Lhe daLa sLores deLalled ln Lhe ulu lrom revlewlng Lhe above
scenarlo and uslng Lhe crow's fooL noLaLlon
O ldenLlfy and draw approprlaLe enLlLles
O SuggesL some perLlnenL aLLrlbuLes for each enLlLy
O SelecL an ldenLlfler for each enLlLy
O ueflne Lhe relaLlonshlps beLween Lhe enLlLles
O SuggesL a mlnlmum and maxlmum cardlnallLy for each relaLlonshlp
SLaLe clearly any assumpLlons LhaL you make

8u||d|ng Context D|agram

S1L 1 ldenLlfy Lhe CnL process LhaL represenLs Lhe enLlre lnformaLlon sysLem (whaL ls Lhe
maln funcLlon of Lhls sysLem whaL Lhls sysLem does eg looJ OtJetloq 5ystem nltloq 5ystem
kesetvotloo 5ystem)
kULLS onLexL ulagram conLalns only CnL process
1he maln process ls always labelled wlLh 0
onLexL ulagram uCLS nC1 conLaln any daLa sLores
Symbol recLangle wlLh rounded corners
A process musL have aL leasL one lnpuL and one ouLpuL lf an ob[ecL has only
ouLpuLs Lhen lL musL be a source lf an ob[ecL has only lnpuLs Lhen lL musL be a slnk
lnpuLs Lo a process are always dlfferenL Lhan ouLpuLs
LkLkCISL ;estloos to osk WhaL ls Lhe purpose of Lhe sysLem? WhaL does lL do? Aoswet 1he
sysLem helps sLudenLs Lo flnd accommodaLlon 1herefore Lhe CnL process LhaL
represenLs Lhe enLlre sysLem can be called Campus nous|ng System lL can also be
called Student Accommodat|on System 8aslcally we can glve Lhls process any
name as long as lL reflecLs on whaL Lhe sysLem does

S1L2 ldenLlfy exLernal enLlLles sources and slnks A source ls daLa orlgln a slnk ls daLa
desLlnaLlon 1hey are called exLernal enLlLles because Lhey are ouLslde Lhe sysLem
kULLS Symbol recLangle/square
uaLa musL orlglnaLe from one or more sources and Lhe sysLem musL produce
lnformaLlon Lo one or more slnks
Source/slnk reslde ouLslde Lhe sysLem buL lnLeracL wlLh sysLem
An exLernal enLlLy can be boLh a source and a slnk
uaLa can'L be moved from a source Lo a slnk dlrecLly musL be moved by a process
use noun Lo name source/slnk eg stomet
lf any daLa processlng Lakes place lnslde Lhe source/slnk we are noL lnLeresLed ln lL
as Lhls processlng Lakes place ouLslde of Lhe sysLem we are dlagrammlng 1herefore ulus are noL
concerned wlLh
O lnLeracLlons beLween sources and slnks
O whaL a source or slnk does wlLh lnformaLlon or how lL operaLes
O how Lo conLrol or redeslgn a source/slnk
O how Lo provlde sources or slnks dlrecL access Lo sLored daLa
DLIINI1ICNS Source/slnk ls
O AnoLher organlsaLlon or organlsaLlonal unlL LhaL sends daLa Lo or recelves lnformaLlon from
Lhe sysLem eg stomet 8ook loveototy oottol 5ystem AcoJemlc uepottmeot
O A person lnslde or ouLslde Lhe buslness unlL and who lnLeracLs wlLh Lhe sysLem eg
stomet 5ppllet
O AnoLher lnformaLlon sysLem eg looJ OtJetloq 5ystem

5ometlmes stJeots coofse o sotce/slok wltb o ptocess lf Joto ote ptocesseJ lo o pbyslcol locotloo
ooJ ote o pott of tbe system tbeo lts o ptocess lf we ote oot coocetoeJ wbot ls boppeoloq to tbe
Joto ot lt ls oot pott of tbe system tbeo lts o sotce/slok

nIN1 Who or whaL ls glvlng/provldlng lnformaLlon (source) and who or whaL ls
recelvlng/uslng Lhls lnformaLlon (slnk) Powever some scenarlos are very confuslng lor lnsLance
A sofLware company develops and supplles sofLware Lo lLs cusLomers As parL of lLs servlce lL
provldes a Lelephone help desk for cusLomers wlLh querles abouL lLs sofLware producLs When a call
operaLor rece|ves a call Lhey deLermlne Lhe naLure of Lhe call lf a call ls noL speclflcally helpdesk
relaLed Lhe operaLor redlrecLs Lhe call Lo Lhe order processlng deparLmenL of Lhe organlsaLlon
CLherwlse Lhe operaLor dlrecLs Lhe call Lo a consulLanL skllled on Lhe sofLware LhaL Lhe caller needs
help wlLh Cnce a consulLanL answers Lhe call he or she deLermlnes lf Lhls ls Lhe flrsL call from Lhls
cusLomer lf so Lhe consulLanL creaLes a new call reporL Lo keep Lrack of all Lhe lnformaLlon abouL
Lhe problem lf noL Lhe consulLanL asks Lhe cusLomer for a call reporL number and reLrleves Lhe
open call reporL Lo deLermlne Lhe sLaLus of Lhe lnqulry lf a resoluLlon Lo Lhe cusLomers problem has
been found Lhe consulLanL lnforms Lhe cusLomer whaL Lhe resoluLlon ls lndlcaLes LhaL Lhe cusLomer
has been noLlfled and closes ouL Lhe reporL 8ecause an operaLor rece|ves a call (recelves
lnformaLlon) you may Lhlnk LhaL a call operaLor ls a slnk 8uL lf you read furLher Lhe call operaLor
acLually processes recelved lnformaLlon (determ|nes Lhe naLure of Lhe call red|rects Lhe call Lo Lhe
order processlng deparLmenL and d|rects Lhe call Lo a consulLanL) 1herefore don'L lnsLanLly [ump
lnLo concluslon lf you see words recelve/provlde Always read a scenarlo a few Llmes because some
scenarlos are dellberaLely Lrlcky
LkLkCISL ;estloo to osk WhaL lnformaLlon flows wlLhln Lhe sysLem? Aoswet lnformaLlon on
accommodaLlons sLudenL lnformaLlon properLy owner lnformaLlon flow wlLhln Lhe sysLem
;estloos Where does Lhls lnformaLlon orlglnaLe? Who or whaL provldes Lhls lnformaLlon? Aoswet
1he lnformaLlon on accommodaLlons ls provlded by AparLmenL Cwners roperLy owners also
provlde Lhelr conLacL lnformaLlon SLudenLs provlde reglsLraLlon deLalls ;estloo WhaL ls Lhe flnal
desLlnaLlon of Lhe lnformaLlon? Who does recelve Lhls lnformaLlon? Who ls uslng Lhls lnformaLlon?
Aoswet SLudenLs use/recelve Lhls lnformaLlon when searchlng for accommodaLlon 1herefore
exLernal enLlLles are Apottmeot Owoet and 5tJeot Apottmeot Owoet ls boLh sotce (provldes
conLacL and aparLmenL lnformaLlon) and slok (recelves emalls Lo arrange vlewlngs) of Lhe sysLem
5tJeot ls also boLh sotce (provldes reglsLer deLalls) and slok (recelves search resulLs) of Lhe sysLem
S1L3 ldenLlfy Lhe daLaflows beLween Lhe maln process and Lhe sources/slnks
kULLS uaLa flow only ln one dlrecLlon
A fork means LhaL Lhe same daLa go Lo dlfferenL processes/daLa sLores/exLernal
enLlLles
A [oln ln a daLa flow means LhaL Lhe same daLa come from dlfferenL locaLlons and go
Lo Lhe same locaLlon
A daLa flow can'L go dlrecLly back Lo Lhe same process Lhere musL be aL leasL one
more process LhaL daLa have Lo go Lhrough
Look for verbs Lo ldenLlfy daLa flows buL use nouns Lo name Lhem
A daLa flow Lo a daLa sLore means pJote a daLa flow from a daLa sLore means
tettleve
uaLa flows flow from 1)exLernal enLlLy (source) Lo a sysLem 2)sysLem Lo exLernal
enLlLy (slnk) 3) lnLernal symbol Lo lnLernal symbol buL always elLher sLarL or end aL a process
DLIINI1ICNS uaLaflow ls daLa on a move eg cstomet otJet soles tecelpt poycbeck
LkLkCISL ;estloos WhaL lnformaLlon do sources provlde/produce? WhaL lnformaLlon slnks
recelve? WhaL Lype of lnformaLlon flows beLween sources and a maln process and beLween slnks
and Lhe maln process? nIN1 Look for verbs LhaL move daLa! lor lnsLance tecelve ptovlJe qlve or
allke
uaLa llow no 1 Aoswets SLudenLs reg|ster Lhelr lnLeresL wlLh Lhe AccommodaLlon Cfflce" (verb
teqlstet assumes LhaL sLudenLs provlde Lhelr lnformaLlon) Lherefore sLudenLs provlde Lhelr 8eglsLer
ueLalls Pence keqlstet uetolls ls a daLa flow orlglnaLed from a source 5tJeot 8eglsLer ueLalls ls
data on a move because lL was moved from exLernal enLlLy SLudenL Lo Lhe sysLem!
uaLa llow no 2 and 3 Cwners of renLal properLles prov|de Lhe AccommodaLlon Cfflce wlLh Lhelr
onLacL lnformaLlon and lnformaLlon abouL Lhe 8enLal roperLy" Lherefore ootoct lofotmotloo and
Apottmeot lofotmotloo are daLa flows orlglnaLed from a source Apottmeot Owoet onLacL
lnformaLlon
uaLa llow no 4 SLudenLs can Lhen search Lhls daLabase" ln order Lo search sLudenLs musL
provlde lnformaLlon for search crlLerla such as locaLlon prlce range accommodaLlon Lype eLc
1herefore 5eotcb tltetlo fot ltopetty ls anoLher daLa flow whlch ls orlglnaLed from a source
5tJeot
uaLa llow no 3 AfLer ldenLlfylng search crlLerla Lhe sysLem reLurns 5eotcb keslts whlch ls noL ln
Lhe scenarlo buL lL ls a loglcal ouLcome of a search 1herefore 5eotcb keslts ls anoLher daLa flow
slnk 5tJeot recelves Lhls lnformaLlon
uaLa llow no 6 1he sLudenL Lhen contacts Lhe owner of Lhe renLal properLy by send|ng an emall
Lhrough Lhe sysLem Lo arrange a vlewlng" 1herefore moll to Attooqe vlewloq ls anoLher daLa flow
whlch goes Lo slnk Apottmeot Owoet from Lhe maln process
uaLa llow no 7 Cnce Lhe properLy ls renLed Lhe owner of Lhe properLy ca||s Lhe AccommodaLlon
Cfflce and asks Lhem Lo deleLe Lhe llsLlng" Pence ueletloo of ltopetty llstloq ls Lhe lasL daLa flow of
Lhls dlagram Lhls daLa flow ls orlglnaLed from source Apottmeot Owoet










8u||d|ng Leve|0 D|agram

DLIINI1ICN Level0 ulagram ls a daLaflow dlagram LhaL represenLs a sysLem's ma[or processes
daLa flows and daLa sLores aL a hlgher level
kULLS All ulu's ob[ecLs have unlque name excepL when you need Lo repeaL daLa sLore or
exLernal source Lo avold Lhe ulu Lo be Loo crowded lf Lwo daLa flows have Lhe same name means
lL's exacLly Lhe same daLa
no more Lhan 7 processes ln one ulu
When decomposlng a ulu you musL conserve lnpuLs Lo and ouLpuLs from a process
aL Lhe nexL level of decomposlLlon 1hls ls called balanclng
keep exLernal enLlLles on Lhe lefL slde of Lhe dlagram and daLa sLores on Lhe rlghL
slde(Lhls ls [usL advlce)

S1L 1 ldenLlfy Lhe processes LhaL represenL Lhe ma[or funcLlons of Lhe sysLem
DLIINI1ICN rocess ls acLlons performed on daLa eg generaLe paychecks calculaLe overLlme
pay record paymenL
kULLS rocesses labeled 10" 20" 30" eLc (on Level0 ulagram)
A process musL have aL leasL one lnpuL and one ouLpuL lf an ob[ecL has only
ouLpuLs Lhen lL musL be a source lf an ob[ecL has only lnpuLs Lhen lL musL be a slnk
use verb Lo name process (update sLudenL flle)
Loglcal process models omlL any processes LhaL do noLhlng more Lhan move or rouLe
daLa Lhus leavlng Lhe daLa unchanged valld processes lnclude Lhose LhaL
O erform compuLaLlons (eg colclote qtoJe polot ovetoqe)
O ,ake declslons (Jetetmloe ovolloblllty of otJeteJ ptoJcts)
O SorL fllLer or oLherwlse summarlze daLa (lJeotlfy ovetJe lovolces)
O Crganlze daLa lnLo useful lnformaLlon (eg qeoetote o tepott or ooswet o pestloo)
O 1rlgger oLher processes (eg tto oo tbe ftooce or losttct o tobot)
O use sLored daLa (cteote teoJ pJote or Jelete o tecotJ)
LkLkCISL rocess 10 ;estloos 1he maln process of Lhe sysLem ls called ampus Pouslng
SysLem 1he sysLem deals wlLh properLles/houslng/accommodaLlon WhaL ma[or acLlons Lhe ampus
Pouslng SysLem performs ln relaLlon Lo properLles/houslng/accommodaLlon? n|nt lmaglne whaL
musL happen at the very beg|nn|ng ln order for Lhls sysLem Lo work? Aoswets ln order for Lhls
sysLem Lo sLarL worklng Lhe AparLmenL Cwners musL reglsLer Lhelr properLy 8ecause wlLhouL a
supply Lhere can be no demand 1herefore keqlstet ltopetty ls Lhe flrsL ma[or process of Lhe
sysLem and lL ls labeled 10"
rocess20 ;estloo Slnce Lhere are properLles avallable ln Lhe daLabase whaL would be Lhe nexL
loglcal acLlon Lo do wlLh Lhese properLles afLer an AparLmenL Cwner reglsLers Lhelr properLles?
Aoswet erLalnly now sLudenLs can search for a properLy Pence 5eotcb fot ltopetty ls Lhe second
ma[or process lL ls labeled 20"
rocess 30 ;estloos WhaL happens nexL or aL Lhe very end of Lhe maln process? 8aslcally whaL
happens when a properLy ls renLed? Aoswet AfLer a properLy ls renLed lL ls geLLlng deleLed from Lhe
daLabase 1hls process compleLes Lhe procedure of accommodaLlon renLlng 1herefore Lhe flnal
ma[or process of Lhe ampus Pouslng SysLem ls uelete ltopetty llstloq lL ls labeled 30"

S1L 2 uupllcaLe Lhe exLernal enLlLles and daLa flows LhaL you ldenLlfled ln Lhe onLexL
ulagram
kULLS 8a|anc|ng lnpuLs (daLa from a source) ouLpuLs (daLa golng Lo Lhe slnk) and exLernal
enLlLles LhaL are presenL ln onLexL ulu musL be also presenL ln Level0 ulu no new lnpuLs (daLa
flows from sources) Lo Lhe sysLem or ouLpuLs (daLa flows golng Lo slnks) from Lhe sysLem can be
lnLroduced ln Level0 ulu lor lnsLance an exLernal enLlLy SLudenL has 2 lnpuLs lnLo Lhe sysLem
(keqlstet uetolls and 5eotcb tltetlo fot ltopetty) and 1 ouLpuL from Lhe sysLem (5eotcb keslts)
1herefore no new lnpuLs/ouLpuLs can lnLroduced Lo/ouL of Lhe exLernal enLlLy 5tJeot 1he same
rule applles Lo Lhe exLernal enLlLy Apottmeot Owoet Powever afLer ldenLlfylng daLa sLores Lhere
wlll be new daLa flows LhaL flow a) beLween processes b) beLween processes and daLa sLores keep
all exLernal enLlLles on Lhe lefL slde of Lhe dlagram so daLa sLores wlll be on Lhe rlghL slde 1he
dlagram wlll look Lldler and lL wlll be easler Lo ldenLlfy correspondlng daLa flows
1he same exLernal enLlLles and daLa sLores can be repeaLed as many Llmes as
needed ln order Lo avold crowdedness ln a dlagram

S1L 3 ldenLlfy daLa sLores
kULLS uaLa can'L be moved from one daLa sLore Lo anoLher lL musL be moved by a process
uaLa can'L be moved from a source Lo a daLa sLore dlrecLly or from a slnk Lo a daLa
sLore lL musL be moved by a process
use nouns Lo name daLa sLores eg sLudenL records sLudenL flle LranscrlpLs rosLer
of classes
DLIINI1ICN uaLa sLore ls daLa aL resL
LkLkCISL ;estloos Whlch daLa requlre physlcal sLorage? Whlch lnformaLlon musL be saved
so a sysLem user can reLrleve lL when needed? Aoswets lrom a scenarlo glven lL ls clear LhaL Lhe
followlng lnformaLlon needs Lo be recorded SLudenL ueLalls (when sLudenLs reglsLer) roperLy
Cwner onLacL lnformaLlon and roperLy ueLalls 1herefore Lhe followlng daLa sLores can be
ldenLlfled 5tJeot uetolls ltopetty Owoet uetolls and ltopetty uetolls

S1L 4 ldenLlfy addlLlonal daLa flows a) beLween processes b) beLween processes and daLa
sLores
nIN1 AddlLlonal daLa flows ofLen correspond Lo exlsLlng daLa flows lor lnsLance daLa
flow keqlstet uetolls (source 5tJeot provldes personal deLalls ln order Lo reglsLer) would have Lo
have a correspondlng daLa flow golng ouL of Lhe sysLem Lo a daLa sLore 5tJeot uetolls
LkLkCISL lollowlng a glven scenarlo no addlLlonal daLa flows are requlred beLween
processes 1here are addlLlonal daLa flows beLween ldenLlfled processes and daLa sLores
ldenLlfylng addlLlonal daLa flows golng lnLo/ouL of keqlstet ltopetty process uurlng Lhls process
Apottmeot Owoets provlde Lhelr conLacL lnformaLlon and aparLmenL lnformaLlon 1hls lnformaLlon
needs Lo be saved 1herefore Lhere are 2 addlLlonal daLa flows from keqlstet ltopetty process 5ove
ltopetty Owoet uetolls daLa flow golng lnLo ltopetty Owoet uetolls daLa sLore and 5ove ltopetty
uetolls daLa flow golng lnLo ltopetty uetolls daLa sLore n|nt lnlLlally keqlstet ltopetty process had
Lwo daLa flows golng lnLo Lhe process 8emember Lhese Lwo rules 1) process |s act|ons performed
on data 2) process must have at |east one |nput and one output Accordlng Lo Lhe rule no 1
processes perform acLlons on daLa Lherefore keqlstet ltopetty process musL perform some acLlons
wlLh AparLmenL Cwner conLacL lnformaLlon and aparLmenL lnformaLlon Pence lL ls loglcal Lo
assume keqlstet ltopetty process saves Lhls daLa and produces Lwo correspondlng daLa flows 5ove
ltopetty Owoet uetolls and 5ove ltopetty uetolls lollowlng Lhe rule no 2 a process musL have aL
leasL one lnpuL and one ouLpuL lnlLlally process keqlstet ltopetty had only 2 daLa lnpuLs 1herefore
lf daLa go ln (we have Lwo lnpuLs Lo Lhe sysLem Lwo daLa flows) Lhe daLa have Lo go ouL Loo 1ry to
f|nd a correspond|ng output to data |nput 1ry to f|nd a correspond|ng |nput to data output
ldenLlfylng addlLlonal daLa flows golng lnLo/ouL of 5eotcb fot ltopetty process 1here are 2 daLa
flows golng lnLo 5eotcb fot ltopetty process and 2 daLa flows golng ouL of Lhe 5eotcb fot ltopetty
process
keqlstet uetolls daLa flow lnformaLlon on sLudenL goes lnLo 5eotcb fot ltopetty process 1he process
musL perform an acLlon on Lhe daLa Lherefore 5ove 5tJeot uetolls daLa flow ls Lhe loglcal ouLpuL
1hls daLa flow goes lnLo SLudenL ueLalls daLa sLore (Lhls ls Lhe locaLlon where sLudenL deLalls are
saved)
5eotcb tltetlo fot ltopetty daLa flow When a sLudenL ldenLlfles search crlLerla for properLy Lhe
5eotcb fot ltopetty process musL send Lhe crlLerla Lo ltopetty uetolls daLa sLore Lo look for a
properLy hence 5eotcb fot 5ltoble ltopetty daLa flow has been ldenLlfled As a loglcal ouLcome
ltopetty uetolls daLa sLore reLurns resulLs wlLh sulLable properLles Lherefore kettleve 5ltoble
ltopettles daLa flow has been creaLed (5eotcb keslts daLa flow corresponds Lo kettleve 5ltoble
ltopettles daLa flow)
5eoJ moll to Attooqe vlewloq daLa flow ln order Lo send an emall Lo an AparLmenL Cwner Lhe
emall address musL be reLrleved from ltopetty Owoet uetolls daLa sLore 1herefore kettleve moll
AJJtess daLa flow ls requlred
ldenLlfylng addlLlonal daLa flows golng lnLo/ouL of uelete ltopetty process When AparLmenL Cwner
requesLs deleLlon of properLy llsLlng Lhe sysLem sends a requesL Lo deleLe Lhe properLy from
ltopetty uetolls daLa sLore 1herefore Lhere ls one more daLa flow uelete llstloq golng lnLo ltopetty
uetolls daLa sLore from uelete ltopetty llstloq process








8u||d|ng LkD
kULLS Lvery daLa sLore on ulu should correspond Lo an enLlLy on an L8u 1herefore
ltopetty Owoet uetolls ltopetty uetolls and 5tJeot uetolls are enLlLles on Lhe L8u and more
approprlaLe names for Lhese enLlLles would be ltopetty Owoet ltopetty and 5tJeot
uaLa enLlLles are noL sources/slnks sysLem ouLpuLs or sysLem users relaLlonshlps
are noL daLa flows LnLlLles have many lnsLances

S1L 1 ldenLlfy enLlLles LnLlLles are Lhe sub[ecLs/ob[ecLs of a buslness 1hey are Lypes of
people places Lhlngs and maLerlals LhaL are used Lo lnLeracL ln Lhls buslness abouL whlch daLa musL
be malnLalned lor lnsLance we already ldenLlfled ltopetty Owoet ltopetty and 5tJeot enLlLles
ltopetty Owoet and 5tJeot are Lypes of people and daLa abouL Lhese ob[ecLs musL be malnLalned
because a sLudenL can'L search Lhe daLabase unless Lhey reglsLer Lhelr deLalls and a properLy owner
musL record Lhelr deLalls ln order for a sLudenL Lo conLacL Lhem ltopetty ls an ob[ecL of Lhls buslness
whlch daLa musL be malnLalned (Lhe sysLem would noL be able Lo help sLudenLs Lo flnd
accommodaLlon lf lL dldn'L have properLy records) ?ou may have more enLlLles lf you ldenLlfy many
Lomany relaLlonshlps beLween enLlLles or lf an enLlLy wlll have a mulLlvalued aLLrlbuLe 1herefore
more enLlLles may be added durlng sLep 2 (mulLlvalued aLLrlbuLe) or sLep 4 (manyLomany
relaLlonshlps)
S1L 2 ldenLlfy aLLrlbuLes ALLrlbuLes are enLlLy properLles ALLrlbuLes deflne sLrucLure of an
enLlLy
ldenLlfylng aLLrlbuLes of enLlLy ltopetty Cwners of renLal properLles provlde Lhe AccommodaLlon
Cfflce wlLh Lhelr conLacL lnformaLlon" We know from Lhe scenarlo LhaL AccommodaLlon Cwners
provlde Lhelr emall address we can also assume LhaL Lhey musL glve Lhelr name and phone number
1herefore ltopetty Owoet enLlLy has 4 aLLrlbuLes lltst Nome 5toome moll AJJtess and lbooe
Nmbet (we can add more aLLrlbuLes lf we llke)
ldenLlfylng aLLrlbuLes of enLlLy ltopetty Owoet Cwners of renLal properLles provlde Lhe
AccommodaLlon Cfflce wlLh lnformaLlon abouL Lhe renLal properLy eg locaLlon number of
bedrooms monLhly renL 1herefore enLlLy ltopetty has Lhe followlng aLLrlbuLes locotloo Nmbet
of 8eJtooms and Mootbly keot LocaLlon ls really Address Address conLalns of a few llnes
Lherefore aLLrlbuLe locotloo becomes Address lloe 1 AJJtess lloe 2 AJJtess lloe J and AJJtess
lloe 4 aLLrlbuLes
ldenLlfylng aLLrlbuLes of enLlLy 5tJeot lnLeresLed sLudenLs reglsLer Lhelr lnLeresL wlLh Lhe
AccommodaLlon Cfflce" 1he scenarlo does noL speclfy whlch lnformaLlon Lhe sLudenLs have Lo
provlde ln order Lo reglsLer buL we can assume LhaL sLudenLs musL provlde Lhelr lltst Nome
5toome moll AJJtess and lbooe Nmbet (we can add more aLLrlbuLes lf we llke)

S1L 3 ldenLlfy a prlmary key for each enLlLy
LnLlLy ltopetty ltopetty lu
LnLlLy ltopetty Owoet ltopetty Owoet lu
LnLlLy 5tJeot 5tJeot lu
S1L 4 ,ake assumpLlons deflne Lhe relaLlonshlps beLween enLlLles and suggesL mlnlmum
and maxlmum cardlnallLy
AssumpLlons
O ltopetty Owoet and ltopetty enLlLles A properLy owner can have many properLles llsLed buL
musL aL leasL have one properLy A properLy musL belong Lo one properLy owner 1herefore
a relaLlonshlp beLween enLlLles ltopetty Owoet and ltopetty ls ooetomooy ardlnallLy on
Lhe slde of Lhe ltopetty enLlLy ls mlnlmum 1 and maxlmum many (mooJototy mooy
cardlnallLy) and cardlnallLy on Lhe slde of Lhe ltopetty Owoet enLlLy ls mooJototy 1
cardlnallLy
O 5tJeot and ltopetty enLlLles A sLudenL geLs reglsLered only lf Lhey renL a properLy A
reglsLered sLudenL musL renL aL leasL one properLy and a sLudenL can'L renL more Lhan 1
aparLmenL A properLy can be renLed by many sLudenLs or lL may noL be renLed aL all (renLed
by 0 sLudenLs) 1herefore a relaLlonshlp beLween enLlLles ltopetty and 5tJeot ls ooeto
mooy ardlnallLy on Lhe slde of Lhe ltopetty enLlLy ls mooJototy1 cardlnallLy and on Lhe
slde of Lhe 5tJeot enLlLy ls mlnlmum 0 and maxlmum many (optloool zetomooy
cardlnallLy)

Vous aimerez peut-être aussi