File notes/fig/rel_mod/ACTOR.tex deleted (index e7e2ea0..0000000) |
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 |
|
|
|
42 |
|
\draw[FK] % From ACTING.MovieTitle to MOVIE.Title
|
|
43 |
|
(Title2)++(0.1,0) -- ++(0,-.55) -- ++(4,0)
|
|
44 |
|
coordinate (inter)
|
|
45 |
|
|
|
46 |
|
\draw[FK] % From SHOWING.MovieTitle to THEATER.Name
|
|
47 |
|
(Name3) -- ++(0,-.55)
|
|
48 |
|
coordinate (inter)
|
|
49 |
|
|
|
50 |
|
\draw[FK] % From SHOWING.TheaterName to MOVIE.Title
|
|
51 |
|
(Title2)++(-0.1,0) -- ++(0,-.75)
|
|
52 |
|
coordinate (inter)
|
|
53 |
|
\end{tikzpicture}
|
|
54 |
|
\end{document} |
|
File notes/fig/rel_mod/AUCTION.tex deleted (index e116d34..0000000) |
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 |
|
|
|
43 |
|
\draw[FK] % From BUYER.ID to MEMBER.ID
|
|
44 |
|
(ID3)++(-0.15,0) -- ++(0,-0.5) coordinate (inter)
|
|
45 |
|
|
|
46 |
|
\draw[FK] % From ITEM.SoldBy to SELLER.ID
|
|
47 |
|
(ID1)++(0.15,0) -- ++(0,-.45) coordinate (inter)
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
\draw[FK] % From BID.By to MEMBER.ID
|
|
51 |
|
(ID3)++(0.15,0) -- ++(0,-2.2) --++(1, 0) coordinate (inter)
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
\draw[FK] % From BID.For to ITEM.ID
|
|
55 |
|
(ID4) -- ++(0,-2.55) -- ++(5, 0.0) -- ++(0, -1.65)
|
|
56 |
|
coordinate (inter) -- (For5|- inter) --++(0, 0.3);
|
|
57 |
|
|
|
58 |
|
\end{tikzpicture}
|
|
59 |
|
\end{document} |
|
File notes/fig/rel_mod/BIKE_FK.tex deleted (index ccb8bd0..0000000) |
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 |
|
|
|
34 |
|
\draw[FK] % From BIKE.Customer to CUSTOMER.Name
|
|
35 |
|
(Name1)++(0.1,0) -- ++(0,-0.5) --++(-1.5, 0)
|
|
36 |
|
--++(0, -3)
|
|
37 |
|
coordinate (inter)
|
|
38 |
|
|
|
39 |
|
\draw[FK] % From BIKE.RepairedBy to EMPLOYEE.Name
|
|
40 |
|
(Name3)++(0,0) -- ++(0,-.75)--++(-1, 0) --++(0, -3)
|
|
41 |
|
coordinate (inter)
|
|
42 |
|
|
|
43 |
|
\draw[FK] % From SPECIALTY.Employee to EMPLOYEE.Name
|
|
44 |
|
(Name3)++(0.2,0) -- ++(0,-.85)--++(-1, 0) --++(0, -2.9)
|
|
45 |
|
coordinate (inter)
|
|
46 |
|
\end{tikzpicture}
|
|
47 |
|
\end{document} |
|
File notes/fig/rel_mod/BILL.tex deleted (index 6509a95..0000000) |
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 |
|
|
|
34 |
|
\draw[FK] % From VOTE.Member to MEMBER.Id
|
|
35 |
|
(Id2)++(0.2,0) -- ++(0,-0.6)
|
|
36 |
|
coordinate (inter) -- (Member4 |- inter) --(Member4);
|
|
37 |
|
|
|
38 |
|
\draw[FK] % From BILL.Sponsor to MEMBER.Id
|
|
39 |
|
(Id2)++(-0.1,0) --++ (0, -0.6) -- ++(-7,0) -- ++(0, 2.5)
|
|
40 |
|
coordinate (inter) -- (Sponsor1 |- inter) --(Sponsor1);
|
|
41 |
|
|
|
42 |
|
\draw[FK] % From REPRESENTATIVES.Member to MEMBER.Id
|
|
43 |
|
(Id2)++(0.05,0) --++ (0, -3)
|
|
44 |
|
coordinate (inter) -- (Member3 |- inter) --(Member3) --++ (0, 0.1);
|
|
45 |
|
|
|
46 |
|
\end{tikzpicture}
|
|
47 |
|
\end{document} |
|
File notes/fig/rel_mod/BOOK_Sol.tex deleted (index d2e8496..0000000) |
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 |
|
|
|
27 |
|
\draw[FK] % From BookISSN3 to ISSN2
|
|
28 |
|
(ISSN2)++(0.1,0) -- ++(0,-.55) -- ++(-1.1,0) coordinate (inter)
|
|
29 |
|
|
|
30 |
|
\end{tikzpicture}
|
|
31 |
|
\end{document} |
|
File notes/fig/rel_mod/CAR_INFO.tex deleted (index fbcf4b9..0000000) |
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 |
|
|
|
37 |
|
\draw[FK] % From CAR.Driver to PERSON.Id
|
|
38 |
|
(Id2)++(0.1,0) -- ++(0,-.55) -- ++ (5.5, 0)--++(0, -2.1)
|
|
39 |
|
coordinate (inter)
|
|
40 |
|
|
|
41 |
|
\draw[FK] % From PERSON.Seat to CAR.Vin
|
|
42 |
|
(Vin3)++(0.1, 0) -- ++(0,-.55) -- ++ (6, 0)--++(0, 3)
|
|
43 |
|
coordinate (inter)
|
|
44 |
|
|
|
45 |
|
\draw[FK] % From CAR INSURANCE.Insured Car to CAR.Vin
|
|
46 |
|
(Vin3)++(-0.1, 0) -- ++(0,-.55) -- ++ (-1, 0)--++(0, -2.1)
|
|
47 |
|
coordinate (inter)
|
|
48 |
|
\end{tikzpicture}
|
|
49 |
|
\end{document} |
|
File notes/fig/rel_mod/CINEMA.tex deleted (index 6600860..0000000) |
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 |
|
|
|
53 |
|
\draw[FK] % From MovieId3 to Id2
|
|
54 |
|
(Id2)++(-0.1,0) -- ++(0,-.75) -- ++(3,0) coordinate (inter)
|
|
55 |
|
|
|
56 |
|
\draw[FK] % From Theater5 to Id4
|
|
57 |
|
(Id4)++(0.1,0) -- ++(0,-.55) -- ++(3.5,0) coordinate (inter)
|
|
58 |
|
|
|
59 |
|
\draw[FK] % From MovieId6 to Id2
|
|
60 |
|
(Id2)++(0.1,0) -- ++(0,-.55) -- ++(3.2,0) coordinate (inter)
|
|
61 |
|
|
|
62 |
|
\draw[FK] % From AuditoriumId6 to Id5
|
|
63 |
|
(Id5)++(0.1,0) -- ++(0,-.55) -- ++(6,0) coordinate (inter)
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
\draw[FK] % From ShowTimeId7 to Id6
|
|
67 |
|
(Id6)++(0.1,0) -- ++(0,-.8) -- ++(-.7,0) coordinate (inter)
|
|
68 |
|
|
|
69 |
|
\end{tikzpicture}
|
|
70 |
|
\end{document} |
|
File notes/fig/rel_mod/COFFEE.tex deleted (index 30947bb..0000000) |
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 |
|
|
|
32 |
|
\draw[FK] % From SUPPLY.Coffee to PROVIDER.Name
|
|
33 |
|
(Name4) -- ++(0,-.55) -- ++(2, 0.0) -- ++(0, 2.5) --
|
|
34 |
|
coordinate (inter) (Provider3|- inter) --++(0, 0.5);
|
|
35 |
|
|
|
36 |
|
\draw[FK] % From CUSTOMER.CardNo to COFFEE.Ref
|
|
37 |
|
(Ref1)++(-0.1,0) -- ++(0, -0.55) -- ++(-1, 0) -- ++(0, -2.5)
|
|
38 |
|
coordinate (inter) -- (FavCoffee2|- inter) --++(0, 0.5);
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
\end{tikzpicture}
|
|
42 |
|
\end{document} |
|
File notes/fig/rel_mod/EMPLOYEE.tex deleted (index b7eb0d7..0000000) |
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 |
|
%Essn -- Ssn id 5
|
|
47 |
|
\draw[FK]
|
|
48 |
|
(Ssn1)++(-0.1,0) -- ++(0,-.7) -- ++(4.55,0) coordinate (inter) %some shift using (Ssn1)++(shiftx,shifty)
|
|
49 |
|
\draw[FK]
|
|
50 |
|
(Pnumber4) -- ++(0,-.5) -- ++(1,0) coordinate (inter)
|
|
51 |
|
|
|
52 |
|
\draw[FK]
|
|
53 |
|
(Dnumber2) -- ++(0,-.75) -- ++(4,0) coordinate (inter)
|
|
54 |
|
|
|
55 |
|
\draw[FK]
|
|
56 |
|
(Dnumber2)++(-.2,0) -- ++(0,-.9) -- ++(1.75,0) coordinate (inter)
|
|
57 |
|
|
|
58 |
|
\draw[FK]
|
|
59 |
|
(Ssn1)++(-0.3,0) -- ++(0,-0.85) -- ++(3.5,0) coordinate (inter)
|
|
60 |
|
|
|
61 |
|
\draw[FK]
|
|
62 |
|
(Dnumber2)++(0.2,0) -- ++(0,-.6) coordinate (inter) -- (Dno1 |- inter) -- (Dno1); %
|
|
63 |
|
|
|
64 |
|
\draw[FK]
|
|
65 |
|
(Ssn1)++(0.3,0) -- ++(0,-.4) coordinate (inter) -- (Super-Ssn1 |- inter) -- (Super-Ssn1); %
|
|
66 |
|
|
|
67 |
|
\end{tikzpicture}
|
|
68 |
|
\end{document} |
|
File notes/fig/rel_mod/NETWORK_LIBRARY.tex deleted (index 0f0ffde..0000000) |
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 |
|
|
|
46 |
|
\draw[FK] % From Document2 to Reference3
|
|
47 |
|
(Reference3) -- ++(0,-.55) -- ++(-1.3,0) -- ++(0,2.5) coordinate (inter)
|
|
48 |
|
|
|
49 |
|
\draw[FK] % From Copy4 to Code2
|
|
50 |
|
(Code2)++(0.1,0) -- ++(0,-.45) -- ++(0.8,0) -- ++(0,2.5) coordinate (inter)
|
|
51 |
|
|
|
52 |
|
\draw[FK] % From Copy6 to Code2
|
|
53 |
|
(Code2)++(-0.1,0) -- ++(0,-.65) -- ++(1,0) -- ++(0,-2.35) coordinate (inter)
|
|
54 |
|
|
|
55 |
|
\draw[FK] % From Patron4 to CardNumber5
|
|
56 |
|
(CardNumber5)++(-0.1,0) -- ++(0,-.65) -- ++(4.2,0) -- ++(0,-2.35) coordinate (inter)
|
|
57 |
|
|
|
58 |
|
\draw[FK] % From Patron6 to CardNumber5
|
|
59 |
|
(CardNumber5)++(0.1,0) -- ++(0,-.45) -- ++(4,0) -- ++(0,2.35) coordinate (inter)
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
\end{tikzpicture}
|
|
64 |
|
\end{document} |
|
File notes/fig/rel_mod/RECORD.tex deleted (index b138d9b..0000000) |
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 |
|
|
|
55 |
|
\draw[FK] % From Recording2 to Title3
|
|
56 |
|
(Title3)++(0,0) -- ++(0,-.75) -- ++(-3,0) - ++(0,-2.3)coordinate (inter)
|
|
57 |
|
|
|
58 |
|
\draw[FK] % From Shop2 to Name4
|
|
59 |
|
(Name4)++(-0.1,0) -- ++(0,-.75) -- ++(-3,0) coordinate (inter)
|
|
60 |
|
|
|
61 |
|
\draw[FK] % From Recording6 to Title3
|
|
62 |
|
(Title3)++(0.3,0) -- ++(0,-.55) coordinate (inter)
|
|
63 |
|
|
|
64 |
|
\draw[FK] % From Shop6 to Name4
|
|
65 |
|
(Name4)++(0.3,0) -- ++(0,-.55) coordinate (inter)
|
|
66 |
|
|
|
67 |
|
\draw[FK] % From Label7 to Name53
|
|
68 |
|
(Name5)++(0.3,0) -- ++(0,-.55) coordinate (inter)
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
%
|
|
72 |
|
%\draw[FK] % From Quest5 to Name4
|
|
73 |
|
%(Name4)++(-0.1,0) -- ++(0,-.7) -- ++(2.6,0) coordinate (inter)
|
|
74 |
|
%-- (Quest5 -| inter) -- ++(0,-0.4) coordinate (inter)
|
|
75 |
|
%-- (Quest5 |- inter) --++(0,0.4);
|
|
76 |
|
%
|
|
77 |
|
%\draw[FK] % From Quest6 to Name4
|
|
78 |
|
%(Name4)++(0.1,0) -- ++(0,-.55) -- ++(2.6,0) coordinate (inter)
|
|
79 |
|
%-- (Quest6 -| inter) -- ++(0,-0.2) coordinate (inter)
|
|
80 |
|
%-- (Quest6 |- inter) --++(0,0.3);
|
|
81 |
|
|
|
82 |
|
\end{tikzpicture}
|
|
83 |
|
\end{document} |
|
File notes/fig/rel_mod/RESIDENCY.tex deleted (index 15eeda8..0000000) |
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 |
|
|
|
27 |
|
\draw[FK] % From House3 to Address2
|
|
28 |
|
(Address2)-- ++(0,-.55) -- ++(6.2,-0) -- ++(0,-2.25) coordinate (inter)
|
|
29 |
|
|
|
30 |
|
\end{tikzpicture}
|
|
31 |
|
\end{document} |
|
File notes/fig/rel_mod/RPG.tex deleted (index c5cab6c..0000000) |
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 |
|
|
|
43 |
|
|
|
44 |
|
\draw[FK] % From Possessed-By3 to Name2
|
|
45 |
|
(Name2)++(-0.1,0) -- ++(0,-.75) -- ++(4.2,0) coordinate (inter)
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
\draw[FK] % From Character5 to Name2
|
|
49 |
|
(Name2)++(0.1,0) -- ++(0,-.55) -- ++(3.5,0) coordinate (inter)
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
\draw[FK] % From Quest5 to Name4
|
|
53 |
|
(Name4)++(-0.1,0) -- ++(0,-.7) -- ++(2.6,0) coordinate (inter)
|
|
54 |
|
|
|
55 |
|
\draw[FK] % From Quest6 to Name4
|
|
56 |
|
(Name4)++(0.1,0) -- ++(0,-.55) -- ++(2.6,0) coordinate (inter)
|
|
57 |
|
|
|
58 |
|
\end{tikzpicture}
|
|
59 |
|
\end{document} |
|
File notes/fig/rel_mod/SIMPLE_BOOK.tex deleted (index c265bc3..0000000) |
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 |
|
|
|
35 |
|
\draw[FK] % From AWARD.BookTitle to BOOK.Title
|
|
36 |
|
(Published4) --++(0, -0.35) -- ++(8.5,0) -- ++(0,2.5) coordinate (inter)
|
|
37 |
|
|
|
38 |
|
\draw[FK] % From BOOK.PublisherName to PUBLISHER.Name
|
|
39 |
|
(Name2) --++(0, -0.95) coordinate (inter)
|
|
40 |
|
|
|
41 |
|
\draw[FK] % From BOOK.PublisherCity to PUBLISHER.City
|
|
42 |
|
(City2) --++(0, -0.75) coordinate (inter)
|
|
43 |
|
|
|
44 |
|
\draw[FK] % From BOOK.Author to Author.ID
|
|
45 |
|
(ID1) --++(0, -0.75) -- ++(15.5,0) -- ++(0,-1.9) coordinate (inter)
|
|
46 |
|
|
|
47 |
|
%\draw[FK] % From PUBLISHER.AUTHOR to AUTHOR.Name
|
|
48 |
|
%(Name1) -- ++(0,-.55) -- ++(6, 0.0) -- ++(0, -2.35)
|
|
49 |
|
%coordinate (inter) -- (AUTHOR2|- inter) --++(0, 0.5);
|
|
50 |
|
%
|
|
51 |
|
%\draw[FK] % From BOOK.PUBLISHER to PUBLISHER.Code
|
|
52 |
|
%(Code2) -- ++(0,-.55)
|
|
53 |
|
%coordinate (inter) -- (PUBLISHER4|- inter) --++(0, 0.55);
|
|
54 |
|
%
|
|
55 |
|
%\draw[FK] % From BOOK.PUBLISHER to COURSE.Name
|
|
56 |
|
%(Name5) -- ++(0,-.55) -- ++(3, 0.0) -- ++(0, 2.55)
|
|
57 |
|
%coordinate (inter) -- (Course4|- inter) --++(0, 0.5);
|
|
58 |
|
|
|
59 |
|
\end{tikzpicture}
|
|
60 |
|
\end{document} |
|
File notes/fig/rel_mod/TRAIN_Exo.tex deleted (index 844d959..0000000) |
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 |
|
|
|
26 |
|
|
|
27 |
|
\draw[FK] % From ConductorID3 to CompanyID2
|
|
28 |
|
(CompanyID2)++(0.1,0) -- ++(0,-.55) -- ++(4,0) coordinate (inter)
|
|
29 |
|
|
|
30 |
|
\end{tikzpicture}
|
|
31 |
|
\end{document} |
|
File notes/fig/rel_mod/UNIVERSITIES.tex deleted (index dc6a12b..0000000) |
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 |
|
|
|
36 |
|
\draw[FK] % From DEPARTMENT.University to UNIVERSITY.Name
|
|
37 |
|
(Name1) -- ++(0,-.55) -- ++(6, 0.0) -- ++(0, -2.35)
|
|
38 |
|
coordinate (inter) -- (University2|- inter) --++(0, 0.5);
|
|
39 |
|
|
|
40 |
|
\draw[FK] % From OFFERING.Department to DEPARTMENT.Code
|
|
41 |
|
(Code2) -- ++(0,-.55)
|
|
42 |
|
coordinate (inter) -- (Department4|- inter) --++(0, 0.55);
|
|
43 |
|
|
|
44 |
|
\draw[FK] % From OFFERING.Department to COURSE.Name
|
|
45 |
|
(Name5) -- ++(0,-.55) -- ++(3, 0.0) -- ++(0, 2.55)
|
|
46 |
|
coordinate (inter) -- (Course4|- inter) --++(0, 0.5);
|
|
47 |
|
|
|
48 |
|
\end{tikzpicture}
|
|
49 |
|
\end{document} |
|
File notes/fig/rel_mod/WORK.tex deleted (index 2a75cef..0000000) |
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 |
|
|
|
33 |
|
\draw[FK] % From BOOK.Work to WORK.Title
|
|
34 |
|
(Title1)++(0.3,0) -- ++(0,-0.8) --++(-1, 0)
|
|
35 |
|
--++(0, -2.3)
|
|
36 |
|
coordinate (inter)
|
|
37 |
|
|
|
38 |
|
\draw[FK] % From EBOOK.Work to WORK.Title
|
|
39 |
|
(Title1)++(-0.1,0) -- ++(0,-0.5) --++(-1.5, 0)
|
|
40 |
|
--++(0, -3)
|
|
41 |
|
coordinate (inter)
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
\end{tikzpicture}
|
|
45 |
|
\end{document} |
|
File notes/fig/rel_mod/car_01.tex deleted (index acf80b4..0000000) |
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 |
|
|
|
39 |
|
\draw[FK] % From Car-VIN4 to VIN1 |
|
40 |
|
(VIN1)++(-0.1,0) -- ++(0,-.45) -- ++(-1.1,0) coordinate (inter) |
|
41 |
|
|
|
42 |
|
\draw[FK] % From Insured-Driver-State3 to State2 |
|
43 |
|
(State2) -- ++(0,-.7) coordinate (inter) -- (Insured-Driver-State3 |- inter) --++(0,-1.1); |
|
44 |
|
|
|
45 |
|
\draw[FK] % From Insured-Driver-Licence-Num3 to Licence-Num2 |
|
46 |
|
(Licence-Num2) -- ++(0,-.5) coordinate (inter) -- (Insured-Driver-Licence-Num3 |- inter) --++(0,-1.3); |
|
47 |
|
|
|
48 |
|
\end{tikzpicture} |
|
49 |
|
\end{document} |
|
File notes/fig/rel_mod/mapping_relationships_02.tex deleted (index 65409b4..0000000) |
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 |
|
|
|
22 |
|
\draw[FK] % From MAPPING.KeyB to ENT.B.KeyB |
|
23 |
|
(KeyB3)++(0,0) -- ++(0,-.5) -- ++(-0,0) coordinate (inter) |
|
24 |
|
\end{tikzpicture} |
|
25 |
|
\end{document} |
|
File notes/fig/rel_mod/professor_department.tex deleted (index 36149dc..0000000) |
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 |
|
|
|
20 |
|
\draw[FK] % From Head2 to Login1 |
|
21 |
|
(Login1)++(0.1,0) -- ++(0,-1) coordinate (inter) |
|
22 |
|
|
|
23 |
|
\end{tikzpicture} |
|
24 |
|
\end{document} |
|
File notes/fig/rel_mod/professor_department_extended.tex deleted (index bf21c04..0000000) |
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 |
|
|
|
42 |
|
\draw[FK] % From Major3 to Code2 |
|
43 |
|
(Code2)++(0.1,0) -- ++(0,-.5) -- ++(5,0) -- ++(0,-3) -- ++(-1.15, 0) -- (Major3); |
|
44 |
|
|
|
45 |
|
\draw[FK] % From Head2 to Login1 |
|
46 |
|
(Login1)++(0.1,0) -- ++(0,-1) coordinate (inter) |
|
47 |
|
|
|
48 |
|
%\draw[FK] % From Instructor4 to Login1 |
|
49 |
|
%(Login1)++(-0.1,0) -- ++(0, -.5) -- ++(-1,0) -- ++(0, -3) -- ++(4.36, 0) -- (Instructor4); |
|
50 |
|
|
|
51 |
|
\draw[FK] % From Instructor4 to Login1 |
|
52 |
|
(Login1)++(-0.1,0) -- ++(0, -1.5) -- ++(4.4,0) -- ++(0, -2) -- ++(-1.04, 0) -- |
|
53 |
|
(Instructor4); |
|
54 |
|
|
|
55 |
|
\draw[FK] % From Login5 to Login3 |
|
56 |
|
(Login3)-- ++(0, -1) -- ++(-3.5,0) -- ++(0, -2.5) -- ++(1, 0) -- (Login5); |
|
57 |
|
|
|
58 |
|
\draw[FK] % From LectureCode5 to Code4 |
|
59 |
|
(Code4)-- ++(0, -4) -- ++(5.19,0) --(LectureCode5); |
|
60 |
|
|
|
61 |
|
\draw[FK] % From LectureYear5 to Year4 |
|
62 |
|
(Year4)-- ++(0, -5) -- ++(6.3,0) --(LectureYear5); |
|
63 |
|
\end{tikzpicture} |
|
64 |
|
\end{document} |
|
File notes/fig/rel_mod/template.def deleted (index 38087a6..0000000) |
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
|
|