CSC 451 Practice: Practice Creating A ER Diagram (From Notes Created by Dr. Eric Schwabe)
CSC 451 Practice: Practice Creating A ER Diagram (From Notes Created by Dr. Eric Schwabe)
1$ Entities9 1o create a rectangle for an entity& %rag an% %ro! a +o/ into t e %iagra#$ 8ou can use t e controls aroun% t e s a!e to #o,e an%:or resi-e it as nee%e%$ "ouble-clic) insi%e t e bo/ to enter an%:or e%it te/t 7 w ile %oing t is& you 1
can c oose t e font& si-e& un%erlining& et cetera$ .1 e ste!s for #o,ing an% resi-ing an% a%%ing te/t are t e sa#e for all s a!es$ 8ou can un%o #ost actions wit Ctrl;$2 Create two entities, EMPLOYEE and DEPARTMENT. Be sure that the font is large enough to e reada le ! " usuall# use $%&t or $'&t.
2$ (ttributes9 1o create an o,al for an attribute& %rag an% %ro! a Circle into t e %iagra#& resi-e it to get an o,al& an% a%% t e nee%e% te/t$ 1o connect an attribute to its entity& %rag an% %ro! a 0ine-cur,e connector into t e %iagra#$ Mo,e its en%!oints to t e attribute an% its entity .t ey will auto#atically sna! to t e e%ges2$ Mo,e t e center !oint to #a)e t e connector a straig t line .t ere will be a reference !oint to el! you %o t is2& or rig t-clic) an% c oose 5Set as Straig t 0ine6$ Add the two attri utes E(&lo#ee"D and Na(e and )onne)t the( to EMPLOYEE. Add the two attri utes Na(e and *eadCount and )onne)t the( to DEPARTMENT. Ma+e E(&lo#ee"D the +e# for EMPLOYEE and Na(e the +e# for DEPARTMENT # underlining the(.
<$ Relations i!s9 1o create a %ia#on% for a relations i!& %rag an% %ro! a %ia#on% into t e %iagra# an% a%% t e nee%e% te/t$ 1o connect t e relate% entities& %rag an% %ro! a "yna#ic connector into t e %iagra#$ Mo,e its en%!oints to t e relate% entities .t ey will auto#atically sna! to t e e%ges2& an% if t e connector goes aroun% rat er t an t roug t e %ia#on%& rig t-clic) on t e connector an% c oose 5Straig t connector6$ *f t e connector is ,isible in front of t e %ia#on%& rig t-clic) on t e %ia#on% an% c oose 5S a!e6 5+ring to front6 to #o,e it forwar% an% i%e t e connector$ 1o set t e car%inality at t e en%s of t e connector lines near t e entities& clic) 5*nsert6 51e/t+o/6& ty!ing in t e nee% ,alues an% setting t e font an% or si-e$ Add the relationshi& elongs, to etween EMPLOYEE and DEPARTMENT. Add the relationshi& lines etween the relationshi& dia(ond and the entities. "nsert the M and $ )ardinalit# -alues.
<
4$ "ocu#entation9 .inish # adding a te/t o/ 0as shown elow1 so(ewhere in the diagra( )ontaining #our na(e and 2C3C '4$ Pra)ti)e5. 3a-e #our diagra( in the Drawing for(at ! this will )reate a .-sd file.