List of commits:
Subject Hash Author Date (UTC)
er updated 69bb6e5cfd8f31c5347d8b6b6e9e3a4e5ef6580c Poonam Veeral 2020-04-08 12:51:37
er deleted 3543da66bdd8adff409cf79707fb11584b490f67 Poonam Veeral 2020-04-08 12:41:23
fd updated 0a92b326fdc2fea4cd908c6ca4d14b2d635e1728 Poonam Veeral 2020-04-08 12:40:47
fd deleted 8ba0a92ca38f25f6bb10b68d27e0cfb5b8719a3f Poonam Veeral 2020-04-08 12:36:42
misc updated 37bac44c663e91e07d28a76031aef855907e097d Poonam Veeral 2020-04-08 12:36:01
misc deleted 3a5c7e6b44694169109a1fb71e2f23508708dd67 Poonam Veeral 2020-04-08 12:35:23
rel_mod updated d20af615ee586d57e85b873f28174870cf33d574 Poonam Veeral 2020-04-08 12:34:37
deleted dc4debbc6caa6857438051f3591b692186878392 Poonam Veeral 2020-04-08 12:33:42
rel_mod updated e75e40028412899276f36b55ddf8856d47e1b1dc Poonam Veeral 2020-04-08 12:31:58
uml updated 66ee8ea267cb09112b0eae2b106936f81caa1d79 Poonam Veeral 2020-04-08 12:25:06
uml folder deleted 219c795f28525733c62e7cfffecc9339295c492e Poonam Veeral 2020-04-08 12:22:59
uml folder updated f1a1e6532efb36ac4df1e20ebe6fc7dc21f3d70c Poonam Veeral 2020-04-07 19:55:02
img folder updated 57c7ea4b6eebae552a5ca1667ccdba7c16f18a9d Poonam Veeral 2020-04-07 19:42:45
img folder deleted 79804ff5740d2a8256dd42bfe909e9abd079bd01 Poonam Veeral 2020-04-07 19:41:58
Update lectures_notes.md 764f19778c397d6b592b88945e6c803ea9e33b75 poonamveeral 2020-04-07 19:23:21
Update lectures_notes.md 75ce1301b80c1f8a23dc88b9033c581b7c287de5 poonamveeral 2020-04-07 19:14:57
Update lectures_notes.md c568007f7cecde6171535a30b15f97bc6b561db0 Poonam Veeral 2020-04-07 19:06:47
img Folder Naming Convention Updated 76e82959772152908a87a52a0645783eb6afc0ed Poonam Veeral 2020-04-07 18:54:54
Rename Shiporder.xml to shipOrder.xml 5bc4b056c197102d04eedaac06272a344de7d63b poonamveeral 2020-04-07 18:33:27
Rename Customers.xml to customers.xml 67086df0a0bc3496bb83321a3d0686dadb782519 poonamveeral 2020-04-07 18:33:07
Commit 69bb6e5cfd8f31c5347d8b6b6e9e3a4e5ef6580c - er updated
Author: Poonam Veeral
Author date (UTC): 2020-04-08 12:51
Committer name: Poonam Veeral
Committer date (UTC): 2020-04-08 12:51
Parent(s): 3543da66bdd8adff409cf79707fb11584b490f67
Signer:
Signing key:
Signing status: N
Tree: 2fc81bff1e33ffaad25b7911f20314c18e931afc
File Lines added Lines deleted
notes/fig/er/abstract.tex 10 0
notes/fig/er/accident.tex 25 0
notes/fig/er/account.tex 10 0
notes/fig/er/alt_Not_01.tex 10 0
notes/fig/er/alt_Not_02.tex 10 0
notes/fig/er/alt_Not_03.tex 39 0
notes/fig/er/award.tex 66 0
notes/fig/er/bad_design.tex 20 0
notes/fig/er/belongs.tex 10 0
notes/fig/er/bike.tex 50 0
notes/fig/er/binary_lecture_notes.tex 11 0
notes/fig/er/book_01.tex 10 0
notes/fig/er/book_02.tex 12 0
notes/fig/er/car_info.tex 31 0
notes/fig/er/cell_phone.tex 13 0
notes/fig/er/comp_os.tex 10 0
notes/fig/er/computer.tex 13 0
notes/fig/er/computer_user.tex 12 0
notes/fig/er/constraint_01.tex 10 0
notes/fig/er/constraint_02.tex 10 0
notes/fig/er/contains.tex 10 0
notes/fig/er/country.tex 40 0
notes/fig/er/customers.tex 28 0
notes/fig/er/dependent.tex 16 0
notes/fig/er/desk.tex 13 0
notes/fig/er/doula.tex 12 0
notes/fig/er/entity_instructor.tex 20 0
notes/fig/er/example_of_derived.tex 11 0
notes/fig/er/gym.tex 10 0
notes/fig/er/job.tex 64 0
notes/fig/er/key_opens_door.tex 10 0
notes/fig/er/library.tex 61 0
notes/fig/er/mapping_relationships_01.tex 12 0
notes/fig/er/mapping_relationships_02.tex 12 0
notes/fig/er/membership.tex 11 0
notes/fig/er/naming.tex 16 0
notes/fig/er/naming_short_01.tex 11 0
notes/fig/er/naming_short_02.tex 8 0
notes/fig/er/parents.tex 11 0
notes/fig/er/person.tex 12 0
notes/fig/er/pet_01.tex 15 0
notes/fig/er/pet_02.tex 13 0
notes/fig/er/pet_03.tex 21 0
notes/fig/er/phone_carrier_01.tex 15 0
notes/fig/er/phone_carrier_02.tex 14 0
notes/fig/er/pilot.tex 17 0
notes/fig/er/printer.tex 12 0
notes/fig/er/produces.tex 11 0
notes/fig/er/record.tex 62 0
notes/fig/er/rel_instance.tex 28 0
notes/fig/er/role_name_01.tex 10 0
notes/fig/er/role_name_02.tex 11 0
notes/fig/er/role_name_03.tex 11 0
notes/fig/er/software_dep.tex 14 0
notes/fig/er/song.tex 22 0
notes/fig/er/stays_at.tex 14 0
notes/fig/er/teaches.tex 11 0
notes/fig/er/template.def 79 0
notes/fig/er/ternary_lecture_notes.tex 10 0
File notes/fig/er/abstract.tex added (mode: 100644) (index 0000000..5a6dc59)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (A) {A};
6 \node [relationship] (R) [right=of A] {R} edge node[above]{$\cM$} (A);
7 \node [entity] (B) [right = of R] {B} edge[total] node[above]{$1$} (R);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/accident.tex added (mode: 100644) (index 0000000..ea306b2)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (person) {Person};
6 \node[attribute] (pid) [left of=person] {\key{id}} edge (person);
7 \node[attribute] (name) [above left of=person] {Name} edge (person);
8 \node[attribute] (address) [below left of=person] {address} edge (person);
9
10 \node[relationship] (owns) [above right of=person] {Owns} edge node[above, sloped]{$M$} (person);
11 \node[entity] (car) [above right of=owns] {Car} edge node[above, sloped]{$N$} (owns);
12 \node[attribute] (licence) [above left of=car] {\key{licence}} edge (car);
13 \node[attribute] (model) [above of =car] {model} edge (car);
14 \node[attribute] (year) [above right of =car] {year} edge (car);
15
16 \node[relationship] (accident) [right = 5cm of person] {Accident} edge[total] node[above, sloped]{$M$} (person);
17 \node[attribute] (report_number) [below of = accident] {\key{Report Number}} edge (accident);
18 \node[attribute] (time) [right of = accident] {Time} edge (accident);
19 \node[attribute] (place) [below right of = accident] {Place} edge (accident);
20 \node[attribute] (damage_amount) [above right of = accident] {Damage\_Amount} edge (accident);
21
22 \draw (car) edge[total] node[above, sloped]{$N$} (accident);
23 \end{tikzpicture}
24
25 \end{document}
File notes/fig/er/account.tex added (mode: 100644) (index 0000000..97ff7df)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (CUSTOMER) {CUSTOMER};
6 \node [relationship] (POSSESSES) [right=of CUSTOMER] {POSSESSES} edge node[above]{$1$} (CUSTOMER);
7 \node [entity] [right = of POSSESSES] {ACCOUNT} edge node[above]{$\cN$} (POSSESSES);
8 \node [entity] [below = of POSSESSES] {BANK} edge node[left]{$1$} (POSSESSES);
9 \end{tikzpicture}
10 \end{document}
File notes/fig/er/alt_Not_01.tex added (mode: 100644) (index 0000000..5b640e2)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (CAR) {CAR};
6 \node [relationship] (CARPOOLING) [right=of CAR] {CARPOOLING} edge[total] node[above]{$\cN$} (CAR);
7 \node [entity] (PERSON) [right = of CARPOOLING] {PERSON} edge node[above]{$\cM$} (CARPOOLING);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/alt_Not_02.tex added (mode: 100644) (index 0000000..30fd034)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (CAR) {CAR};
6 \node [relationship] (CARPOOLING) [right=of CAR] {CARPOOLING} edge node[above]{$(1,5)$} (CAR);
7 \node [entity] (PERSON) [right = of CARPOOLING] {PERSON} edge node[above]{$(0, 3)$} (CARPOOLING);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/alt_Not_03.tex added (mode: 100644) (index 0000000..0cddaad)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 % Above
6 \node (A) {};
7 \node [relationship] (R) [right=of A] {} edge node[above]{$1$} (A);
8 \node (B) [right = of R] {} edge node[above]{$\cN$} (R);
9
10 \node (ar) [right of = B] {\(\Rightarrow\)};
11
12 \node (A1) [right of = ar] {};
13 \node [relationship] (R1) [right=of A1] {} edge node[above]{$(0, \cN)$} (A1);
14 \node (B1) [right = of R1] {} edge node[above]{$(0,1)$} (R1);
15
16 % Middle
17 \node (A2) [below of = A] {};
18 \node [relationship] (R2) [right=of A2] {} edge[total] node[above]{$1$} (A2);
19 \node (B2) [right = of R2] {} edge node[above]{$\cN$} (R2);
20
21 \node (ar1) [right of = B2] {\(\Rightarrow\)};
22
23 \node (A21) [right of = ar1] {};
24 \node [relationship] (R21) [right=of A21] {} edge node[above]{$(1, \cN)$} (A21);
25 \node (B21) [right = of R21] {} edge node[above]{$(0,1)$} (R21);
26
27 % Below
28 \node (A3) [below of = A2] {};
29 \node [relationship] (R3) [right=of A3] {} edge[total] node[above]{$\cM$} (A3);
30 \node (B3) [right = of R3] {} edge[total] node[above]{$\cN$} (R3);
31
32 \node (ar2) [right of = B3] {\(\Rightarrow\)};
33
34 \node (A5) [right of = ar2] {};
35 \node [relationship] (R5) [right=of A5] {} edge node[above]{$(1, \cN)$} (A5);
36 \node (B5) [right = of R5] {} edge node[above]{$(1, \cM)$} (R5);
37 \end{tikzpicture}
38
39 \end{document}
File notes/fig/er/award.tex added (mode: 100644) (index 0000000..fc876ea)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=1.5cm]
5 \node[entity] (INSTITUTION) {INSTITUTION};
6 \node[attribute] [above of=INSTITUTION] {\key{Name}} edge (INSTITUTION);
7 \node[attribute] [right = .5cm of INSTITUTION] {Phone} edge (INSTITUTION);
8 \node[attribute] (Address) [below = .5cm of INSTITUTION] {Address} edge (INSTITUTION);
9 \node[attribute] [left = .5cm of Address] {Street} edge (Address);
10 \node[attribute] [below = .5cm of Address] {Zip} edge (Address);
11 \node[attribute] [below left = .5cm of Address] {City} edge (Address);
12 \node[attribute] (Location) [below right = .5cm of Address] {Location} edge (Address);
13 \node[attribute] [below = .5cm of Location] {Country} edge (Location);
14 \node[attribute] [below right = .5cm of Location] {State} edge (Location);
15 \node[derived attribute] [right = .5cm of Location] {Code} edge (Location);
16 %
17 \node[relationship] (AWARDEDTO) [left = 1.5cm of INSTITUTION] {AWARDED\_TO} edge node[above, pos=0.4] {$\cN$} (INSTITUTION);
18 %
19 \node[entity] (AWARD) [left = 1.5cm of AWARDEDTO] {AWARD} edge[total] node[above, pos=0.6]{$\cM$} (AWARDEDTO);
20 \node[attribute] [below right = .5cm and .5cm of AWARD] {Title} edge (AWARD);
21 \node[attribute] [left = .5cm of AWARD] {Amount} edge (AWARD);
22 \node[attribute] (Period) [below left = .5cm of AWARD] {Period} edge (AWARD);
23 \node[attribute] [below left = .5cm of Period] {Start} edge (Period);
24 \node[attribute] [below = .5cm of Period] {End} edge (Period);
25 \node[attribute] [above right of = AWARD] {\key{id}} edge (AWARD);
26 \node[attribute] [above = 1cm of AWARD] {Program Officier} edge (AWARD);
27 %
28 % \node[relationship] (EMPLOYS) [below =0.8cm of INSTITUTION] {EMPLOYS} edge node[right, pos=0.4] {$\cN$} (INSTITUTION);
29 %
30 \node[entity] (RESEARCHER) [below = 5cm of AWARD] {RESEARCHER};
31
32 \node[attribute] (Name) [left = 0.5cm of RESEARCHER] {Name} edge (RESEARCHER);
33 \node[attribute] [above left = 0.5cm and 0.5cm of Name] {First Name} edge (Name);
34 \node[attribute] [below left = 0.5cm of Name] {Last Name} edge (Name);
35 \node[attribute] [below = 0.5cm of RESEARCHER] {\key{email}} edge (RESEARCHER);
36
37 \node[relationship] (CONDUCTEDBY) [below = 1 cm of AWARD] {CONDUCTED\_BY} edge[total] node[right, pos=0.4] {$\cM$} (AWARD) edge node[left]{$\cN$} (RESEARCHER);
38 \node[attribute] [right = .5cm of CONDUCTEDBY] {Role} edge (CONDUCTEDBY);
39
40 \node[attribute] (RePeriod) [right = .5cm of RESEARCHER] {Period} edge (RESEARCHER);
41 \node[attribute] [above right = .5cm of RePeriod] {Start} edge (RePeriod);
42 \node[attribute] [below right = .5cm of RePeriod] {End} edge (RePeriod);
43
44 \node[entity] (ORGANIZATION) [left = 3cm of AWARD] {ORGANIZATION};
45 \node[attribute] [below = .5cm of ORGANIZATION] {Code} edge (ORGANIZATION);
46
47 \node[relationship] (GRANTS) [above left = 1cm and 1.5cm of AWARD] {GRANTS} edge node[above]{$1$} (ORGANIZATION) edge[total] node[above right]{$\cM$}(AWARD);
48
49 \node[entity] (DIRECTORATE) [left = 1.5cm of ORGANIZATION] {DIRECTORATE};
50
51 \node[attribute] [below right = .5cm and 0 of DIRECTORATE] {Name} edge (DIRECTORATE);
52 \node[attribute] [below left = .5cm and 0cm of DIRECTORATE] {Abbreviation} edge (DIRECTORATE);
53 \node[attribute] [below = 1.3cm of DIRECTORATE] {Assistant Director} edge (DIRECTORATE);
54
55
56 \node[relationship] (BELONG1) [above left = 1cm and 0cm of ORGANIZATION] {BELONGS\_TO} edge node[above]{$\cN$} (ORGANIZATION) edge node[above =0.2cm]{$\cM$}(DIRECTORATE);
57
58 \node[entity] (DIVISION) [left = 1.5cm of DIRECTORATE] {DIVISION};
59
60 \node[attribute] [left = .5cm of DIVISION] {Name} edge (DIVISION);
61 \node[attribute] [below left = 1cm of DIVISION] {Abbreviation} edge (DIVISION);
62
63 \node[relationship] (BELONG2) [above left = 1cm and 0cm of DIRECTORATE] {BELONGS\_TO} edge node[above]{$1$} (DIRECTORATE) edge[total] node[above=0.2cm ]{$\cM$}(DIVISION);
64 \end{tikzpicture}
65
66 \end{document}
File notes/fig/er/bad_design.tex added (mode: 100644) (index 0000000..93f742d)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=2em]
5 \node[entity] (people) {PEOPLE};
6 \node[relationship] (has) [right=of people] {HAS} edge (people);
7 \node[entity] (job) [right = of has] {JOB} edge (has);
8 \node[relationship] (in) [above=of job] {IN} edge (job);
9 \node[entity] (employer) [above=of in] {EMPLOYER} edge (in);
10
11 \draw [->, >=latex] (has)+(0, -1) -- ++(0, -2);
12
13 \node[entity] (person) [below right = 6.5 and -2.5 of people] {PERSON};
14 \node[relationship] (occupies) [right=of person] {OCCUPIES} edge (person);
15 \node[entity] (position) [right = of occupies] {POSITION} edge (occupies);
16 \node[relationship] (offers) [above=of position] {OFFERS} edge (position);
17 \node[entity] (company) [above=of offers] {COMPANY} edge (offers);
18 \end{tikzpicture}
19
20 \end{document}
File notes/fig/er/belongs.tex added (mode: 100644) (index 0000000..749e7b2)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[relationship] (contains){BELONGS};
6 \node[entity] (burger) [left = 1cm of contains] {HAND} edge node[above] {$N$} (contains);
7 \node[entity] (ingredient) [right = 1cm of contains] {PERSON} edge node[above]{$1$} (contains);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/bike.tex added (mode: 100644) (index 0000000..5df1fda)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=1.5cm]
5 \node[entity] (CUSTOMER) {CUSTOMER};
6 \node[attribute] [above of=CUSTOMER] {\key{Name}} edge (CUSTOMER);
7 \node[attribute] [right = .5cm of CUSTOMER] {Phone} edge (CUSTOMER);
8 %
9 \node[ident relationship] (DROPPEDBY) [left = 1.5cm of CUSTOMER] {DROPPED\_BY} edge node[above, pos=0.4] {$1$} (CUSTOMER);
10 %
11 \node[weak entity] (BIKE) [left = 1.5cm of DROPPEDBY] {BIKE} edge[total] node[above, pos=0.6]{$\cM$} (DROPPEDBY);
12 \node[attribute] [above of = BIKE] {\pkey{Dropped\_Time\_Date}} edge (BIKE);
13 \node[attribute] (Description) [left = 0.5cm of BIKE] {Description} edge (BIKE);
14 \node[attribute] [above left of = Description] {Color} edge (Description);
15 \node[attribute] [below left of = Description] {Brand} edge (Description);
16 %
17 \node[relationship] (ASSIGNEDTO) [below =1cm of CUSTOMER] {ASSIGNED\_TO} edge [total] node[right, pos=0.4] {$\cM$} (CUSTOMER);
18 \node[attribute] [right = .5cm of ASSIGNEDTO] {Level\_Of\_Satisfaction} edge (ASSIGNEDTO);
19 %
20 \node[entity] (EMPLOYEE) [below = 5cm of CUSTOMER] {EMPLOYEE} edge node[right, pos=0.4] {$1$} (ASSIGNEDTO);
21 \node[attribute] [right = .5cm of EMPLOYEE] {\key{Name}} edge (EMPLOYEE);
22 \node[multi attribute] [below = .5cm of EMPLOYEE] {Specialty} edge (EMPLOYEE);
23 %
24 \node[relationship] (REPAIREDBY) [below right =3cm of BIKE] {REPAIRED\_BY} edge node[below, pos=0.6] {$\cM$} (BIKE) edge node[below, pos=0.6] {$1$} (EMPLOYEE);
25
26
27 %\node[entity] (CUSTOMER) {CUSTOMER};
28 %
29 %
30 %
31 %\node[relationship] (SPEAKS) [below right of=CUSTOMER] {SPEAKS} edge node[right, pos=0.4] {$M$} (CUSTOMER);
32 %\node[entity] (LANGUAGE) [below right of=SPEAKS] {LANGUAGE} edge node[right, pos=0.5] {$N$} (SPEAKS);
33 %\node[attribute] (code) [left of = LANGUAGE] {\key{Code}} edge (LANGUAGE);
34 %\node[attribute] (symbol) [right of = LANGUAGE] {Name} edge (LANGUAGE);
35 %
36 %\node[relationship] (BWF) [below of = LANGUAGE] {B\_W\_F};
37 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (BWF.west);
38 %\draw (LANGUAGE) to node[right, pos=0.6] {$M$} (BWF.east);
39 %
40 %
41 %\node[multi attribute] (color) [right =1cm of anthem] {Creator} edge (anthem);
42
43 %
44 %\node[relationship] (WIN) [above right of =LANGUAGE] {W\_IN};
45 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (WIN);
46 %\draw (anthem) to node[right, pos=0.6] {$M$} (WIN);
47
48 \end{tikzpicture}
49
50 \end{document}
File notes/fig/er/binary_lecture_notes.tex added (mode: 100644) (index 0000000..be9feb2)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (CLASS) {CLASS};
6 \node [entity] (PROFESSOR) [right = 6cm of CLASS] {PROFESSOR};
7 \node [entity] (LECTURE NOTES) [below right = of CLASS] {LECTURE NOTES};
8 \node [relationship] (USES) [below = 1cm of CLASS] {USES} edge node[left]{$\cM$} (CLASS) edge node[above]{$\cN$} (LECTURE NOTES);
9 \node [relationship] (WRITTEN BY) [below =.4cm of PROFESSOR] {WRITTEN BY} edge node[above]{$\cM$} (LECTURE NOTES) edge node[right]{$\cN$} (PROFESSOR);
10 \end{tikzpicture}
11 \end{document}
File notes/fig/er/book_01.tex added (mode: 100644) (index 0000000..5a8e81e)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (PERSON) {PERSON};
6 \node [relationship] (BOUGHT) [right=of PERSON] {BOUGHT} edge node[above]{$\cM$} (PERSON);
7 \node [entity] [right = of BOUGHT] {BOOK} edge node[above]{$\cN$} (BOUGHT);
8 \node [entity] [below = of BOUGHT] {BOOKSHOP} edge node[left]{$\cO$} (BOUGHT);
9 \end{tikzpicture}
10 \end{document}
File notes/fig/er/book_02.tex added (mode: 100644) (index 0000000..1376859)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node [entity] (PERSON) {PERSON};
6 \node [relationship] (POSSESSES) [right=of PERSON] {POSSESSES} edge node[above]{$1$} (PERSON);
7 \node [entity] (BOOK) [right = of POSSESSES] {BOOK} edge node[above]{$\cN$} (POSSESSES);
8 \node [relationship] (SELLS) [below left = 1cm of BOOK] {SOLD BY} edge node[below right]{$\cM$} (BOOK);
9 \node [entity] (BOOKSHOP) [below = of POSSESSES] {BOOKSHOP} edge node[left]{$\cO$} (SELLS);
10 \node [relationship] (VISITS) [below right = 1.8cm of PERSON] {VISITS} edge node[above right]{$\cN$} (BOOKSHOP) edge node[above right]{$\cO$} (PERSON);
11 \end{tikzpicture}
12 \end{document}
File notes/fig/er/car_info.tex added (mode: 100644) (index 0000000..84ac4fb)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (person) {PERSON};
6 \node[attribute] (pid) [left of=person] {\key{ID}} edge (person);
7 \node[attribute] (name) [above left of=person] {Name} edge (person);
8 \node[multi attribute] (phone) [above of=person] {Phone} edge (person);
9 \node[attribute] (address) [above right of=person] {Address} edge (person);
10 \node[attribute] (street) [above right of=address] {Street} edge (address);
11 \node[attribute] (city) [right of=address] {City} edge (address);
12 %\node[derived attribute] (age) [right of=person] {Age} edge (person);
13
14 \node[relationship] (drives) [below right of=person] {DRIVES} edge node[above, pos=0.1] {$1$} (person);
15 \node[entity] (car) [below left of=drives] {CAR} edge node[above, pos=0.7] {$1$} (drives);
16 \node[attribute] (make) [left of=car] {Make} edge (car);
17 \node[attribute] (year) [below left of =car] {Year} edge (car);
18 \node[attribute] (brand) [below of =car] {Brand} edge (car);
19
20 \node[relationship] (seats) [below left of=person] {SEATS\_IN} edge node[above, pos=0.1] {$N$} (person);
21 \draw (seats) edge node[above, pos=0.3] {$1$} (car);
22 \node[attribute] (position) [left of=seats] {Position} edge (seats);
23
24 \node[ident relationship] (insured) [right of=car] {INSURED} edge node[above, pos=0.3] {$1$} (car);
25 \node[weak entity] (insurance) [right = 1cm of insured] {CAR\_INSURANCE} edge[total] node[above, pos=0.7] {$N$} (insured);
26 \node[attribute] (amount) [above of =insurance] {Covered Amount} edge (insurance);
27 \node[attribute] (policy) [above right of =insurance] {Policy Number} edge (insurance);
28 \node[attribute] (company) [below right of =insurance] {Company Name} edge (insurance);
29 \end{tikzpicture}
30
31 \end{document}
File notes/fig/er/cell_phone.tex added (mode: 100644) (index 0000000..57150ac)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (cellphone) {CELLPHONE};
6 \node[attribute] (mid) [left of=cellphone] {\key{MIN}} edge (cellphone);
7 \node[multi attribute] (app) [above of=cellphone] {App\_Installed} edge (cellphone);
8 \node[attribute] (plan) [right of=cellphone] {Plan} edge (cellphone);
9 \node[attribute] (carrier) [above right of=plan] {Carrier} edge (plan);
10 \node[attribute] (price) [right of=plan] {Price} edge (plan);
11 \end{tikzpicture}
12
13 \end{document}
File notes/fig/er/comp_os.tex added (mode: 100644) (index 0000000..cb96fd5)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (os) {O.S.};
6 \node [relationship] (installed) [right=of os] {IS SUPPORTED BY} edge node[above]{$\cN$} (os);
7 \node [entity] (comp) [right = of installed] {COMPUTER} edge[total] node[above]{$\cM$} (installed);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/computer.tex added (mode: 100644) (index 0000000..01d6437)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (computer) {COMPUTER};
6 \node[attribute] (pid) [left of=computer] {\key{Id}} edge (computer);
7 \node[multi attribute] (os) [above of=computer] {Operating\_System} edge (computer);
8 \node[attribute] (devices) [right of=computer] {Devices} edge (computer);
9 \node[attribute] (mouse) [above right of=devices] {Mouse} edge (devices);
10 \node[attribute] (keyboard) [right of=devices] {Keyboard} edge (devices);
11 \end{tikzpicture}
12
13 \end{document}
File notes/fig/er/computer_user.tex added (mode: 100644) (index 0000000..da638ea)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (COMPUTER) {COMPUTER};
6 \node[attribute] (mid) [left of=COMPUTER] {\key{MAC}} edge (COMPUTER);
7 \node[multi attribute] (User) [right of=COMPUTER] {User} edge (COMPUTER);
8 \node[attribute] [above right of=User] {Name} edge (User);
9 \node[attribute] [right of=User] {Email} edge (User);
10 \end{tikzpicture}
11
12 \end{document}
File notes/fig/er/constraint_01.tex added (mode: 100644) (index 0000000..bdcd8e2)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (course) {COURSE};
6 \node [relationship] (offeredby) [right=of course] {OFFERED\_BY} edge node[above]{$\cN$} (course);
7 \node [entity] (department) [right = of offeredby] {DEPARTMENT} edge node[above]{$1$} (offeredby);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/constraint_02.tex added (mode: 100644) (index 0000000..1e613c0)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (course) {COURSE};
6 \node [relationship] (offeredby) [right=of course] {OFFERED\_BY} edge[total] node[above]{$\cN$} (course);
7 \node [entity] (department) [right = of offeredby] {DEPARTMENT} edge node[above]{$1$} (offeredby);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/contains.tex added (mode: 100644) (index 0000000..dca2dd2)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[relationship] (contains){CONTAINS};
6 \node[entity] (burger) [left = 1cm of contains] {BURGER} edge[total] node[above] {$N$} (contains);
7 \node[entity] (ingredient) [right = 1cm of contains] {INGREDIENT} edge node[above]{$M$} (contains);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/country.tex added (mode: 100644) (index 0000000..8e99496)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (COUNTRY) {COUNTRY};
6 \node[attribute] (name) [left of=COUNTRY] {\key{Name}} edge (COUNTRY);
7 \node[attribute] (population) [below left of=COUNTRY] {Population} edge (COUNTRY);
8
9 \node[relationship] (SPEAKS) [below right of=COUNTRY] {SPEAKS} edge node[right, pos=0.4] {$M$} (COUNTRY);
10 \node[entity] (LANGUAGE) [below right of=SPEAKS] {LANGUAGE} edge node[right, pos=0.5] {$N$} (SPEAKS);
11 \node[attribute] (code) [left of = LANGUAGE] {\key{Code}} edge (LANGUAGE);
12 \node[attribute] (symbol) [right of = LANGUAGE] {Name} edge (LANGUAGE);
13
14 \node[relationship] (BWF) [below of = LANGUAGE] {B\_W\_F};
15 \draw (LANGUAGE) to node[left, pos=0.6] {$N$} (BWF.west);
16 \draw (LANGUAGE) to node[right, pos=0.6] {$M$} (BWF.east);
17
18 %\node[relationship] (boundary) [above of = COUNTRY] {S\_B\_W};
19 %\draw (COUNTRY) to node[left, pos=0.6] {$N$} (boundary.west);
20 %\draw (COUNTRY) to node[right, pos=0.6] {$M$} (boundary.east);
21
22 %\node[relationship] (conversion) [below of =LANGUAGE] {CONVERSION};
23 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (conversion.west);
24 %\draw (LANGUAGE) to node[right, pos=0.6] {$M$} (conversion.east);
25
26 %\node[attribute] (timestamp) [below left of=conversion] {\key{Timestamp}} edge (conversion);
27 %\node[attribute] (rate) [below right of=conversion] {Exchange\_rate} edge (conversion);
28
29 \node[ident relationship] (hasfor) [right of=COUNTRY] {SINGS} edge node[above, pos=0.4] {$1$} (COUNTRY);
30 \node[weak entity] (anthem) %[right of=hasfor]
31 [right = 1cm of hasfor] {NATIONAL\_ANTHEM} edge[total] node[above, pos=0.6]{$M$} (hasfor);
32 \node[multi attribute] (color) [right =1cm of anthem] {Creator} edge (anthem);
33 \node[attribute] (name) [below right of = anthem] {\pkey{Name}} edge (anthem);
34
35 \node[relationship] (WIN) [above right of =LANGUAGE] {W\_IN};
36 \draw (LANGUAGE) to node[left, pos=0.6] {$N$} (WIN);
37 \draw (anthem) to node[right, pos=0.6] {$M$} (WIN);
38 \end{tikzpicture}
39
40 \end{document}
File notes/fig/er/customers.tex added (mode: 100644) (index 0000000..e9845ea)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=1.5cm]
5 \node[entity] (CUSTOMER) {CUSTOMER};
6 \node[attribute] [above of=CUSTOMER] {Name} edge (CUSTOMER);
7 \node[attribute] [right = .5cm of CUSTOMER] {\key{ID}} edge (CUSTOMER);
8 \node[attribute] [below of=CUSTOMER] {Address} edge (CUSTOMER);
9 %
10 \node[ident relationship] (PASSEDBY) [left = 1.5cm of CUSTOMER] {PASSED\_BY} edge node[above, pos=0.4] {$1$} (CUSTOMER);
11 \node[attribute] [above = .5cm of PASSEDBY] {DateTime} edge (PASSEDBY);
12 %
13 \node[weak entity] (ORDER) [left = 1.5cm of PASSEDBY] {ORDER} edge[total] node[above, pos=0.6]{$\cM$} (PASSEDBY);
14 \node[attribute] [above of = ORDER] {\pkey{ID}} edge (ORDER);
15 %
16 \node[entity] (PRODUCT) [below = 4cm of ORDER] {PRODUCT};% edge node[right, pos=0.4] {$1$} (ASSIGNEDTO);
17 \node[attribute] [above left = .5cm of PRODUCT] {\key{ID}} edge (PRODUCT);
18 \node[attribute] [left = .5cm of PRODUCT] {Brand} edge (PRODUCT);
19 \node[attribute] [right = .5cm of PRODUCT] {Price} edge (PRODUCT);
20 \node[attribute] [below left = .5cm of PRODUCT] {Caution} edge (PRODUCT);
21 \node[attribute] [below right = .5cm of PRODUCT] {Material} edge (PRODUCT);
22 \node[attribute] [below = .7cm of PRODUCT] {Description} edge (PRODUCT);
23 %
24 \node[relationship] (CONTAINS) [below=1cm of ORDER] {CONTAINS} edge [total] node[right, pos=0.6] {$\cM$} (ORDER) edge node[right, pos=0.6] {$1$} (PRODUCT);
25 \node[attribute] [right = .5cm of CONTAINS] {Quantity} edge (CONTAINS);
26 \end{tikzpicture}
27
28 \end{document}
File notes/fig/er/dependent.tex added (mode: 100644) (index 0000000..66e7846)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (EMPLOYEE) {EMPLOYEE};
6 \node[attribute] (make) [left of=EMPLOYEE] {\key{SSN}} edge (EMPLOYEE);
7 \node[attribute] (year) [below left of =EMPLOYEE] {Role} edge (EMPLOYEE);
8 \node[attribute] (brand) [below of =EMPLOYEE] {Name} edge (EMPLOYEE);
9
10 \node[ident relationship] (RELATEDTO) [right of=EMPLOYEE] {RELATED TO} edge node[above, pos=0.3] {$1$} (EMPLOYEE);
11 \node[weak entity] (DEPENDENT) [right = 1cm of RELATEDTO] {DEPENDENT} edge[total] node[above, pos=0.7] {$N$} (RELATEDTO);
12 \node[attribute] (amount) [below of =DEPENDENT] {\pkey{Name}} edge (DEPENDENT);
13 \node[attribute] (company) [below right of =DEPENDENT] {Address} edge (DEPENDENT);
14 \end{tikzpicture}
15
16 \end{document}
File notes/fig/er/desk.tex added (mode: 100644) (index 0000000..3e00be8)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (DESK) {DESK};
6 \node[attribute] (pid) [left of=DESK] {\key{Serial}} edge (DESK);
7 \node[multi attribute] [above of=DESK] {Color} edge (DESK);
8 \node[attribute] (Location) [right of=DESK] {Location} edge (DESK);
9 \node[attribute] [above right of=Location] {Building} edge (Location);
10 \node[attribute] [right of=Location] {Room} edge (Location);
11 \end{tikzpicture}
12
13 \end{document}
File notes/fig/er/doula.tex added (mode: 100644) (index 0000000..564a1cf)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (HEALTHCAREPROVIDER) {HEALTH\_CARE\_PROVIDER};
6 \node[ident relationship] (COVERS) [below right of=HEALTHCAREPROVIDER] {COVERS} edge node[above, pos=0.3] {$1$} (HEALTHCAREPROVIDER);
7 \node[weak entity] (PERSON) [right = 1cm of COVERS] {INSUREE} edge[total] node[above, pos=0.7] {$\cN$} (COVERS);
8 \node[ident relationship] (ISFOLLOWEDBY) [above right of =PERSON] {IS FOLLOWED BY} edge node[above, pos=0.7] {$1$} (PERSON);
9 \node[weak entity] (DOULA) [right = 1cm of ISFOLLOWEDBY] {DOULA} edge[total] node[above, pos=0.3] {$\cM$} (ISFOLLOWEDBY);
10 \end{tikzpicture}
11
12 \end{document}
File notes/fig/er/entity_instructor.tex added (mode: 100644) (index 0000000..565c498)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (entity) {INSTRUCTOR};
6 \node[attribute] (pid) [left = 2em of entity] {\key{Login}} edge (entity);
7 \node[attribute] (name) [above left of=entity] {Position Title} edge (entity);
8 \node[attribute] (name) [above =5em of entity] {Name} edge (entity);
9 \node[attribute] (fname) [above left of = name] {First Name} edge (name);
10 \node[attribute] (lname) [above right of = name] {Last Name} edge (name);
11 \node[multi attribute] (mname) [above of = name] {Middle Name} edge (name);
12 \node[multi attribute] (phone) [right =2em of entity] {Phone} edge (entity);
13 \node[attribute] (address) [below =1em of entity] {Location} edge (entity);
14 \node[attribute] (street) [below right of=address] {Room \#} edge (address);
15 \node[attribute] (city) [below left of=address] {Building} edge (address);
16 \node[derived attribute] (age) [above right of=entity] {Tenured} edge (entity);
17
18 \end{tikzpicture}
19
20 \end{document}
File notes/fig/er/example_of_derived.tex added (mode: 100644) (index 0000000..934287d)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (phone) {PHONE};
6 \node[attribute] [left of=phone] {Price} edge (phone);
7 \node[attribute] [above of=phone] {Weight in oz} edge (phone);
8 \node[derived attribute] [above right of=phone] {Weight in g} edge (phone);
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/gym.tex added (mode: 100644) (index 0000000..9470d04)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (MEMBER) {MEMBER};
6 \node [relationship] (RESERVES) [right=of MEMBER] {RESERVES} edge node[above]{$1$} (MEMBER);
7 \node [entity] [right = of RESERVES] {EQUIPMENT} edge node[above]{$1$} (RESERVES);
8 \node [entity] [below = of RESERVES] {TIME\_SLOT} edge node[left]{$\cN$} (RESERVES);
9 \end{tikzpicture}
10 \end{document}
File notes/fig/er/job.tex added (mode: 100644) (index 0000000..45ae464)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=1.5cm]
5 \node[entity] (COMPANY) {COMPANY};
6 \node[attribute] [above of=COMPANY] {\key{Name}} edge (COMPANY);
7 \node[attribute] (Address) [right = .5cm of COMPANY] {Address} edge (COMPANY);
8 \node[attribute] [right = .5cm of Address] {Physical} edge (Address);
9 \node[attribute] [below right = .5cm of Address] {Numerical} edge (Address);
10 \node[multi attribute] [above right = .5cm of COMPANY] {Benefits} edge (COMPANY);
11 %
12 \node[relationship] (ADVERTISEDBY) [left = 1.5cm of COMPANY] {ADVERTISED\_BY} edge node[above, pos=0.4] {$\c1$} (COMPANY);
13 \node[attribute] [above = .3cm of ADVERTISEDBY] {URL} edge (ADVERTISEDBY);
14 %
15 \node[entity] (JOBAD) [left = 1.5cm of ADVERTISEDBY] {JOB\_AD} edge[total] node[above, pos=0.6]{$\cM$} (ADVERTISEDBY);
16 \node[attribute] [above left of = JOBAD] {Title} edge (JOBAD);
17 \node[attribute] [left = .5cm of JOBAD] {Salary Range} edge (JOBAD);
18 \node[multi attribute] [below left = .5cm of JOBAD] {Requirement} edge (JOBAD);
19 \node[attribute] [above right of = JOBAD] {\key{id}} edge (JOBAD);
20 %
21 \node[relationship] (EMPLOYS) [below =0.8cm of COMPANY] {EMPLOYS} edge node[right, pos=0.4] {$\cN$} (COMPANY);
22 %
23 \node[entity] (CONTACT) [below left = 3cm and 2cm of COMPANY] {CONTACT} edge node[above, pos=0.4] {$\cM$} (EMPLOYS);
24 \node[attribute] [right = .5cm of CONTACT] {Name} edge (CONTACT);
25 \node[attribute] [below right = .5cm and .2cm of CONTACT] {\key{Id}} edge (CONTACT);
26 \node[attribute] [below = .5cm of CONTACT] {Role} edge (CONTACT);
27 %
28 \node[relationship] (DISCUSSED) [below right = 0.8cm and 1cm of JOBAD] {DISCUSSED\_BY} edge node[right, pos=0.4] {$\cN$} (CONTACT) edge node[above, pos=0.4] {$\cM$} (JOBAD);
29 % \node[relationship] (REPAIREDBY) [below right =3cm of JOBAD] {REPAIRED\_BY} edge node[below, pos=0.6] {$\cM$} (JOBAD) edge node[below, pos=0.6] {$1$} (CONTACT);
30 %
31
32 \node[weak entity] (OFFER) [below = 5cm of JOBAD] {OFFER};
33
34 \node[attribute] [left = 0.5cm of OFFER] {Salary Offered} edge (OFFER);
35 \node[attribute] [below left = 0.5cm of OFFER] {Start Date} edge (OFFER);
36
37 \node[ident relationship] (RESULTEDIN) [below = 1 cm of JOBAD] {RESULTED\_IN} edge node[right, pos=0.4] {$1$} (JOBAD) edge[total] node[left]{$1$} (OFFER);
38
39 \node[attribute] [below of = OFFER] {\pkey{Date}} edge (OFFER);
40
41 %\node[entity] (COMPANY) {COMPANY};
42 %
43 %
44 %
45 %\node[relationship] (SPEAKS) [below right of=COMPANY] {SPEAKS} edge node[right, pos=0.4] {$M$} (COMPANY);
46 %\node[entity] (LANGUAGE) [below right of=SPEAKS] {LANGUAGE} edge node[right, pos=0.5] {$N$} (SPEAKS);
47 %\node[attribute] (code) [left of = LANGUAGE] {\key{Code}} edge (LANGUAGE);
48 %\node[attribute] (symbol) [right of = LANGUAGE] {Name} edge (LANGUAGE);
49 %
50 %\node[relationship] (BWF) [below of = LANGUAGE] {B\_W\_F};
51 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (BWF.west);
52 %\draw (LANGUAGE) to node[right, pos=0.6] {$M$} (BWF.east);
53 %
54 %
55 %\node[multi attribute] (color) [right =1cm of anthem] {Creator} edge (anthem);
56
57 %
58 %\node[relationship] (WIN) [above right of =LANGUAGE] {W\_IN};
59 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (WIN);
60 %\draw (anthem) to node[right, pos=0.6] {$M$} (WIN);
61
62 \end{tikzpicture}
63
64 \end{document}
File notes/fig/er/key_opens_door.tex added (mode: 100644) (index 0000000..4403c1d)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (key) {KEY};
6 \node [relationship] (opens) [right=of key] {OPENS} edge[total] node[above]{$\cN$} (key);
7 \node [entity] (door) [right = of opens] {DOOR} edge node[above]{$1$} (opens);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/library.tex added (mode: 100644) (index 0000000..217b341)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=1.5cm]
5 \node[entity] (COPY) {COPY};
6 \node[attribute] [above of=COPY] {\key{Code}} edge (COPY);
7 %
8 \node[relationship] (POSSESSES) [left = 1.5cm of COPY] {POSSESSES} edge[total] node[above, pos=0.4] {$\cM$} (COPY);
9 %
10 \node[entity] (LIBRARY) [left = 1.5cm of POSSESSES] {LIBRARY} edge node[above, pos=0.6]{$1$} (POSSESSES);
11 \node[attribute] [above of = LIBRARY] {\key{Name}} edge (LIBRARY);
12 \node[attribute] (Address) [left = 0.5cm of LIBRARY] {Address} edge (LIBRARY);
13 \node[attribute] [above left of = Address] {Number} edge (Address);
14 \node[attribute] [left = .5cm of Address] {Street} edge (Address);
15 \node[attribute] [below left of = Address] {Zip} edge (Address);
16 %
17 \node[relationship] (OF) [right = 1.5cm of COPY] {OF} edge[total] node[above, pos=0.4] {$\cM$} (COPY);
18 %
19 \node[entity] (DOCUMENT) [right = 1.5cm of OF] {DOCUMENT} edge node[above, pos=0.6]{$1$} (OF);
20 \node[attribute] [below of = DOCUMENT] {\key{Catalog Number}} edge (DOCUMENT);
21 \node[attribute] [above of = DOCUMENT] {Kind} edge (DOCUMENT);
22 \node[attribute] [right = .5cm of DOCUMENT] {Title} edge (DOCUMENT);
23 %
24 \node[relationship] (BORROWEDBY) [below left = 2cm and 0.5cm of COPY] {BORROWED\_BY} edge node[left, pos=0.4] {$\cM$} (COPY);
25 \node[attribute] [left = .5cm of BORROWEDBY] {Return\_Date} edge (BORROWEDBY);
26 %
27 \node[relationship] (HOLDBY) [below right = 2cm and 0.5cm of COPY] {HOLD\_BY} edge node[right, pos=0.4] {$\cM$} (COPY);
28 \node[attribute] [right = .5cm of HOLDBY] {Expiration\_Date} edge (HOLDBY);
29 %
30 \node[entity] (PATRON) [below = 5cm of COPY] {PATRON} edge node[left] {$1$} (HOLDBY) edge node[right] {$1$} (BORROWEDBY);
31 \node[attribute] [below right = 1cm of PATRON] {\key{Card Number}} edge (PATRON);
32 \node[attribute] [below = 1cm of PATRON] {Name} edge (PATRON);
33 \node[attribute] [below left = 1cm of PATRON] {Email} edge (PATRON);
34 %
35 % \node[relationship] (REPAIREDBY) [below right =3cm of LIBRARY] {REPAIRED\_BY} edge node[below, pos=0.6] {$\cM$} (LIBRARY) edge node[below, pos=0.6] {$1$} (PATRON);
36
37
38 %\node[entity] (COPY) {COPY};
39 %
40 %
41 %
42 %\node[relationship] (SPEAKS) [below right of=COPY] {SPEAKS} edge node[right, pos=0.4] {$M$} (COPY);
43 %\node[entity] (LANGUAGE) [below right of=SPEAKS] {LANGUAGE} edge node[right, pos=0.5] {$N$} (SPEAKS);
44 %\node[attribute] (code) [left of = LANGUAGE] {\key{Code}} edge (LANGUAGE);
45 %\node[attribute] (symbol) [right of = LANGUAGE] {Name} edge (LANGUAGE);
46 %
47 %\node[relationship] (BWF) [below of = LANGUAGE] {B\_W\_F};
48 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (BWF.west);
49 %\draw (LANGUAGE) to node[right, pos=0.6] {$M$} (BWF.east);
50 %
51 %
52 %\node[multi attribute] (color) [right =1cm of anthem] {Creator} edge (anthem);
53
54 %
55 %\node[relationship] (WIN) [above right of =LANGUAGE] {W\_IN};
56 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (WIN);
57 %\draw (anthem) to node[right, pos=0.6] {$M$} (WIN);
58
59 \end{tikzpicture}
60
61 \end{document}
File notes/fig/er/mapping_relationships_01.tex added (mode: 100644) (index 0000000..adea4ed)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[relationship] (contains){REL.};
6 \node[entity] (ENTA) [left = 1cm of contains] {ENT. A} edge[total] node[above] {$1$} (contains);
7 \node[attribute] [above of= ENTA] {\key{KeyA}} edge (ENTA);
8 \node[entity] (ENTB) [right = 1cm of contains] {ENT. B} edge node[above]{$1$} (contains);
9 \node[attribute] [above of= ENTB] {\key{KeyB}} edge (ENTB);
10 \end{tikzpicture}
11
12 \end{document}
File notes/fig/er/mapping_relationships_02.tex added (mode: 100644) (index 0000000..3f62bde)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[relationship] (contains){REL.};
6 \node[entity] (ENTA) [left = 1cm of contains] {ENT. A} edge[total] node[above] {$1$} (contains);
7 \node[attribute] [above of= ENTA] {\key{KeyA}} edge (ENTA);
8 \node[entity] (ENTB) [right = 1cm of contains] {ENT. B} edge[total] node[above]{$1$} (contains);
9 \node[attribute] [above of= ENTB] {\key{KeyB}} edge (ENTB);
10 \end{tikzpicture}
11
12 \end{document}
File notes/fig/er/membership.tex added (mode: 100644) (index 0000000..52c2169)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (PERSON) {PERSON};
6 \node [relationship] (MEMBERSHIP) [right=of PERSON] {MEMBERSHIP} edge node[above]{$\cM$} (PERSON);
7 \node [entity] (CLUB) [right = of MEMBERSHIP] {CLUB} edge node[above]{$1$} (MEMBERSHIP);
8 \node[attribute] [above of=PERSON] {CLUB\_MEMBERSHIP\_LEVEL} edge (PERSON);
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/naming.tex added (mode: 100644) (index 0000000..76fa672)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (entity) {ENTITY TYPE NAME};
6 \node[attribute] (pid) [left = 2em of entity] {\key{Key}} edge (entity);
7 \node[attribute] (name) [above left of=entity] {Atomic} edge (entity);
8 \node[multi attribute] (phone) [right =2em of entity] {Multi-Valued} edge (entity);
9 \node[attribute] (address) [below =1em of entity] {Composite} edge (entity);
10 \node[attribute] (street) [below right of=address] {Attribute $n$} edge (address);
11 \node[attribute] (city) [below left of=address] {Attribute $1$} edge (address);
12 \node[derived attribute] (age) [above right of=entity] {Derived} edge (entity);
13 \node (dots) [right = 0.4em of city] {…};
14 \end{tikzpicture}
15
16 \end{document}
File notes/fig/er/naming_short_01.tex added (mode: 100644) (index 0000000..251037e)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (entity) {ENTITY TYPE NAME};
6 \node[attribute] [above left of=entity] {Attribute $1$} edge (entity);
7 \node[attribute] [above right of=entity] {Attribute $n$} edge (entity);
8 \node[above = 3em of entity] {…};
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/naming_short_02.tex added (mode: 100644) (index 0000000..d7fbfe3)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] {ENTITY TYPE NAME};
6 \end{tikzpicture}
7
8 \end{document}
File notes/fig/er/parents.tex added (mode: 100644) (index 0000000..a086e22)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node [entity] (PERSON) {PERSON};
6 \node [relationship] (uses) [right=of PERSON] {DNA HERITAGE} edge[total] node[above]{$1$} (PERSON);
7 \draw (uses) to [bend left] node[below, pos=0.4]{Biological Father} node[below, pos = 0.9]{$\cN$} (PERSON);
8 \draw (uses) to [bend right] node[above, pos=0.4]{Biological Mother} node[above, pos = 0.9]{$\cM$} (PERSON);
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/person.tex added (mode: 100644) (index 0000000..62b32d8)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (person) {PERSON};
6 \node[attribute] (ssn) [left of=person] {\key{SSN}} edge (person);
7 \node[attribute] (dob) [above of=person] {Date\_Of\_Birth} edge (person);
8 \node[derived attribute] (age) [right of=person] {Age} edge (person);
9 \end{tikzpicture}
10
11
12 \end{document}
File notes/fig/er/pet_01.tex added (mode: 100644) (index 0000000..0fe0ade)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (FRIEND) {FRIEND};
6 \node[attribute] (make) [below of=FRIEND] {\key{Name}} edge (FRIEND);
7
8 \node[ident relationship] (POSSESSES) [right of=FRIEND] {POSSESSES} edge node[above, pos=0.3] {$1$} (FRIEND);
9 \node[weak entity] (PET) [right = 1cm of POSSESSES] {PET} edge[total] node[above, pos=0.7] {$N$} (POSSESSES);
10 \node[attribute] [below right of =PET] {\pkey{Name}} edge (PET);
11 \node[attribute] [below left of =PET] {Gender} edge (PET);
12 \node[attribute] [below of =PET] {Specie} edge (PET);
13 \end{tikzpicture}
14
15 \end{document}
File notes/fig/er/pet_02.tex added (mode: 100644) (index 0000000..f2035b6)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (FRIEND) {FRIEND};
6 \node[attribute] (make) [below of=FRIEND] {\key{Name}} edge (FRIEND);
7 \node[multi attribute] (PET) [right = 1cm of FRIEND] {PET} edge(FRIEND);
8 \node[attribute] [below right of =PET] {Name} edge (PET);
9 \node[attribute] [below left of =PET] {Gender} edge (PET);
10 \node[attribute] [below of =PET] {Specie} edge (PET);
11 \end{tikzpicture}
12
13 \end{document}
File notes/fig/er/pet_03.tex added (mode: 100644) (index 0000000..fb30bef)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (FRIEND) {FRIEND};
6 \node[attribute] (make) [below of=FRIEND] {\key{Name}} edge (FRIEND);
7
8 \node[ident relationship] (POSSESSES) [right of=FRIEND] {POSSESSES} edge node[above, pos=0.3] {$1$} (FRIEND);
9 \node[weak entity] (PET) [right = 1cm of POSSESSES] {PET} edge[total] node[above, pos=0.7] {$\cN$} (POSSESSES);
10 \node[attribute] [below right of =PET] {\pkey{Name}} edge (PET);
11 \node[attribute] [below left of =PET] {Gender} edge (PET);
12 \node[attribute] [below of =PET] {Specie} edge (PET);
13
14 \node[entity] (FOOD) [above right= 3cm and 0cm of FRIEND] {FOOD};
15 \node[relationship] (LOVES) [below right of=FOOD] {LOVED\_BY} edge node[above, pos=0.5] {$\cM$} (PET) edge node[above, pos=0.3]{$\cN$}(FOOD);
16
17 \node[ident relationship] (PLAYSWITH) [above right of =PET] {PLAYS WITH} edge node[above, pos=0.7] {$1$} (PET);
18 \node[weak entity] (TOY) [right = 1cm of PLAYSWITH] {TOY} edge[total] node[above, pos=0.3] {$\cM$} (PLAYSWITH);
19 \end{tikzpicture}
20
21 \end{document}
File notes/fig/er/phone_carrier_01.tex added (mode: 100644) (index 0000000..a914e98)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node [entity] (phone) {PHONE};
6 \node [attribute] [above left of=phone] {Attribute $1$} edge (phone);
7 \node [attribute] [above right of=phone] {Attribute $n$} edge (phone);
8 \node (dots) [above = 3em of phone] {…};
9 \node [relationship] (uses) [right=of phone] {USES} edge[total] node[above]{$\cN$} (phone);
10 \node [attribute] [above of=uses] {Average\_Network\_Quality} edge (uses);
11 \node [entity] (carrier) [right = of uses] {CARRIER} edge node[above]{$1$} (uses);
12
13 \end{tikzpicture}
14
15 \end{document}
File notes/fig/er/phone_carrier_02.tex added (mode: 100644) (index 0000000..d519884)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node [entity] (phone) {PHONE};
6 \node [attribute] [above left of=phone] {Attribute $1$} edge (phone);
7 \node [attribute] [above right of=phone] {Attribute $n$} edge (phone);
8 \node (dots) [above = 3em of phone] {…};
9 \node [relationship] (uses) [right=of phone] {USES} edge[total] node[above]{$\cN$} (phone);
10 \node [attribute] [below of=phone] {Average\_Network\_Quality} edge (phone);
11 \node [entity] (carrier) [right = of uses] {CARRIER} edge node[above]{$1$} (uses);
12 \end{tikzpicture}
13
14 \end{document}
File notes/fig/er/pilot.tex added (mode: 100644) (index 0000000..a5ade41)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=8em]
5 \node[entity] (person) {PILOT};
6 \node[attribute] (pid) [left of=person] {\key{ID}} edge (person);
7 \node[attribute] (name) [above left of=person] {Name} edge (person);
8 \node[attribute] (phone) [above of=person] {Experience} edge (person);
9
10 \node[relationship] (drives) [below of=person] {ASSIGNED\_TO} edge node[right, pos=0.1] {$N$} (person);
11 \node[entity] (plane) [below of=drives] {PLANE} edge [total] node[right, pos=0.7] {$1$} (drives);
12 \node[attribute] (make) [left of=plane] {\key{TailID}} edge (plane);
13 \node[attribute] (maxS) [below left of =plane] {MaxSpeed} edge (plane);
14 \node[attribute] (airPlaneType) [below of = plane] {AirPlaneType} edge (plane);
15 \end{tikzpicture}
16
17 \end{document}
File notes/fig/er/printer.tex added (mode: 100644) (index 0000000..7b799d9)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[entity] (printer) {PRINTER};
6 \node[attribute] (mid) [above left of=printer] {\key{Office}} edge (printer);
7 \node[attribute] (firmware) [above right of=printer] {Firmware} edge (printer);
8 \node[attribute] (carrier) [above right of=firmware] {Name} edge (firmware);
9 \node[attribute] (price) [above left of=firmware] {Version} edge (firmware);
10 \end{tikzpicture}
11
12 \end{document}
File notes/fig/er/produces.tex added (mode: 100644) (index 0000000..05de23e)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (producer) {PRODUCER};
6 \node [relationship] (produces) [right=of producer] {PRODUCES} edge node[above]{$1$} (producer);
7 \node [entity] (movie) [right = of produces] {MOVIE} edge node[above]{$\cM$} (produces);
8 \node[attribute] (mid) [above of=movie] {Amount\_Given\_By\_Producer} edge (movie);
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/record.tex added (mode: 100644) (index 0000000..8576625)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=1.5cm]
5 \node[entity] (LABEL) {LABEL};
6 \node[attribute] [above of=LABEL] {\key{Name}} edge (LABEL);
7 \node[attribute] [right = .5cm of LABEL] {Phone} edge (LABEL);
8 \node[multi attribute] [above right = .5cm of LABEL] {Genre} edge (LABEL);
9 %
10 \node[relationship] (RELEASEDBY) [left = 1.5cm of LABEL] {RELEASED\_BY} edge node[above, pos=0.4] {$\cN$} (LABEL);
11 %
12 \node[entity] (RECORDING) [left = 1.5cm of RELEASEDBY] {RECORDING} edge[total] node[above, pos=0.6]{$\cM$} (RELEASEDBY);
13 \node[attribute] [above of = RECORDING] {\key{Title}} edge (RECORDING);
14 %
15 \node[ident relationship] (USES) [below =0.8cm of LABEL] {USES} edge [total] node[right, pos=0.4] {$1$} (LABEL);
16 \node[attribute] [above = .5cm of RELEASEDBY] {Date} edge (RELEASEDBY);
17 %
18 \node[weak entity] (LOGO) [below = 3cm of LABEL] {LOGO} edge [total] node[right, pos=0.4] {$1$} (USES);
19 \node[attribute] [right = .5cm of LOGO] {\pkey{Name}} edge (LOGO);
20 \node[attribute] [below = .5cm of LOGO] {Color} edge (LOGO);
21 %
22 % \node[relationship] (REPAIREDBY) [below right =3cm of RECORDING] {REPAIRED\_BY} edge node[below, pos=0.6] {$\cM$} (RECORDING) edge node[below, pos=0.6] {$1$} (LOGO);
23 %
24
25 \node[relationship] (ISSOLDAT) [below left = 1.5cm of RECORDING] {IS\_SOLD\_AT} edge node[above, pos=0.4] {$\cN$} (RECORDING);
26 \node[attribute] [left = .5cm of ISSOLDAT] {Number of copies} edge (ISSOLDAT);
27
28 \node[entity] (SHOP) [below = 5cm of RECORDING] {RECORD SHOP} edge[total] node[right, pos=0.4]{$\cM$} (ISSOLDAT);
29
30 \node[attribute] (Address) [left = 0.5cm of SHOP] {Address} edge (SHOP);
31 \node[attribute] [above left of = Address] {Zip} edge (Address);
32 \node[attribute] [below left of = Address] {Street Name} edge (Address);
33 \node[attribute] [left = .6cm of Address] {City} edge (Address);
34
35 \node[relationship] (ISPLAYEDAT) [below right = 1.5cm and 0cm of RECORDING] {IS\_AN\_EXCLUSIVITY\_OF} edge node[right, pos=0.4] {$\cN$} (RECORDING) edge node[left]{$1$} (SHOP);
36
37 \node[attribute] [below of = SHOP] {\key{Name}} edge (SHOP);
38
39 %\node[entity] (LABEL) {LABEL};
40 %
41 %
42 %
43 %\node[relationship] (SPEAKS) [below right of=LABEL] {SPEAKS} edge node[right, pos=0.4] {$M$} (LABEL);
44 %\node[entity] (LANGUAGE) [below right of=SPEAKS] {LANGUAGE} edge node[right, pos=0.5] {$N$} (SPEAKS);
45 %\node[attribute] (code) [left of = LANGUAGE] {\key{Code}} edge (LANGUAGE);
46 %\node[attribute] (symbol) [right of = LANGUAGE] {Name} edge (LANGUAGE);
47 %
48 %\node[relationship] (BWF) [below of = LANGUAGE] {B\_W\_F};
49 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (BWF.west);
50 %\draw (LANGUAGE) to node[right, pos=0.6] {$M$} (BWF.east);
51 %
52 %
53 %\node[multi attribute] (color) [right =1cm of anthem] {Creator} edge (anthem);
54
55 %
56 %\node[relationship] (WIN) [above right of =LANGUAGE] {W\_IN};
57 %\draw (LANGUAGE) to node[left, pos=0.6] {$N$} (WIN);
58 %\draw (anthem) to node[right, pos=0.6] {$M$} (WIN);
59
60 \end{tikzpicture}
61
62 \end{document}
File notes/fig/er/rel_instance.tex added (mode: 100644) (index 0000000..1fd7c9e)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=2em]
5 \draw [fill= gray!20] (0,-1) ellipse (1cm and 2cm) node[above=2]{Entity Set 1};
6 \draw [fill= blue!20] (2.75, -1) ellipse (1cm and 2cm) node[above=2]{Relationship Set 1};
7 \draw [fill= green!20] (5.5, -1) ellipse (1cm and 2cm) node[above=2]{Entity Set 2};
8 %
9 \node (e1) {\(e_1\)};
10 \node (e2) [below of = e1] {\(e_2\)};
11 \node (dots) [below of = e2] {\(\vdots\)};
12 \node (en) [below of = dots] {\(e_n\)};
13 %
14 \node (c1) [right = 5 of e1]{\(c_1\)};
15 \node (c2) [below of = c1]{\(c_1\)};
16 \node (cdots) [below of = c2] {\(\vdots\)};
17 \node (cp) [below of = cdots] {\(c_p\)};
18 %
19 \node (r1) [right = 2.25 of e2] {\(r_1\)};
20 \draw (r1) to (e1);
21 \draw (r1) to (c2);
22 %
23 \node (r2) [below of = r1] {\(r_2\)};
24 \draw (r2) to (e2);
25 \draw (r2) to (cp);
26 \end{tikzpicture}
27
28 \end{document}
File notes/fig/er/role_name_01.tex added (mode: 100644) (index 0000000..7cc6da7)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (company) {COMPANY};
6 \node [relationship] (employs) [right=of company] {EMPLOYS} edge node[above]{Employer} (company);
7 \node [entity] (person) [right = of employs] {PERSON} edge node[above]{Employee} (employs);
8 \end{tikzpicture}
9
10 \end{document}
File notes/fig/er/role_name_02.tex added (mode: 100644) (index 0000000..a4e744c)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (person) {PERSON};
6 \node [relationship] (hosts) [above=of person] {HOSTS};
7 \draw (hosts.east) -- node[right]{Guest} (person);
8 \draw (hosts.west) -- node[left]{Host} (person);
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/role_name_03.tex added (mode: 100644) (index 0000000..5feef1f)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (professor) {PROFESSOR};
6 \node [relationship] (mentors) [above=of professor] {MENTORS};
7 \draw (mentors.east) -- node[right]{Mentor} (professor);
8 \draw (mentors.west) -- node[left]{Mentee} (professor);
9 \end{tikzpicture}
10
11 \end{document}
File notes/fig/er/software_dep.tex added (mode: 100644) (index 0000000..4006738)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (SOFTWARE) {SOFTWARE};
6 \node [relationship] (REQUIRES) [above=of SOFTWARE] {REQUIRES};
7 \draw (REQUIRES.east) -- node[right]{Requirement} node[right, pos = 0.8]{$\cN$} (SOFTWARE);
8 \draw (REQUIRES.west) -- node[left, pos = 0.8]{$\cM$}(SOFTWARE);
9 \node [attribute] (id) [right= .5cm of SOFTWARE] {\key{Id}} edge (SOFTWARE);
10 \node [attribute, above right of = id] {Version} edge (id);
11 \node [attribute, below right of = id] {Name} edge (id);
12 \end{tikzpicture}
13
14 \end{document}
File notes/fig/er/song.tex added (mode: 100644) (index 0000000..def4a5b)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node[entity] (ALBUM) {ALBUM};
6 \node[attribute] [left = .5cm of ALBUM] {\key{Name}} edge (ALBUM);
7 \node[attribute] (Date) [above of=ALBUM] {Release Date} edge (ALBUM);
8 \node[attribute] [above right of=Date] {Day} edge (Date);
9 \node[attribute] [above = 1.2cm of Date] {Month} edge (Date);
10 \node[attribute] [above left of=Date] {Year} edge (Date);
11
12 \node[ident relationship] (CONTAINS) [right = 1cm of ALBUM] {CONTAINS} edge node[above, pos=0.3] {$1$} (ALBUM);
13 \node[weak entity] (SONG) [right = 1cm of CONTAINS] {SONG} edge[total] node[above, pos=0.7] {$N$} (CONTAINS);
14 \node[attribute] [right = .5cm of SONG] {\pkey{Track Number}} edge (SONG);
15
16 \node[attribute] (Length) [above of =SONG] {Length} edge (SONG);
17 \node[attribute] [above left of =Length] {Hours} edge (Length);
18 \node[attribute] [above =1.3cm of Length] {Minutes} edge (Length);
19 \node[attribute] [above right of =Length] {Seconds} edge (Length);
20 \end{tikzpicture}
21
22 \end{document}
File notes/fig/er/stays_at.tex added (mode: 100644) (index 0000000..0e6c07b)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=7em]
5 \node[relationship] (contains){STAYS\_AT};
6 \node[entity] (person) [above = 1cm of contains] {PERSON} edge node[right] {$N$} (contains);;
7 \node[attribute] (ssn) [left of=person] {\key{SSN}} edge (person);
8 \node[attribute] (dob) [above = .5cm of person] {Date\_Of\_Birth} edge (person);
9 \node[entity] (burger) [below of= contains] {PLACE} edge node[right] {$1$} (contains);
10 \node[attribute] (dob) [below = .5cm of burger] {\key{Address}} edge (burger);
11 \node[attribute] (ssn) [left of=burger] {Rooms} edge (burger);
12 \end{tikzpicture}
13
14 \end{document}
File notes/fig/er/teaches.tex added (mode: 100644) (index 0000000..e189370)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (PROFESSOR) {PROFESSOR};
6 \node [relationship] (TEACHES) [right=of PROFESSOR] {TEACHES} edge node[above]{$1$} (PROFESSOR);
7 \node [entity] [right = of TEACHES] {COURSE} edge node[above]{$\cN$} (TEACHES);
8 \node [entity] [above = of TEACHES] {QUARTER} edge node[right]{$\cM$} (TEACHES);
9 \node [entity] [below = of TEACHES] {ROOM} edge node[left]{$\cP$} (TEACHES);
10 \end{tikzpicture}
11 \end{document}
File notes/fig/er/template.def added (mode: 100644) (index 0000000..6f19033)
1 \renewcommand\familydefault{\sfdefault} % Default family: serif
2 %\usepackage[usenames,dvipsnames]{xcolor}
3 \usepackage[x11names]{xcolor}
4 \usepackage{tikz}
5 \usepackage{soulutf8}
6 \usetikzlibrary{arrows,fit,positioning,shapes,calc}
7
8 %\definecolor{WIRE}{HTML}{002FA7} % Klein Blue
9 \usepackage[normalem]{ulem}
10
11 \tikzstyle{every entity} = []
12 \tikzstyle{every weak entity} = []
13 \tikzstyle{every attribute} = []
14 \tikzstyle{every relationship} = []
15 \tikzstyle{every link} = []
16 \tikzstyle{every isa} = []
17
18 \tikzstyle{link} = [>=triangle 60, draw, thick, every link]
19
20 \tikzstyle{total} = [link, double, double distance=3pt]
21
22 \tikzstyle{entity} = [rectangle, draw, black, very thick,
23 minimum width=6em, minimum height=3em,
24 every entity]
25
26 \tikzstyle{weak entity} = [entity, double, double distance=2pt,
27 every weak entity]
28
29 \tikzstyle{attribute} = [ellipse, draw, black, very thick,
30 minimum width=5em, minimum height=2em,
31 every attribute]
32
33 %\tikzstyle{key attribute} = [attribute, font=\bfseries]
34
35 \tikzstyle{multi attribute} = [attribute, double, double distance=2pt]
36
37 \tikzstyle{derived attribute} = [attribute, dashed]
38
39 %\tikzstyle{discriminator} = [attribute, font=\itshape]
40
41 \tikzstyle{relationship} = [diamond, draw, black, very thick,
42 minimum width=2em, aspect=1,
43 every relationship]
44
45 \tikzstyle{ident relationship} = [relationship, double, double distance=2pt]
46
47 \tikzstyle{isa} = [isosceles triangle, isosceles triangle apex angle=60,
48 shape border rotate=-90,
49 draw, black, very thick, minimum size=3em,
50 every isa]
51
52 % for text un key attributes
53 \newcommand{\key}[1]{\underline{#1}}
54 \newcommand{\pkey}[1]{\dashuline{#1}}
55
56 % for text in discriminator attributes
57 \def\discriminator{\bgroup
58 \ifdim\ULdepth=\maxdimen % Set depth based on font, if not set already
59 \settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi
60 \markoverwith{\kern.15em
61 \vtop{\kern\ULdepth \hrule width .3em}%
62 \kern.15em}\ULon}
63
64 %%
65
66
67 \definecolor{MediumPurple1}{rgb}{0.58, 0.44, 0.86}
68 \definecolor{Chartreuse2}{rgb}{0.5, 1.0, 0.0}
69 \tikzset{every entity/.style={draw=orange, fill=orange!20}}
70 \tikzset{every attribute/.style={draw=MediumPurple1, fill=MediumPurple1!20}}
71 \tikzset{every relationship/.style={draw=Chartreuse2, fill=Chartreuse2!20}}
72
73 %% Variable for participation constraint
74 \newcommand{\cM}{\mathrm{M}}
75 \newcommand{\cN}{\mathrm{N}}
76 \newcommand{\cO}{\mathrm{O}}
77 \newcommand{\cP}{\mathrm{P}}
78
79 \begin{document}
File notes/fig/er/ternary_lecture_notes.tex added (mode: 100644) (index 0000000..a65a9b0)
1 \documentclass[border=20pt]{standalone}
2 \input{template.def}
3
4 \begin{tikzpicture}[node distance=5em]
5 \node [entity] (CLASS) {CLASS};
6 \node [relationship] (REFERS) [right=of CLASS] {REFERS TO} edge node[above]{$\cP$} (CLASS);
7 \node [entity] [right = of REFERS] {PROFESSOR} edge node[above]{$\cN$} (REFERS);
8 \node [entity] [below = of REFERS] {LECTURE NOTES} edge node[left]{$\cM$} (REFERS);
9 \end{tikzpicture}
10 \end{document}
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/caubert/CSCI_3410

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/caubert/CSCI_3410

Clone this repository using git:
git clone git://git.rocketgit.com/user/caubert/CSCI_3410

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main