File notes/fig/rel_mod/actor.tex added (mode: 100644) (index 0000000..1d996c9) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
|
|
5 |
|
% ACTOR(Id (PK), Name, Birthdate) |
|
6 |
|
% MOVIE(Title (PK), Year, Length, Studio) |
|
7 |
|
% THEATER(Name (PK), Street, City, State, Zip) |
|
8 |
|
% ACTING(ActorId (PK, FK to ACTOR.Id), MovieTitle (PK, FK to MOVIE.Title)) |
|
9 |
|
% SHOWING(TheaterName (PK, FK to THEATER.Name), MovieTitle(PK, FK to MOVIE.Title), Day (PK), Time (PK)) |
|
10 |
|
|
|
11 |
|
\Frame(0,0){1}[ACTOR]{ |
|
12 |
|
Id/PK, |
|
13 |
|
Name/A, |
|
14 |
|
Birthdate/A}; |
|
15 |
|
|
|
16 |
|
\Frame(0,-2.5){2}[MOVIE]{ |
|
17 |
|
Title/PK, |
|
18 |
|
Year/A, |
|
19 |
|
Length/A, |
|
20 |
|
Studio/A}; |
|
21 |
|
|
|
22 |
|
\Frame(0,-5){3}[THEATER]{ |
|
23 |
|
Name/PK, |
|
24 |
|
Street/A, |
|
25 |
|
City/A, |
|
26 |
|
State/A, |
|
27 |
|
Zip/A}; |
|
28 |
|
|
|
29 |
|
\Frame(8,0){4}[ACTING]{ |
|
30 |
|
ActorId/PK, |
|
31 |
|
MovieTitle/PK}; |
|
32 |
|
|
|
33 |
|
\Frame(8,-2.5){5}[SHOWING]{ |
|
34 |
|
MovieTitle/PK, |
|
35 |
|
TheaterName/PK, |
|
36 |
|
Day/PK, |
|
37 |
|
Time/PK}; |
|
38 |
|
|
|
39 |
|
\draw[FK] % From ACTING.ActorID to ACTOR.Id |
|
40 |
|
(Id1) -- ++(0,-.55) coordinate (inter) |
|
41 |
|
-- (ActorId4 |- inter) --++(0, 0.5); |
|
42 |
|
|
|
43 |
|
\draw[FK] % From ACTING.MovieTitle to MOVIE.Title |
|
44 |
|
(Title2)++(0.1,0) -- ++(0,-.55) -- ++(4,0) |
|
45 |
|
-- ++(0,2) |
|
46 |
|
coordinate (inter) |
|
47 |
|
-- (MovieTitle4 |- inter) --++(0, 1); |
|
48 |
|
|
|
49 |
|
\draw[FK] % From SHOWING.MovieTitle to THEATER.Name |
|
50 |
|
(Name3) -- ++(0,-.55) |
|
51 |
|
coordinate (inter) |
|
52 |
|
-- (TheaterName5 |- inter) --++(0, 3); |
|
53 |
|
|
|
54 |
|
\draw[FK] % From SHOWING.TheaterName to MOVIE.Title |
|
55 |
|
(Title2)++(-0.1,0) -- ++(0,-.75) |
|
56 |
|
coordinate (inter) |
|
57 |
|
-- (MovieTitle5 |- inter) --++(0, 0.7); |
|
58 |
|
\end{tikzpicture} |
|
59 |
|
\end{document} |
File notes/fig/rel_mod/auction.tex added (mode: 100644) (index 0000000..b094b29) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% MEMBER (ID (PK), Email, Nickname) |
|
5 |
|
% SELLER (ID (PK, FK to MEMBER.Id), Rating, BankAccount) |
|
6 |
|
% BUYER (ID (PK, FK to MEMBER.ID), Payment, Address) |
|
7 |
|
% ITEM (ID (PK), SoldBy (FK to SELLER.ID), Name, StartingPrice) |
|
8 |
|
% BID (ID (PK), Price, Timestamp, By (FK to MEMBER.ID), For (FK to ITEM.ID)) |
|
9 |
|
|
|
10 |
|
\Frame(0,0){1}[SELLER]{ |
|
11 |
|
ID/PK, |
|
12 |
|
Rating/A, |
|
13 |
|
BankAccount/A}; |
|
14 |
|
|
|
15 |
|
|
|
16 |
|
\Frame(0,-4){2}[BUYER]{ |
|
17 |
|
ID/PK, |
|
18 |
|
Payment/A, |
|
19 |
|
Address/A}; |
|
20 |
|
|
|
21 |
|
\Frame(4,-2){3}[MEMBER]{ |
|
22 |
|
ID/PK, |
|
23 |
|
Email/A, |
|
24 |
|
Nickname/A}; |
|
25 |
|
|
|
26 |
|
\Frame(8,0){4}[ITEM]{ |
|
27 |
|
ID/PK, |
|
28 |
|
SoldBy/A, |
|
29 |
|
Name/A, |
|
30 |
|
StartingPrice/A}; |
|
31 |
|
|
|
32 |
|
\Frame(8,-4){5}[BID]{ |
|
33 |
|
ID/PK, |
|
34 |
|
Price/A, |
|
35 |
|
Timestamp/A, |
|
36 |
|
By/A, |
|
37 |
|
For/A}; |
|
38 |
|
|
|
39 |
|
|
|
40 |
|
\draw[FK] % From SELLER.ID to MEMBER.ID |
|
41 |
|
(ID3)++(0,0) -- ++(0,-2.2) coordinate (inter) |
|
42 |
|
-- (ID1 |- inter) --++(0, 0.2); |
|
43 |
|
|
|
44 |
|
\draw[FK] % From BUYER.ID to MEMBER.ID |
|
45 |
|
(ID3)++(-0.15,0) -- ++(0,-0.5) coordinate (inter) |
|
46 |
|
-- (ID2 |- inter) --++(0, 2.5); |
|
47 |
|
|
|
48 |
|
\draw[FK] % From ITEM.SoldBy to SELLER.ID |
|
49 |
|
(ID1)++(0.15,0) -- ++(0,-.45) coordinate (inter) |
|
50 |
|
-- (SoldBy4 |- inter) --++(0, 0.55); |
|
51 |
|
|
|
52 |
|
|
|
53 |
|
\draw[FK] % From BID.By to MEMBER.ID |
|
54 |
|
(ID3)++(0.15,0) -- ++(0,-2.2) --++(1, 0) coordinate (inter) |
|
55 |
|
-- (By5 |- inter) --++(0, 0.3); |
|
56 |
|
|
|
57 |
|
|
|
58 |
|
\draw[FK] % From BID.For to ITEM.ID |
|
59 |
|
(ID4) -- ++(0,-2.55) -- ++(5, 0.0) -- ++(0, -1.65) |
|
60 |
|
coordinate (inter) -- (For5|- inter) --++(0, 0.3); |
|
61 |
|
|
|
62 |
|
\end{tikzpicture} |
|
63 |
|
\end{document} |
File notes/fig/rel_mod/bike_fk.tex added (mode: 100644) (index 0000000..37d3df5) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
|
|
5 |
|
% ACTOR(Id (PK), Name, Birthdate) |
|
6 |
|
% MOVIE(Title (PK), Year, Length, Studio) |
|
7 |
|
% THEATER(Name (PK), Street, City, State, Zip) |
|
8 |
|
% ACTING(ActorId (PK, FK to ACTOR.Id), MovieTitle (PK, FK to MOVIE.Title)) |
|
9 |
|
% SHOWING(TheaterName (PK, FK to THEATER.Name), MovieTitle(PK, FK to MOVIE.Title), Day (PK), Time (PK)) |
|
10 |
|
|
|
11 |
|
\Frame(0,0){1}[CUSTOMER]{ |
|
12 |
|
Name/PK, |
|
13 |
|
Phone/A, |
|
14 |
|
AssignedEmployee/A, |
|
15 |
|
LevelOfSatisfaction/A}; |
|
16 |
|
|
|
17 |
|
\Frame(0,-2.5){2}[BIKE]{ |
|
18 |
|
DroppedTimeDate/PK, |
|
19 |
|
Customer/PK, |
|
20 |
|
Color/A, |
|
21 |
|
Brand/A, |
|
22 |
|
RepairedBy/A}; |
|
23 |
|
|
|
24 |
|
\Frame(10,0){3}[EMPLOYEE]{ |
|
25 |
|
Name/PK}; |
|
26 |
|
|
|
27 |
|
\Frame(10,-2.5){4}[SPECIALTY]{ |
|
28 |
|
Employee/PK, |
|
29 |
|
Specialty/PK}; |
|
30 |
|
|
|
31 |
|
\draw[FK] % From CUSTOMER.AssignedEmployee to EMPLOYEE.Name |
|
32 |
|
(Name3)++(-0.2,0) -- ++(0,-.55) coordinate (inter) |
|
33 |
|
-- (AssignedEmployee1 |- inter) --++(0, 0.5); |
|
34 |
|
|
|
35 |
|
\draw[FK] % From BIKE.Customer to CUSTOMER.Name |
|
36 |
|
(Name1)++(0.1,0) -- ++(0,-0.5) --++(-1.5, 0) |
|
37 |
|
--++(0, -3) |
|
38 |
|
coordinate (inter) |
|
39 |
|
-- (Customer2 |- inter) --++(0, 1); |
|
40 |
|
|
|
41 |
|
\draw[FK] % From BIKE.RepairedBy to EMPLOYEE.Name |
|
42 |
|
(Name3)++(0,0) -- ++(0,-.75)--++(-1, 0) --++(0, -3) |
|
43 |
|
coordinate (inter) |
|
44 |
|
-- (RepairedBy2 |- inter) --++(0, 1.3); |
|
45 |
|
|
|
46 |
|
\draw[FK] % From SPECIALTY.Employee to EMPLOYEE.Name |
|
47 |
|
(Name3)++(0.2,0) -- ++(0,-.85)--++(-1, 0) --++(0, -2.9) |
|
48 |
|
coordinate (inter) |
|
49 |
|
-- (Employee4 |- inter) --++(0, 1.25); |
|
50 |
|
\end{tikzpicture} |
|
51 |
|
\end{document} |
File notes/fig/rel_mod/bill.tex added (mode: 100644) (index 0000000..1666204) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
|
|
5 |
|
% BILL(Name, Sponsor (FK to MEMBER.Id), Date, Id (PK)) |
|
6 |
|
% MEMBER(Name, Political Group, BTerm, ETerm, Id (PK)) |
|
7 |
|
% REPRESENTATIVE(Role (PK), Member (FK to MEMBER.Id)) |
|
8 |
|
% VOTE(Bill (PK, FK to BILL.Id), Member (PK, FK to MEMBER.Id)) |
|
9 |
|
|
|
10 |
|
\Frame(0,0){1}[BILL]{ |
|
11 |
|
Name/A, |
|
12 |
|
Sponsor/A, |
|
13 |
|
Date/A, |
|
14 |
|
Id/PK}; |
|
15 |
|
|
|
16 |
|
\Frame(0,-2.5){2}[MEMBER]{ |
|
17 |
|
Name/A, |
|
18 |
|
Political Group/A, |
|
19 |
|
BTerm/A, |
|
20 |
|
ETerm/A, |
|
21 |
|
Id/PK}; |
|
22 |
|
|
|
23 |
|
\Frame(0,-5){3}[REPRESENTATIVES]{ |
|
24 |
|
Role/PK, |
|
25 |
|
Member/A}; |
|
26 |
|
|
|
27 |
|
\Frame(8,0){4}[VOTE]{ |
|
28 |
|
Bill/PK, |
|
29 |
|
Member/PK}; |
|
30 |
|
|
|
31 |
|
\draw[FK] % From VOTE.Bill to BILL.Id |
|
32 |
|
(Id1) -- ++(0,-.55) coordinate (inter) |
|
33 |
|
-- (Bill4 |- inter) --++(0, 0.5); |
|
34 |
|
|
|
35 |
|
\draw[FK] % From VOTE.Member to MEMBER.Id |
|
36 |
|
(Id2)++(0.2,0) -- ++(0,-0.6) |
|
37 |
|
coordinate (inter) -- (Member4 |- inter) --(Member4); |
|
38 |
|
|
|
39 |
|
\draw[FK] % From BILL.Sponsor to MEMBER.Id |
|
40 |
|
(Id2)++(-0.1,0) --++ (0, -0.6) -- ++(-7,0) -- ++(0, 2.5) |
|
41 |
|
coordinate (inter) -- (Sponsor1 |- inter) --(Sponsor1); |
|
42 |
|
|
|
43 |
|
\draw[FK] % From REPRESENTATIVES.Member to MEMBER.Id |
|
44 |
|
(Id2)++(0.05,0) --++ (0, -3) |
|
45 |
|
coordinate (inter) -- (Member3 |- inter) --(Member3) --++ (0, 0.1); |
|
46 |
|
|
|
47 |
|
\end{tikzpicture} |
|
48 |
|
\end{document} |
File notes/fig/rel_mod/book_sol.tex added (mode: 100644) (index 0000000..401f1ee) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% AUTHOR(Ref (PK), Name, Address) |
|
5 |
|
% BOOK(ISSN (PK), AuthorRef (FK to AUTHOR.REF), Title) |
|
6 |
|
% GAINED-AWARD(Ref (PK), Name, BookISSN (FK to BOOK.ISSN), Year) |
|
7 |
|
|
|
8 |
|
\Frame(0,0){1}[AUTHOR]{ |
|
9 |
|
Ref/PK, |
|
10 |
|
Name/A, |
|
11 |
|
Address/A}; |
|
12 |
|
|
|
13 |
|
\Frame(0,-2.5){2}[BOOK]{ |
|
14 |
|
ISSN/PK, |
|
15 |
|
AuthorRef/A, |
|
16 |
|
Title/A}; |
|
17 |
|
|
|
18 |
|
\Frame(0,-5){3}[GAINED-AWARD]{ |
|
19 |
|
Ref/PK, |
|
20 |
|
Name/A, |
|
21 |
|
BookISSN/A, |
|
22 |
|
Year/A}; |
|
23 |
|
|
|
24 |
|
\draw[FK] % From AuthorRef2 to Ref1 |
|
25 |
|
(Ref1)++(0.1,0) -- ++(0,-.55) -- ++(4.5,0) coordinate (inter) |
|
26 |
|
-- (AuthorRef2 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
27 |
|
-- (AuthorRef2 |- inter) --++(0,0.5); |
|
28 |
|
|
|
29 |
|
\draw[FK] % From BookISSN3 to ISSN2 |
|
30 |
|
(ISSN2)++(0.1,0) -- ++(0,-.55) -- ++(-1.1,0) coordinate (inter) |
|
31 |
|
-- (BookISSN3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
32 |
|
-- (BookISSN3 |- inter) --++(0,0.5); |
|
33 |
|
|
|
34 |
|
\end{tikzpicture} |
|
35 |
|
\end{document} |
File notes/fig/rel_mod/car_01.tex added (mode: 100644) (index 0000000..acf80b4) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% CAR(VIN (PK), Make, Model, Year) |
|
5 |
|
% DRIVER(State (PK), Licence-number (PK), Name, Address) |
|
6 |
|
% INSURANCE(Policy-Number (PK), Insured-Car (FK to CAR.VIN), Insured-Driver-State (FK to DRIVER.State), |
|
7 |
|
% Insured-Driver-Num (FK to DRIVER.Licence-number), Rate) |
|
8 |
|
% PRICE(Stock-number (PK), Car-Vin (FK to CAR.VIN), Price, Margin) |
|
9 |
|
|
|
10 |
|
\Frame(0,0){1}[CAR]{ |
|
11 |
|
VIN/PK, |
|
12 |
|
Make/A, |
|
13 |
|
Model/A, |
|
14 |
|
Year/A}; |
|
15 |
|
|
|
16 |
|
\Frame(0,-2.5){2}[DRIVER]{ |
|
17 |
|
State/PK, |
|
18 |
|
Licence-Num/PK, |
|
19 |
|
Name/A, |
|
20 |
|
Address/A}; |
|
21 |
|
|
|
22 |
|
\Frame(0,-5){3}[INSURANCE]{ |
|
23 |
|
Policy-Num/PK, |
|
24 |
|
Insured-Car/A, |
|
25 |
|
Insured-Driver-State/A, |
|
26 |
|
Insured-Driver-Licence-Num/A, |
|
27 |
|
Rate/A}; |
|
28 |
|
|
|
29 |
|
\Frame(0,-7.5){4}[PRICE]{ |
|
30 |
|
Car-VIN/A, |
|
31 |
|
Price/A, |
|
32 |
|
Margin/A, |
|
33 |
|
Stock-Num/PK}; |
|
34 |
|
|
|
35 |
|
|
|
36 |
|
\draw[FK] % From Insured-Car3 to VIN1 |
|
37 |
|
(VIN1)++(0.1,0) -- ++(0,-.55) -- ++(-1.1,0) coordinate (inter) |
|
38 |
|
-- (Insured-Car3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
39 |
|
-- (Insured-Car3 |- inter) --++(0,0.4); |
|
40 |
|
|
|
41 |
|
\draw[FK] % From Car-VIN4 to VIN1 |
|
42 |
|
(VIN1)++(-0.1,0) -- ++(0,-.45) -- ++(-1.1,0) coordinate (inter) |
|
43 |
|
-- (Car-VIN4 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
44 |
|
-- (Car-VIN4 |- inter) --++(0,0.5); |
|
45 |
|
|
|
46 |
|
\draw[FK] % From Insured-Driver-State3 to State2 |
|
47 |
|
(State2) -- ++(0,-.7) coordinate (inter) -- (Insured-Driver-State3 |- inter) --++(0,-1.1); |
|
48 |
|
|
|
49 |
|
\draw[FK] % From Insured-Driver-Licence-Num3 to Licence-Num2 |
|
50 |
|
(Licence-Num2) -- ++(0,-.5) coordinate (inter) -- (Insured-Driver-Licence-Num3 |- inter) --++(0,-1.3); |
|
51 |
|
|
|
52 |
|
\end{tikzpicture} |
|
53 |
|
\end{document} |
File notes/fig/rel_mod/car_info.tex added (mode: 100644) (index 0000000..8e2516e) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% PHONE(OwnerId (PK, FK to PERSON.Id), Number (PK)) |
|
5 |
|
% PERSON(Id (PK), Name, Street, City, Seat (FK to CAR.Vin), Position) |
|
6 |
|
% CAR(Vin (PK), Make, Year, Brand, Driver (FK to PERSON.Id)) |
|
7 |
|
% CAR INSURANCE(Insured Car (PK, FK to CAR.Vin), Policy Number (PK), Covered Amount, Company Name) |
|
8 |
|
|
|
9 |
|
\Frame(0,0){1}[PHONE]{ |
|
10 |
|
OwnerId/PK, |
|
11 |
|
Number/PK}; |
|
12 |
|
|
|
13 |
|
\Frame(0,-2.5){2}[PERSON]{ |
|
14 |
|
Id/PK, |
|
15 |
|
Name/A, |
|
16 |
|
Street/A, |
|
17 |
|
City/A, |
|
18 |
|
Seat/A, |
|
19 |
|
Position/A}; |
|
20 |
|
|
|
21 |
|
\Frame(0,-5){3}[CAR]{ |
|
22 |
|
Vin/PK, |
|
23 |
|
Make/A, |
|
24 |
|
Year/A, |
|
25 |
|
Brand/A, |
|
26 |
|
Driver/A}; |
|
27 |
|
|
|
28 |
|
\Frame(0,-7.5){4}[CAR INSURANCE]{ |
|
29 |
|
Insured Car/PK, |
|
30 |
|
Policy Number/PK, |
|
31 |
|
Covered Amount/A, |
|
32 |
|
Company Name/A}; |
|
33 |
|
|
|
34 |
|
\draw[FK] % From PHONE.OwnerId to PERSON.Id |
|
35 |
|
(Id2)++(-0.1,0) -- ++(0,-.55) -- ++(-1,0) -- ++(0,2.5) coordinate (inter) |
|
36 |
|
-- (OwnerId1 |- inter) -- ++(0, 0.55); |
|
37 |
|
|
|
38 |
|
\draw[FK] % From CAR.Driver to PERSON.Id |
|
39 |
|
(Id2)++(0.1,0) -- ++(0,-.55) -- ++ (5.5, 0)--++(0, -2.1) |
|
40 |
|
coordinate (inter) |
|
41 |
|
-- (Driver3 |- inter) -- ++(0, 0.25); |
|
42 |
|
|
|
43 |
|
\draw[FK] % From PERSON.Seat to CAR.Vin |
|
44 |
|
(Vin3)++(0.1, 0) -- ++(0,-.55) -- ++ (6, 0)--++(0, 3) |
|
45 |
|
coordinate (inter) |
|
46 |
|
-- (Seat2 |- inter) -- ++(0, 0.15); |
|
47 |
|
|
|
48 |
|
\draw[FK] % From CAR INSURANCE.Insured Car to CAR.Vin |
|
49 |
|
(Vin3)++(-0.1, 0) -- ++(0,-.55) -- ++ (-1, 0)--++(0, -2.1) |
|
50 |
|
coordinate (inter) |
|
51 |
|
-- (Insured Car4 |- inter) -- ++(0, 0.15); |
|
52 |
|
\end{tikzpicture} |
|
53 |
|
\end{document} |
File notes/fig/rel_mod/cinema.tex added (mode: 100644) (index 0000000..2d79ea6) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
%STAR(Id (PK), Name, BirthDate) |
|
5 |
|
%MOVIE(Id (PK), Title, Year, Length, Genre) |
|
6 |
|
%FEATURE-IN(StarId (PK, FK to STAR.Id), MovieId (PK, FK to MOVIE.Id)) |
|
7 |
|
%THEATER(Id (PK), Name, Address) |
|
8 |
|
%AUDITORIUM(Id (PK), Capacity, Theater (FK to THEATER.Id)) |
|
9 |
|
%SHOWTIME(Id (PK), MovieId (FK to MOVIE.Id), AuditoriumId (FK to AUDITORIUM.Id), StartTime) |
|
10 |
|
%TICKETS(Id (PK), ShowTimeId (FK to SHOWTIME.Id), Price) |
|
11 |
|
|
|
12 |
|
\Frame(0,0){1}[STAR]{ |
|
13 |
|
Id/PK, |
|
14 |
|
Name/A, |
|
15 |
|
BirthDate/A}; |
|
16 |
|
|
|
17 |
|
\Frame(0,-2.5){2}[MOVIE]{ |
|
18 |
|
Id/PK, |
|
19 |
|
Title/A, |
|
20 |
|
Year/A, |
|
21 |
|
Length/A, |
|
22 |
|
Genre/A}; |
|
23 |
|
|
|
24 |
|
\Frame(0,-5){3}[FEATURE-IN]{ |
|
25 |
|
StarId/PK, |
|
26 |
|
MovieId/PK}; |
|
27 |
|
|
|
28 |
|
\Frame(8,0){4}[THEATER]{ |
|
29 |
|
Id/PK, |
|
30 |
|
Name/A, |
|
31 |
|
Address/A}; |
|
32 |
|
|
|
33 |
|
\Frame(8,-2.5){5}[AUDITORIUM]{ |
|
34 |
|
Id/PK, |
|
35 |
|
Capacity/A, |
|
36 |
|
Theater/A}; |
|
37 |
|
|
|
38 |
|
\Frame(8,-5){6}[SHOWTIME]{ |
|
39 |
|
Id/PK, |
|
40 |
|
MovieId/A, |
|
41 |
|
AuditoriumId/A, |
|
42 |
|
StartTime/A}; |
|
43 |
|
|
|
44 |
|
|
|
45 |
|
\Frame(8,-7.5){7}[TICKET]{ |
|
46 |
|
Id/PK, |
|
47 |
|
ShowTimeId/A, |
|
48 |
|
Price/A}; |
|
49 |
|
|
|
50 |
|
\draw[FK] % From StarId3 to Id1 |
|
51 |
|
(Id1)++(0.1,0) -- ++(0,-.55) -- ++(-1.1,0) coordinate (inter) |
|
52 |
|
-- (StarId3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
53 |
|
-- (StarId3 |- inter) --++(0, 0.4); |
|
54 |
|
|
|
55 |
|
\draw[FK] % From MovieId3 to Id2 |
|
56 |
|
(Id2)++(-0.1,0) -- ++(0,-.75) -- ++(3,0) coordinate (inter) |
|
57 |
|
-- (MovieId3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
58 |
|
-- (MovieId3 |- inter) --++(0,0.4); |
|
59 |
|
|
|
60 |
|
\draw[FK] % From Theater5 to Id4 |
|
61 |
|
(Id4)++(0.1,0) -- ++(0,-.55) -- ++(3.5,0) coordinate (inter) |
|
62 |
|
-- (Theater5 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
63 |
|
-- (Theater5 |- inter) --++(0,0.3); |
|
64 |
|
|
|
65 |
|
\draw[FK] % From MovieId6 to Id2 |
|
66 |
|
(Id2)++(0.1,0) -- ++(0,-.55) -- ++(3.2,0) coordinate (inter) |
|
67 |
|
-- (MovieId6 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
68 |
|
-- (MovieId6 |- inter) --++(0,0.5); |
|
69 |
|
|
|
70 |
|
\draw[FK] % From AuditoriumId6 to Id5 |
|
71 |
|
(Id5)++(0.1,0) -- ++(0,-.55) -- ++(6,0) coordinate (inter) |
|
72 |
|
-- (AuditoriumId6 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
73 |
|
-- (AuditoriumId6 |- inter) --++(0,0.3); |
|
74 |
|
|
|
75 |
|
|
|
76 |
|
\draw[FK] % From ShowTimeId7 to Id6 |
|
77 |
|
(Id6)++(0.1,0) -- ++(0,-.8) -- ++(-.7,0) coordinate (inter) |
|
78 |
|
-- (ShowTimeId7 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
79 |
|
-- (ShowTimeId7 |- inter) --++(0,0.3); |
|
80 |
|
|
|
81 |
|
\end{tikzpicture} |
|
82 |
|
\end{document} |
File notes/fig/rel_mod/coffee.tex added (mode: 100644) (index 0000000..5ba9129) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% COFFEE (Ref (PK), Origin, TypeOfRoast, PricePerPound) |
|
5 |
|
% CUSTOMER (CardNo (PK), Name, Email, FavCoffee (FK to COFFEE.Ref)) |
|
6 |
|
% SUPPLY (Provider (PK, FK to PROVIDEV.Id), Coffee (PK, FK to COFEE.Ref)) |
|
7 |
|
% PROVIDER (Name (PK), Email) |
|
8 |
|
|
|
9 |
|
\Frame(0,0){1}[COFFEE]{ |
|
10 |
|
Ref/PK, |
|
11 |
|
Origin/A, |
|
12 |
|
TypeOfRoast/A, |
|
13 |
|
PricePerPound/A}; |
|
14 |
|
|
|
15 |
|
\Frame(0,-2.5){2}[CUSTOMER]{ |
|
16 |
|
CardNo/PK, |
|
17 |
|
Name/A, |
|
18 |
|
Email/A, |
|
19 |
|
FavCoffee/A}; |
|
20 |
|
|
|
21 |
|
\Frame(8,0){3}[SUPPLY]{ |
|
22 |
|
Coffee/PK, |
|
23 |
|
Provider/PK}; |
|
24 |
|
|
|
25 |
|
\Frame(8,-2.5){4}[PROVIDER]{ |
|
26 |
|
Name/PK, |
|
27 |
|
Email/A}; |
|
28 |
|
|
|
29 |
|
\draw[FK] % From SUPPLY.Provider to COFFEE.Ref |
|
30 |
|
(Ref1)++(0.1,0) -- ++(0,-.55) coordinate (inter) |
|
31 |
|
-- (Coffee3 |- inter) --++(0, 0.5); |
|
32 |
|
|
|
33 |
|
\draw[FK] % From SUPPLY.Coffee to PROVIDER.Name |
|
34 |
|
(Name4) -- ++(0,-.55) -- ++(2, 0.0) -- ++(0, 2.5) -- |
|
35 |
|
coordinate (inter) (Provider3|- inter) --++(0, 0.5); |
|
36 |
|
|
|
37 |
|
\draw[FK] % From CUSTOMER.CardNo to COFFEE.Ref |
|
38 |
|
(Ref1)++(-0.1,0) -- ++(0, -0.55) -- ++(-1, 0) -- ++(0, -2.5) |
|
39 |
|
coordinate (inter) -- (FavCoffee2|- inter) --++(0, 0.5); |
|
40 |
|
|
|
41 |
|
|
|
42 |
|
\end{tikzpicture} |
|
43 |
|
\end{document} |
File notes/fig/rel_mod/employee.tex added (mode: 100644) (index 0000000..aab5c3d) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
\Frame(0,0){1}[PKLOYEE]{ |
|
5 |
|
Fname/A, |
|
6 |
|
Minit/A, |
|
7 |
|
Lname/A, |
|
8 |
|
Ssn/PK, |
|
9 |
|
Bdate/A, |
|
10 |
|
Address/A, |
|
11 |
|
Sex/A, |
|
12 |
|
Salary/A, |
|
13 |
|
Super-Ssn/A, |
|
14 |
|
Dno/A}; |
|
15 |
|
|
|
16 |
|
\Frame(0,-2.5){2}[DEPARTMENT]{ |
|
17 |
|
Dname/A, |
|
18 |
|
Dnumber/PK, |
|
19 |
|
Mgr-ssn/A, |
|
20 |
|
Mgr-Start-date/A}; |
|
21 |
|
|
|
22 |
|
\Frame(0,-5){3}[DEPT-LOCATIONS]{ |
|
23 |
|
Dnumber/PK, |
|
24 |
|
Dlocations/PK}; |
|
25 |
|
|
|
26 |
|
\Frame(0,-7.5){4}[PROJECT]{ |
|
27 |
|
Pname/A, |
|
28 |
|
Pnumber/PK, |
|
29 |
|
Plocation/A, |
|
30 |
|
Dnum/A}; |
|
31 |
|
|
|
32 |
|
\Frame(0,-10){5}[WORKS ON]{ |
|
33 |
|
Essn/PK, |
|
34 |
|
Pno/PK, |
|
35 |
|
Hours/A}; |
|
36 |
|
|
|
37 |
|
\Frame(0,-12.5){6}[DEPENDENT]{ |
|
38 |
|
Essn/PK, |
|
39 |
|
Dependent-Name/A, |
|
40 |
|
Sex/A, |
|
41 |
|
Bdate/A, |
|
42 |
|
Relationship/A}; |
|
43 |
|
|
|
44 |
|
\draw[FK] % From Essn6 to Ssn1 |
|
45 |
|
(Ssn1)++(0.1,0) -- ++(0,-.55) -- ++(4.5,0) coordinate (inter) %inter is the name of coordinate register |
|
46 |
|
-- (Essn6 -| inter) -- ++(0,-0.4) coordinate (inter) % to calculate intersections. |
|
47 |
|
-- (Essn6 |- inter) --++(0,0.4); % |
|
48 |
|
%Essn -- Ssn id 5 |
|
49 |
|
\draw[FK] |
|
50 |
|
(Ssn1)++(-0.1,0) -- ++(0,-.7) -- ++(4.55,0) coordinate (inter) %some shift using (Ssn1)++(shiftx,shifty) |
|
51 |
|
-- (Essn5 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
52 |
|
-- (Essn5 |- inter) --++(0,0.4); % |
|
53 |
|
\draw[FK] |
|
54 |
|
(Pnumber4) -- ++(0,-.5) -- ++(1,0) coordinate (inter) |
|
55 |
|
-- (Pno5 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
56 |
|
-- (Pno5 |- inter) --++(0,0.2); % |
|
57 |
|
|
|
58 |
|
\draw[FK] |
|
59 |
|
(Dnumber2) -- ++(0,-.75) -- ++(4,0) coordinate (inter) |
|
60 |
|
-- (Dnum4 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
61 |
|
-- (Dnum4|- inter) --++(0,0.2); % |
|
62 |
|
|
|
63 |
|
\draw[FK] |
|
64 |
|
(Dnumber2)++(-.2,0) -- ++(0,-.9) -- ++(1.75,0) coordinate (inter) |
|
65 |
|
-- (Dnumber3 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
66 |
|
-- (Dnumber3 |- inter) --++(0,0.2); % |
|
67 |
|
|
|
68 |
|
\draw[FK] |
|
69 |
|
(Ssn1)++(-0.3,0) -- ++(0,-0.85) -- ++(3.5,0) coordinate (inter) |
|
70 |
|
-- (Mgr-ssn2 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
71 |
|
-- (Mgr-ssn2 |- inter) --++(0,0.3); % |
|
72 |
|
|
|
73 |
|
\draw[FK] |
|
74 |
|
(Dnumber2)++(0.2,0) -- ++(0,-.6) coordinate (inter) -- (Dno1 |- inter) -- (Dno1); % |
|
75 |
|
|
|
76 |
|
\draw[FK] |
|
77 |
|
(Ssn1)++(0.3,0) -- ++(0,-.4) coordinate (inter) -- (Super-Ssn1 |- inter) -- (Super-Ssn1); % |
|
78 |
|
|
|
79 |
|
\end{tikzpicture} |
|
80 |
|
\end{document} |
File notes/fig/rel_mod/mapping_relationships_02.tex added (mode: 100644) (index 0000000..65409b4) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% ENT.A(KeyA (PK)) |
|
5 |
|
% ENT.B(KeyB (PK)) |
|
6 |
|
% MAPPING(KeyA (PK, FK referencing ENT.A.KeyA), KeyB(FK referencing ENT.B.KeyB)) |
|
7 |
|
|
|
8 |
|
\Frame(0,0){1}[ENT.A]{ |
|
9 |
|
KeyA/PK}; |
|
10 |
|
|
|
11 |
|
|
|
12 |
|
\Frame(4, 0){2}[MAPPING]{ |
|
13 |
|
KeyA/PK, |
|
14 |
|
KeyB/A}; |
|
15 |
|
|
|
16 |
|
\Frame(8, 0){3}[ENT.B]{ |
|
17 |
|
KeyB/PK}; |
|
18 |
|
|
|
19 |
|
\draw[FK] % From MAPPING.KeyA to ENT.A.KeyA |
|
20 |
|
(KeyA1)++(0,0) -- ++(0,-.5) -- ++(-0,0) coordinate (inter) |
|
21 |
|
-- (KeyA2 |- inter) --++(0,0.5); |
|
22 |
|
|
|
23 |
|
\draw[FK] % From MAPPING.KeyB to ENT.B.KeyB |
|
24 |
|
(KeyB3)++(0,0) -- ++(0,-.5) -- ++(-0,0) coordinate (inter) |
|
25 |
|
-- (KeyB2 |- inter) --++(0,0.5); |
|
26 |
|
\end{tikzpicture} |
|
27 |
|
\end{document} |
File notes/fig/rel_mod/mapping_relationships_05.tex added (mode: 100644) (index 0000000..b512773) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% ENT.A(KeyA (PK)) |
|
5 |
|
% REL(KeyA1 (PK, FK referencing Ent.A.KeyA), KeyA2 (FK referencing Ent.A.KeyA)) |
|
6 |
|
|
|
7 |
|
\Frame(0,0){1}[ENT.A]{ |
|
8 |
|
KeyA/PK}; |
|
9 |
|
|
|
10 |
|
\Frame(4, 0){2}[REL]{ |
|
11 |
|
KeyA1/PK, |
|
12 |
|
KeyA2/A}; |
|
13 |
|
|
|
14 |
|
\draw[FK] % From REL.KeyA to ENT.A.KeyA |
|
15 |
|
(KeyA1)++(.1,0) -- ++(0,-.5) -- ++(-0,0) coordinate (inter) |
|
16 |
|
-- (KeyA12 |- inter) --++(0,0.5); |
|
17 |
|
|
|
18 |
|
\draw[FK] % From REL.KeyA to ENT.A.KeyA |
|
19 |
|
(KeyA1)++(-.1,0) -- ++(0,-.8) -- ++(-0,0) coordinate (inter) |
|
20 |
|
-- (KeyA22 |- inter) --++(0,0.8); |
|
21 |
|
\end{tikzpicture} |
|
22 |
|
\end{document} |
File notes/fig/rel_mod/network_library.tex added (mode: 100644) (index 0000000..5b17d31) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% LIBRARY(Name (PK), AddNumber, AddStreet, AddZip) |
|
5 |
|
% COPY(Location (FK to LIBRARY.Name), Document (FK to DOCUMENT.Reference), Code (PK)) |
|
6 |
|
% DOCUMENT(Reference (PK), Kind, Title) |
|
7 |
|
% BORROWING(Copy (PK, FK to COPY.Code), Patron (PK, FK to PATRON.CardNumber), ReturnDate) |
|
8 |
|
% PATRON(CardNumber (PK), Name, Email) |
|
9 |
|
% HOLD(Copy (PK, FK to COPY.Code), Patron (PK, FK to PATRON.CardNumber), ExpirationDate) |
|
10 |
|
|
|
11 |
|
\Frame(0,0){1}[LIBRARY]{ |
|
12 |
|
Name/PK, |
|
13 |
|
AddNumber/A, |
|
14 |
|
AddStreet/A, |
|
15 |
|
AddZip/A}; |
|
16 |
|
|
|
17 |
|
\Frame(0,-2.5){2}[COPY]{ |
|
18 |
|
Location/A, |
|
19 |
|
Document/A, |
|
20 |
|
Code/PK}; |
|
21 |
|
|
|
22 |
|
\Frame(0,-5){3}[DOCUMENT]{ |
|
23 |
|
Reference/PK, |
|
24 |
|
Kind/A, |
|
25 |
|
Title/A}; |
|
26 |
|
|
|
27 |
|
\Frame(8,0){4}[BORROWING]{ |
|
28 |
|
Copy/PK, |
|
29 |
|
Patron/PK, |
|
30 |
|
ReturnDate/A}; |
|
31 |
|
|
|
32 |
|
\Frame(8,-2.5){5}[PATRON]{ |
|
33 |
|
CardNumber/PK, |
|
34 |
|
Name/A, |
|
35 |
|
Email/A}; |
|
36 |
|
|
|
37 |
|
\Frame(8,-5){6}[HOLD]{ |
|
38 |
|
Copy/PK, |
|
39 |
|
Patron/PK, |
|
40 |
|
ExpirationDate/A}; |
|
41 |
|
|
|
42 |
|
|
|
43 |
|
\draw[FK] % From Location2 to Name1 |
|
44 |
|
(Name1) -- ++(0,-.55) -- ++(-1,0) coordinate (inter) |
|
45 |
|
-- (Location2 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
46 |
|
-- (Location2 |- inter) --++(0, 0.5); |
|
47 |
|
|
|
48 |
|
\draw[FK] % From Document2 to Reference3 |
|
49 |
|
(Reference3) -- ++(0,-.55) -- ++(-1.3,0) -- ++(0,2.5) coordinate (inter) |
|
50 |
|
-- (Document2 |- inter) --++(0, 0.65); |
|
51 |
|
|
|
52 |
|
\draw[FK] % From Copy4 to Code2 |
|
53 |
|
(Code2)++(0.1,0) -- ++(0,-.45) -- ++(0.8,0) -- ++(0,2.5) coordinate (inter) |
|
54 |
|
-- (Copy4 |- inter) --++(0, 0.45); |
|
55 |
|
|
|
56 |
|
\draw[FK] % From Copy6 to Code2 |
|
57 |
|
(Code2)++(-0.1,0) -- ++(0,-.65) -- ++(1,0) -- ++(0,-2.35) coordinate (inter) |
|
58 |
|
-- (Copy6 |- inter) --++(0, 0.5); |
|
59 |
|
|
|
60 |
|
\draw[FK] % From Patron4 to CardNumber5 |
|
61 |
|
(CardNumber5)++(-0.1,0) -- ++(0,-.65) -- ++(4.2,0) -- ++(0,-2.35) coordinate (inter) |
|
62 |
|
-- (Patron4 |- inter) --++(0, 0.5); |
|
63 |
|
|
|
64 |
|
\draw[FK] % From Patron6 to CardNumber5 |
|
65 |
|
(CardNumber5)++(0.1,0) -- ++(0,-.45) -- ++(4,0) -- ++(0,2.35) coordinate (inter) |
|
66 |
|
-- (Patron6 |- inter) --++(0, 0.6); |
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
\end{tikzpicture} |
|
71 |
|
\end{document} |
File notes/fig/rel_mod/professor_department.tex added (mode: 100644) (index 0000000..36149dc) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% PROF(Login (PK), Name, Department (FK to DEPARTMENT.Code)) |
|
5 |
|
% DEPARTMENT(Code (PK), Name, Head (FK to PROF.Login)) |
|
6 |
|
|
|
7 |
|
\Frame(0,0){1}[PROF]{ |
|
8 |
|
Login/PK, |
|
9 |
|
Name/A, |
|
10 |
|
Department/A}; |
|
11 |
|
|
|
12 |
|
\Frame(5, 0){2}[DEPARTMENT]{ |
|
13 |
|
Code/PK, |
|
14 |
|
Name/A, |
|
15 |
|
Head/A}; |
|
16 |
|
|
|
17 |
|
\draw[FK] % From Department1 to Code2 |
|
18 |
|
(Code2)++(0.1,0) -- ++(0,-.5) -- ++(-1,0) coordinate (inter) |
|
19 |
|
-- (Department1 |- inter) --++(0,0.6); |
|
20 |
|
|
|
21 |
|
\draw[FK] % From Head2 to Login1 |
|
22 |
|
(Login1)++(0.1,0) -- ++(0,-1) coordinate (inter) |
|
23 |
|
-- (Head2 |- inter) --++(0, 1.1); |
|
24 |
|
|
|
25 |
|
\end{tikzpicture} |
|
26 |
|
\end{document} |
File notes/fig/rel_mod/professor_department_extended.tex added (mode: 100644) (index 0000000..bf21c04) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% PROF(Login (PK), Name, Department (FK to DEPARTMENT.Code)) |
|
5 |
|
% DEPARTMENT(Code (PK), Name, Head (FK to PROF.Login)) |
|
6 |
|
% LECTURE (Code (PK), Year (PK), Name, Instructor (FK to PROF.Login) |
|
7 |
|
% STUDENT(Login (PK), Name, Registered, Major (FK to DEPARTMENT.Code)) |
|
8 |
|
% GRADE (Login (PK, FK to STUDENT.Login), Grade (PK), LectureCode (FK to LECTURE.Code), LectureYear (FK to LECTURE.Year)) |
|
9 |
|
|
|
10 |
|
\Frame(0,0){1}[PROF]{ |
|
11 |
|
Login/PK, |
|
12 |
|
Name/A, |
|
13 |
|
Department/A}; |
|
14 |
|
|
|
15 |
|
\Frame(5, 0){2}[DEPARTMENT]{ |
|
16 |
|
Code/PK, |
|
17 |
|
Name/A, |
|
18 |
|
Head/A}; |
|
19 |
|
|
|
20 |
|
\Frame(0, -3){4}[LECTURE]{ |
|
21 |
|
Code/PK, |
|
22 |
|
Year/PK, |
|
23 |
|
Name/A, |
|
24 |
|
Instructor/A}; |
|
25 |
|
|
|
26 |
|
|
|
27 |
|
\Frame(5, -3){3}[STUDENT]{ |
|
28 |
|
Login/PK, |
|
29 |
|
Name/A, |
|
30 |
|
Registered/A, |
|
31 |
|
Major/A}; |
|
32 |
|
|
|
33 |
|
\Frame(2.5, -6){5}[GRADE]{ |
|
34 |
|
Login/PK, |
|
35 |
|
Grade/PK, |
|
36 |
|
LectureCode/A, |
|
37 |
|
LectureYear/A}; |
|
38 |
|
|
|
39 |
|
\draw[FK] % From Department1 to Code2 |
|
40 |
|
(Code2)++(-0.1,0) -- ++(0,-.5) -- ++(-1,0) coordinate (inter) |
|
41 |
|
-- (Department1 |- inter) --++(0,0.6); |
|
42 |
|
|
|
43 |
|
\draw[FK] % From Major3 to Code2 |
|
44 |
|
(Code2)++(0.1,0) -- ++(0,-.5) -- ++(5,0) -- ++(0,-3) -- ++(-1.15, 0) -- (Major3); |
|
45 |
|
|
|
46 |
|
\draw[FK] % From Head2 to Login1 |
|
47 |
|
(Login1)++(0.1,0) -- ++(0,-1) coordinate (inter) |
|
48 |
|
-- (Head2 |- inter) --++(0, 1.1); |
|
49 |
|
|
|
50 |
|
%\draw[FK] % From Instructor4 to Login1 |
|
51 |
|
%(Login1)++(-0.1,0) -- ++(0, -.5) -- ++(-1,0) -- ++(0, -3) -- ++(4.36, 0) -- (Instructor4); |
|
52 |
|
|
|
53 |
|
\draw[FK] % From Instructor4 to Login1 |
|
54 |
|
(Login1)++(-0.1,0) -- ++(0, -1.5) -- ++(4.4,0) -- ++(0, -2) -- ++(-1.04, 0) -- |
|
55 |
|
(Instructor4); |
|
56 |
|
|
|
57 |
|
\draw[FK] % From Login5 to Login3 |
|
58 |
|
(Login3)-- ++(0, -1) -- ++(-3.5,0) -- ++(0, -2.5) -- ++(1, 0) -- (Login5); |
|
59 |
|
|
|
60 |
|
\draw[FK] % From LectureCode5 to Code4 |
|
61 |
|
(Code4)-- ++(0, -4) -- ++(5.19,0) --(LectureCode5); |
|
62 |
|
|
|
63 |
|
\draw[FK] % From LectureYear5 to Year4 |
|
64 |
|
(Year4)-- ++(0, -5) -- ++(6.3,0) --(LectureYear5); |
|
65 |
|
\end{tikzpicture} |
|
66 |
|
\end{document} |
File notes/fig/rel_mod/record.tex added (mode: 100644) (index 0000000..7a61541) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% RELEASED(Label (PK, FK to LABEL.Name), Recording (PK, FK to RECORDING.Title), Date) |
|
5 |
|
% EXCLUSITIVY(Recording (PK, FK to RECORDING.Title), Shop (FK to SHOP.Name)) |
|
6 |
|
% RECORDING(Name (PK)) |
|
7 |
|
% SHOP(Name (PK), StreetName, Citiy, Zip) |
|
8 |
|
% LABEL(Name (PK), Phone, LogoName, LogoColor) |
|
9 |
|
% SELL(Recording (FK, PK to RECORDING.Title), Shop (PK, FK to SHOP.Name), NumberOfCopies) |
|
10 |
|
% LABELGENRE(Label (PK, FK to LABEL.Name), Genre (PK)) |
|
11 |
|
|
|
12 |
|
\Frame(0,0){1}[RELEASE]{ |
|
13 |
|
Label/PK, |
|
14 |
|
Recording/PK, |
|
15 |
|
Date/A}; |
|
16 |
|
|
|
17 |
|
\Frame(0,-2.5){2}[EXCLUSITIVY]{ |
|
18 |
|
Recording/PK, |
|
19 |
|
Shop/A}; |
|
20 |
|
|
|
21 |
|
\Frame(6,0){3}[RECORDING]{ |
|
22 |
|
Title/PK}; |
|
23 |
|
|
|
24 |
|
\Frame(6,-2.5){4}[SHOP]{ |
|
25 |
|
Name/PK, |
|
26 |
|
StreetName/A, |
|
27 |
|
City/A, |
|
28 |
|
Zip/A}; |
|
29 |
|
|
|
30 |
|
\Frame(6,-5){5}[LABEL]{ |
|
31 |
|
Name/PK, |
|
32 |
|
Phone/A, |
|
33 |
|
LogoName/A, |
|
34 |
|
LogoColor/A}; |
|
35 |
|
|
|
36 |
|
\Frame(12,0){6}[SELL]{ |
|
37 |
|
Recording/PK, |
|
38 |
|
Shop/PK, |
|
39 |
|
NumberOfCopies/A}; |
|
40 |
|
|
|
41 |
|
|
|
42 |
|
\Frame(12,-5){7}[LABELGENRE]{ |
|
43 |
|
Label/PK, |
|
44 |
|
Genre/PK}; |
|
45 |
|
|
|
46 |
|
\draw[FK] % From Label1 to Name3⁵ |
|
47 |
|
(Name5)++(0.1,0) -- ++(0,-.55) -- ++(-7,0) |
|
48 |
|
-- ++(0,5) coordinate (inter) |
|
49 |
|
-- ++(0.87,0) coordinate (inter) |
|
50 |
|
-- (Label1); |
|
51 |
|
|
|
52 |
|
\draw[FK] % From Recording1 to Title3 |
|
53 |
|
(Title3)++(-0.3,0) -- ++(0,-.55) coordinate (inter) |
|
54 |
|
-- (Recording1|- inter) --++(0,0.55); |
|
55 |
|
|
|
56 |
|
\draw[FK] % From Recording2 to Title3 |
|
57 |
|
(Title3)++(0,0) -- ++(0,-.75) -- ++(-3,0) - ++(0,-2.3)coordinate (inter) |
|
58 |
|
-- (Recording2|- inter) --++(0,0.55); |
|
59 |
|
|
|
60 |
|
\draw[FK] % From Shop2 to Name4 |
|
61 |
|
(Name4)++(-0.1,0) -- ++(0,-.75) -- ++(-3,0) coordinate (inter) |
|
62 |
|
-- (Shop2|- inter) --++(0,0.85); |
|
63 |
|
|
|
64 |
|
\draw[FK] % From Recording6 to Title3 |
|
65 |
|
(Title3)++(0.3,0) -- ++(0,-.55) coordinate (inter) |
|
66 |
|
-- (Recording6|- inter) --++(0,0.55); |
|
67 |
|
|
|
68 |
|
\draw[FK] % From Shop6 to Name4 |
|
69 |
|
(Name4)++(0.3,0) -- ++(0,-.55) coordinate (inter) |
|
70 |
|
-- (Shop6|- inter) --++(0,3.05); |
|
71 |
|
|
|
72 |
|
\draw[FK] % From Label7 to Name53 |
|
73 |
|
(Name5)++(0.3,0) -- ++(0,-.55) coordinate (inter) |
|
74 |
|
-- (Label7|- inter) --++(0,0.55); |
|
75 |
|
|
|
76 |
|
|
|
77 |
|
% |
|
78 |
|
%\draw[FK] % From Quest5 to Name4 |
|
79 |
|
%(Name4)++(-0.1,0) -- ++(0,-.7) -- ++(2.6,0) coordinate (inter) |
|
80 |
|
%-- (Quest5 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
81 |
|
%-- (Quest5 |- inter) --++(0,0.4); |
|
82 |
|
% |
|
83 |
|
%\draw[FK] % From Quest6 to Name4 |
|
84 |
|
%(Name4)++(0.1,0) -- ++(0,-.55) -- ++(2.6,0) coordinate (inter) |
|
85 |
|
%-- (Quest6 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
86 |
|
%-- (Quest6 |- inter) --++(0,0.3); |
|
87 |
|
|
|
88 |
|
\end{tikzpicture} |
|
89 |
|
\end{document} |
File notes/fig/rel_mod/residency.tex added (mode: 100644) (index 0000000..9d76a49) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% PERSON(FName, LName, SSN (PK), Birthdate) |
|
5 |
|
% HOUSE(Address (PK), Color) |
|
6 |
|
% RESIDENCY(Person (FK to PERSON.SSN), House (FK to HOUSE.Address), PrincipalResidence, Status) |
|
7 |
|
|
|
8 |
|
\Frame(0,0){1}[PERSON]{ |
|
9 |
|
FName/A, |
|
10 |
|
LName/A, |
|
11 |
|
SSN/PK, |
|
12 |
|
Birthdate/A}; |
|
13 |
|
|
|
14 |
|
\Frame(0,-2.5){2}[HOUSE]{ |
|
15 |
|
Address/PK, |
|
16 |
|
Color/A}; |
|
17 |
|
|
|
18 |
|
\Frame(0,-5){3}[RESIDENCY]{ |
|
19 |
|
Person/A, |
|
20 |
|
House/A, |
|
21 |
|
PrincipalResidence/A, |
|
22 |
|
Status/A}; |
|
23 |
|
|
|
24 |
|
\draw[FK] % From Person3 to SSN1 |
|
25 |
|
(SSN1)-- ++(0,-.55) -- ++(-3.6,0)-- ++(0,-4.75) coordinate (inter) |
|
26 |
|
-- (Person3 |- inter) --++(0,0.4); |
|
27 |
|
|
|
28 |
|
\draw[FK] % From House3 to Address2 |
|
29 |
|
(Address2)-- ++(0,-.55) -- ++(6.2,-0) -- ++(0,-2.25) coordinate (inter) |
|
30 |
|
-- (House3 |- inter) --++(0,0.4); |
|
31 |
|
|
|
32 |
|
\end{tikzpicture} |
|
33 |
|
\end{document} |
File notes/fig/rel_mod/rpg.tex added (mode: 100644) (index 0000000..e3ab5bd) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% CLASS(Name (PK), Bonus, Element) |
|
5 |
|
% CHARACTER(Name (PK), Class (FK to CLASS.Name), XP, LVL) |
|
6 |
|
% WEAPON(Name (PK), Bonus, Possessed-By (FK to CHARACTER.Name)) |
|
7 |
|
% QUEST(Name (PK), XP) |
|
8 |
|
% COMPLETED-BY(Character (PK, FK to CHARACTER.Name), Quest (PK, FK to QUEST.Name)) |
|
9 |
|
% SPECIAL-ITEM(Name (P), Quest (FK to QUEST.Name)) |
|
10 |
|
|
|
11 |
|
\Frame(0,0){1}[CLASS]{ |
|
12 |
|
Name/PK, |
|
13 |
|
Bonus/A, |
|
14 |
|
Element/A}; |
|
15 |
|
|
|
16 |
|
\Frame(0,-2.5){2}[CHARACTER]{ |
|
17 |
|
Name/PK, |
|
18 |
|
Class/A, |
|
19 |
|
XP/A, |
|
20 |
|
Lvl/A}; |
|
21 |
|
|
|
22 |
|
\Frame(0,-5){3}[WEAPON]{ |
|
23 |
|
Name/PK, |
|
24 |
|
Bonus/A, |
|
25 |
|
Possessed-By/A}; |
|
26 |
|
|
|
27 |
|
\Frame(8,0){4}[QUEST]{ |
|
28 |
|
Name/PK, |
|
29 |
|
Xp/A}; |
|
30 |
|
|
|
31 |
|
\Frame(8,-2.5){5}[COMPLETED-BY]{ |
|
32 |
|
Character/PK, |
|
33 |
|
Quest/PK}; |
|
34 |
|
|
|
35 |
|
\Frame(8,-5){6}[SPECIAL-ITEM]{ |
|
36 |
|
Name/PK, |
|
37 |
|
Quest/A}; |
|
38 |
|
|
|
39 |
|
|
|
40 |
|
\draw[FK] % From Class2 to Name1 |
|
41 |
|
(Name1)++(0.1,0) -- ++(0,-.55) -- ++(4,0) coordinate (inter) |
|
42 |
|
-- (Class2 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
43 |
|
-- (Class2 |- inter) --++(0, 0.5); |
|
44 |
|
|
|
45 |
|
|
|
46 |
|
\draw[FK] % From Possessed-By3 to Name2 |
|
47 |
|
(Name2)++(-0.1,0) -- ++(0,-.75) -- ++(4.2,0) coordinate (inter) |
|
48 |
|
-- (Possessed-By3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
49 |
|
-- (Possessed-By3 |- inter) --++(0,0.5); |
|
50 |
|
|
|
51 |
|
|
|
52 |
|
\draw[FK] % From Character5 to Name2 |
|
53 |
|
(Name2)++(0.1,0) -- ++(0,-.55) -- ++(3.5,0) coordinate (inter) |
|
54 |
|
-- (Character5|- inter) --++(0,0.55); |
|
55 |
|
|
|
56 |
|
|
|
57 |
|
\draw[FK] % From Quest5 to Name4 |
|
58 |
|
(Name4)++(-0.1,0) -- ++(0,-.7) -- ++(2.6,0) coordinate (inter) |
|
59 |
|
-- (Quest5 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
60 |
|
-- (Quest5 |- inter) --++(0,0.4); |
|
61 |
|
|
|
62 |
|
\draw[FK] % From Quest6 to Name4 |
|
63 |
|
(Name4)++(0.1,0) -- ++(0,-.55) -- ++(2.6,0) coordinate (inter) |
|
64 |
|
-- (Quest6 -| inter) -- ++(0,-0.2) coordinate (inter) |
|
65 |
|
-- (Quest6 |- inter) --++(0,0.3); |
|
66 |
|
|
|
67 |
|
\end{tikzpicture} |
|
68 |
|
\end{document} |
File notes/fig/rel_mod/simple_book.tex added (mode: 100644) (index 0000000..8072455) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% AUTHOR (FName, LName, ID (PK)) |
|
5 |
|
% AWARD (Name (PK), Year (PK), BookTitle (FK to BOOK.Title), BookDate (FK to BOOK.Date)) |
|
6 |
|
% PUBLISHER (Name (PK), City (PK))) |
|
7 |
|
% BOOK (Title (PK), Pages, Published (PK), PublisherName (FK to PUBLISHER.Name), PublisherCity (FK to PUBLISHER.City), Author (FK to AUTHOR.ID)}; |
|
8 |
|
|
|
9 |
|
\Frame(0,0){1}[AUTHOR]{ |
|
10 |
|
FName/A, |
|
11 |
|
LName/A, |
|
12 |
|
ID/PK}; |
|
13 |
|
|
|
14 |
|
\Frame(0,-2.5){2}[PUBLISHER]{ |
|
15 |
|
Name/PK, |
|
16 |
|
City/PK}; |
|
17 |
|
|
|
18 |
|
\Frame(8,0){3}[AWARD]{ |
|
19 |
|
Name/PK, |
|
20 |
|
Year/PK, |
|
21 |
|
BookTitle/A, |
|
22 |
|
BookDate/A}; |
|
23 |
|
|
|
24 |
|
\Frame(8,-2.5){4}[BOOK]{ |
|
25 |
|
Title/PK, |
|
26 |
|
Pages/A, |
|
27 |
|
Published/PK, |
|
28 |
|
PublisherName/A, |
|
29 |
|
PublisherCity/A, |
|
30 |
|
Author/A}; |
|
31 |
|
|
|
32 |
|
\draw[FK] % From AWARD.BookTitle to BOOK.Title |
|
33 |
|
(Title4) --++(0, -0.55) -- ++(10.5,0) -- ++(0,2.5) coordinate (inter) |
|
34 |
|
-- (BookTitle3 |- inter) --++(0, 0.65); |
|
35 |
|
|
|
36 |
|
\draw[FK] % From AWARD.BookTitle to BOOK.Title |
|
37 |
|
(Published4) --++(0, -0.35) -- ++(8.5,0) -- ++(0,2.5) coordinate (inter) |
|
38 |
|
-- (BookDate3 |- inter) --++(0, 0.45); |
|
39 |
|
|
|
40 |
|
\draw[FK] % From BOOK.PublisherName to PUBLISHER.Name |
|
41 |
|
(Name2) --++(0, -0.95) coordinate (inter) |
|
42 |
|
-- (PublisherName4 |- inter) --++(0, 1.05); |
|
43 |
|
|
|
44 |
|
\draw[FK] % From BOOK.PublisherCity to PUBLISHER.City |
|
45 |
|
(City2) --++(0, -0.75) coordinate (inter) |
|
46 |
|
-- (PublisherCity4 |- inter) --++(0, 0.85); |
|
47 |
|
|
|
48 |
|
\draw[FK] % From BOOK.Author to Author.ID |
|
49 |
|
(ID1) --++(0, -0.75) -- ++(15.5,0) -- ++(0,-1.9) coordinate (inter) |
|
50 |
|
-- (Author4 |- inter) --++(0, 0.25); |
|
51 |
|
|
|
52 |
|
%\draw[FK] % From PUBLISHER.AUTHOR to AUTHOR.Name |
|
53 |
|
%(Name1) -- ++(0,-.55) -- ++(6, 0.0) -- ++(0, -2.35) |
|
54 |
|
%coordinate (inter) -- (AUTHOR2|- inter) --++(0, 0.5); |
|
55 |
|
% |
|
56 |
|
%\draw[FK] % From BOOK.PUBLISHER to PUBLISHER.Code |
|
57 |
|
%(Code2) -- ++(0,-.55) |
|
58 |
|
%coordinate (inter) -- (PUBLISHER4|- inter) --++(0, 0.55); |
|
59 |
|
% |
|
60 |
|
%\draw[FK] % From BOOK.PUBLISHER to COURSE.Name |
|
61 |
|
%(Name5) -- ++(0,-.55) -- ++(3, 0.0) -- ++(0, 2.55) |
|
62 |
|
%coordinate (inter) -- (Course4|- inter) --++(0, 0.5); |
|
63 |
|
|
|
64 |
|
\end{tikzpicture} |
|
65 |
|
\end{document} |
File notes/fig/rel_mod/template.def added (mode: 100644) (index 0000000..f4ca1d8) |
|
1 |
|
\renewcommand\familydefault{\sfdefault} % Default family: serif |
|
2 |
|
\usepackage[usenames,dvipsnames]{xcolor} |
|
3 |
|
\usepackage{tikz} |
|
4 |
|
\usepackage{soul} |
|
5 |
|
\usetikzlibrary{calc} |
|
6 |
|
\usetikzlibrary{arrows, decorations.markings,positioning,backgrounds,shapes} |
|
7 |
|
\definecolor{WIRE}{HTML}{002FA7} % Klein Blue |
|
8 |
|
\usepackage{ulem} |
|
9 |
|
\renewcommand{\ULdepth}{3pt} |
|
10 |
|
|
|
11 |
|
\newcommand\whiteuline{\bgroup\markoverwith |
|
12 |
|
{\textcolor{white}{\rule[-0.5ex]{2pt}{0.4pt}}}\ULon} |
|
13 |
|
|
|
14 |
|
\tikzset{FK/.style={thick,<-,thick,>=latex}} |
|
15 |
|
|
|
16 |
|
\newbox\ubox |
|
17 |
|
\begin{document} |
|
18 |
|
\begin{tikzpicture}[ |
|
19 |
|
PK/.style={% Style for empatized boxes |
|
20 |
|
rectangle, line width =1pt, |
|
21 |
|
anchor=west, |
|
22 |
|
underline, % new property |
|
23 |
|
align=center, |
|
24 |
|
text=white, |
|
25 |
|
minimum height=.8cm, |
|
26 |
|
text height=1.5ex, |
|
27 |
|
text depth=.25ex, |
|
28 |
|
fill=WIRE!50, |
|
29 |
|
draw=black, |
|
30 |
|
}, |
|
31 |
|
A/.style={% Style for normal boxes. |
|
32 |
|
rectangle, |
|
33 |
|
line width =1pt, |
|
34 |
|
anchor=west, |
|
35 |
|
align=left, |
|
36 |
|
minimum height=.6cm, |
|
37 |
|
text height=1.5ex, |
|
38 |
|
text depth=.25ex, |
|
39 |
|
fill=WIRE!10, |
|
40 |
|
draw=black, |
|
41 |
|
inner ysep=5pt |
|
42 |
|
}, |
|
43 |
|
underline/.append style={% define new style property |
|
44 |
|
execute at begin node={% |
|
45 |
|
\setbox\ubox=\hbox\bgroup |
|
46 |
|
}, |
|
47 |
|
execute at end node={% |
|
48 |
|
\egroup\whiteuline{\box\ubox}% |
|
49 |
|
} |
|
50 |
|
}, |
|
51 |
|
] % Uff that is all the configuration for tickzpicture xD |
|
52 |
|
|
|
53 |
|
% Define an brute force objet "Frame" |
|
54 |
|
% Variables 1:Position, 2: Identifier, 3: Title of frame 4: Subframe/Boxtype |
|
55 |
|
\def\Frame(#1)#2[#3]#4{% |
|
56 |
|
\begin{scope}[shift={(#1)}] |
|
57 |
|
\node[font=\bf, anchor=west] (Title) at (-0.2,0.7) {#3}; |
|
58 |
|
\edef\k{0}% Variable for box positión |
|
59 |
|
\edef\x{0}% Variable for named coordinate centering - below box |
|
60 |
|
\foreach \id/\style in {#4} {%enter sub frame data Name/Boxtype ,Name2/Boxtype | An space before Boxtype is needed |
|
61 |
|
\node[\style] (h) at (\k pt,0) {\id}; % % Draw a node depending on the variables. |
|
62 |
|
\pgfmathparse{\k+0.5*width{"\id"}+3.4pt} % Uses the textwidth to calculate named coordinate |
|
63 |
|
\xdef\x{\pgfmathresult} % The resul is saved in the variable \x |
|
64 |
|
\draw (\x pt,-0.4) coordinate (\id#2); %Create a named coordinate concatenated: "sub frame data Name"+"identifier" |
|
65 |
|
\pgfmathparse{\k+width{"\id"}+6.8pt}% Calculate positión for each subframe box. |
|
66 |
|
\xdef\k{\pgfmathresult}% Save the value to be added to the next iteration value. |
|
67 |
|
} |
|
68 |
|
\end{scope} |
|
69 |
|
}% disadvantages: Is not posible to use Frame data Name like: Name_another_desc instead I use Name-another-desc |
File notes/fig/rel_mod/train_exo.tex added (mode: 100644) (index 0000000..ac18919) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% TRAIN(Ref (PK), Model, Year) |
|
5 |
|
% CONDUCTOR(CompanyID (PK), Name, ExperienceLevel) |
|
6 |
|
% ASSIGNED-TO(TrainRef (PK, FK to TRAIN.REF), ConductorID (PK, FK to CONDUCTOR.CompanyID), Date (PK)) |
|
7 |
|
|
|
8 |
|
\Frame(0,0){1}[TRAIN]{ |
|
9 |
|
Ref/PK, |
|
10 |
|
Model/A, |
|
11 |
|
Year/A}; |
|
12 |
|
|
|
13 |
|
\Frame(0,-2.5){2}[CONDUCTOR]{ |
|
14 |
|
CompanyID/PK, |
|
15 |
|
Name/A, |
|
16 |
|
ExperienceLevel/A}; |
|
17 |
|
|
|
18 |
|
\Frame(0,-5){3}[ASSIGNED-TO]{ |
|
19 |
|
TrainRef/PK, |
|
20 |
|
ConductorID/PK, |
|
21 |
|
Date/PK}; |
|
22 |
|
|
|
23 |
|
\draw[FK] % From TrainRef3 to Ref1 |
|
24 |
|
(Ref1)++(0.1,0) -- ++(0,-.55) -- ++(-1,0) coordinate (inter) |
|
25 |
|
-- (TrainRef3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
26 |
|
-- (TrainRef3 |- inter) --++(0,0.4); |
|
27 |
|
|
|
28 |
|
|
|
29 |
|
\draw[FK] % From ConductorID3 to CompanyID2 |
|
30 |
|
(CompanyID2)++(0.1,0) -- ++(0,-.55) -- ++(4,0) coordinate (inter) |
|
31 |
|
-- (ConductorID3 -| inter) -- ++(0,-0.4) coordinate (inter) |
|
32 |
|
-- (ConductorID3 |- inter) --++(0,0.4); |
|
33 |
|
|
|
34 |
|
\end{tikzpicture} |
|
35 |
|
\end{document} |
File notes/fig/rel_mod/universities.tex added (mode: 100644) (index 0000000..507c594) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
% UNIVERSITY (Name (PK), Website) |
|
5 |
|
% CAMPUS (Address (PK), University (FK to UNIVERSITY.Name)) |
|
6 |
|
% DEPARTMENT (Code (PK), Contact, CreationDate, University (FK to UNIVERSITY.Name)) |
|
7 |
|
% COURSE (Name (PK), CreditHours) |
|
8 |
|
% OFFERING (Department (PK, FK to DEPARTMENT.Name), Course (PK, FK to COURSE.Name), Code) |
|
9 |
|
|
|
10 |
|
\Frame(0,0){1}[UNIVERSITY]{ |
|
11 |
|
Name/PK, |
|
12 |
|
Website/A}; |
|
13 |
|
|
|
14 |
|
\Frame(0,-2.5){2}[DEPARTMENT]{ |
|
15 |
|
Code/PK, |
|
16 |
|
Contact/A, |
|
17 |
|
CreationDate/A, |
|
18 |
|
University/A}; |
|
19 |
|
|
|
20 |
|
\Frame(8,0){3}[CAMPUS]{ |
|
21 |
|
Address/PK, |
|
22 |
|
University/A}; |
|
23 |
|
|
|
24 |
|
\Frame(8,-2.5){4}[OFFERING]{ |
|
25 |
|
Department/PK, |
|
26 |
|
Course/PK, |
|
27 |
|
Code/A}; |
|
28 |
|
|
|
29 |
|
\Frame(8,-5){5}[COURSE]{ |
|
30 |
|
Name/PK, |
|
31 |
|
CreditHours/A}; |
|
32 |
|
|
|
33 |
|
\draw[FK] % From CAMPUS.University to UNIVERSITY.Name |
|
34 |
|
(Name1)++(0.15,0) -- ++(0,-.45) coordinate (inter) |
|
35 |
|
-- (University3 |- inter) --++(0, 0.55); |
|
36 |
|
|
|
37 |
|
\draw[FK] % From DEPARTMENT.University to UNIVERSITY.Name |
|
38 |
|
(Name1) -- ++(0,-.55) -- ++(6, 0.0) -- ++(0, -2.35) |
|
39 |
|
coordinate (inter) -- (University2|- inter) --++(0, 0.5); |
|
40 |
|
|
|
41 |
|
\draw[FK] % From OFFERING.Department to DEPARTMENT.Code |
|
42 |
|
(Code2) -- ++(0,-.55) |
|
43 |
|
coordinate (inter) -- (Department4|- inter) --++(0, 0.55); |
|
44 |
|
|
|
45 |
|
\draw[FK] % From OFFERING.Department to COURSE.Name |
|
46 |
|
(Name5) -- ++(0,-.55) -- ++(3, 0.0) -- ++(0, 2.55) |
|
47 |
|
coordinate (inter) -- (Course4|- inter) --++(0, 0.5); |
|
48 |
|
|
|
49 |
|
\end{tikzpicture} |
|
50 |
|
\end{document} |
File notes/fig/rel_mod/work.tex added (mode: 100644) (index 0000000..88178c4) |
|
1 |
|
\documentclass[border=20pt]{standalone} |
|
2 |
|
\input{template.def} |
|
3 |
|
|
|
4 |
|
|
|
5 |
|
% WORK(Title (PK), Author (FK to AUTHOR.Name)) |
|
6 |
|
% AUTHOR(Name (PK), Email) |
|
7 |
|
% BOOK(ISBN (PK), Work (FK to WORK.Title), Published, Price) |
|
8 |
|
% EBOOK(ISBN (PK), Work (FK to WORK.Title), Published, Price) |
|
9 |
|
|
|
10 |
|
\Frame(0,0){1}[WORK]{ |
|
11 |
|
Title/PK, |
|
12 |
|
Author/A}; |
|
13 |
|
|
|
14 |
|
\Frame(0,-2.5){2}[BOOK]{ |
|
15 |
|
ISBN/PK, |
|
16 |
|
Work/A, |
|
17 |
|
Published/A, |
|
18 |
|
Price/A}; |
|
19 |
|
|
|
20 |
|
\Frame(10,0){3}[AUTHOR]{ |
|
21 |
|
Name/PK, |
|
22 |
|
Email/A}; |
|
23 |
|
|
|
24 |
|
\Frame(10,-2.5){4}[EBOOK]{ |
|
25 |
|
ISBN/PK, |
|
26 |
|
Work/A, |
|
27 |
|
Published/A, |
|
28 |
|
Price/A}; |
|
29 |
|
|
|
30 |
|
\draw[FK] % From WORK.Author to AUTHOR.Name |
|
31 |
|
(Name3)++(-0.2,0) -- ++(0,-.55) coordinate (inter) |
|
32 |
|
-- (Author1 |- inter) --++(0, 0.65); |
|
33 |
|
|
|
34 |
|
\draw[FK] % From BOOK.Work to WORK.Title |
|
35 |
|
(Title1)++(0.3,0) -- ++(0,-0.8) --++(-1, 0) |
|
36 |
|
--++(0, -2.3) |
|
37 |
|
coordinate (inter) |
|
38 |
|
-- (Work2 |- inter) --++(0, 0.7); |
|
39 |
|
|
|
40 |
|
\draw[FK] % From EBOOK.Work to WORK.Title |
|
41 |
|
(Title1)++(-0.1,0) -- ++(0,-0.5) --++(-1.5, 0) |
|
42 |
|
--++(0, -3) |
|
43 |
|
coordinate (inter) |
|
44 |
|
-- (Work4 |- inter) --++(0, 1.1); |
|
45 |
|
|
|
46 |
|
|
|
47 |
|
\end{tikzpicture} |
|
48 |
|
\end{document} |