Professional Documents
Culture Documents
Review - Concepts
Relational Model is made up of tables
A row of table A column of table A table Cardinality Degree = a relational instance/tuple = an attribute = a schema/relation = number of rows = number of columns
Review - Example
Attribute
Cardinality = tuple/relational instance
Major CS EE
2 4 Degree
A Schema / Relation
Advisor
Professor Dept
Major
GPA
Dept Math CS
Major
GPA
Age 10 8
* Primary key of Children is Parent_SID + Name
Identifying Relationship
No relational model representation necessary
Student
study
Major
Major
GPA
Maj_ID Co 07 05
Student
Major
GPA
Brand
SID
Name
Major
GPA
LP_S/N
Hav_Cond
9999
8888
Bart
Lisa
Economy
Physics
-4.0
4.0
123-456
567-890
Own
Loan
Student
Advisor
Professor
Major
GPA
Dept
Name
SID
Name
Major
GPA
Pro_SSN
Ad_Sem
9999
8888
Bart
Lisa
Economy
Physics
-4.0
4.0
123-456
567-890
Fall 2006
Fall 2005
P-Key1
P-Key2
E-Set 2 P-Key3
A relationship
Another Set
E-Set 3
P-Key1
P-Key2
P-Key3
A-Key
D-Attribute
9999
1234
8888
5678
7777
9012
6666
3456
Yes
No
SSN
Professor Address
9999 8888
Street
City
Children
The primary key for this table is Student_SID + Children, the union of all attributes
Major
GPA
Stud_SID 1234 SID 1234 5678 Name John Homer Major CS EE GPA 2.8 3.6
Children Johnson
1234
5678 5678 5678
Mary
Bart Lisa Maggie
Example
SID Status
SSN
Name
Person
Major
GPA
SSN 1234
Name Homer
Gender Male
5678
SSN 1234 SID 9999 Status Full Major CS GPA 2.8
Marge
Female
5678
8888
Part
EE
3.6
Example
SSN
Name
SJSU people
SID
Major
GPA
Dept
SSN 1234
Name John
SID 9999
Major CS
GPA 2.8
SSN 1234
Name Homer
Dept C.S.
5678
Mary
8888
EE
3.6
5678
Marge
Math
Representing Aggregation
Name SSN Name Student
Advisor
Professor Dept
SID
SID 1234
Code 04
5678
08
Applause??
Thank you