Database Reference
In-Depth Information
Relational Notation
STUDENT (SocSecNo, StudntName, Major)
TEXTBOOK (ISBN, Title, Price)
AUTHOR (ISBN, Author)
Foreign Key:
ISBN
REFERENCES
TEXTBOOK
COURSE (CourseNo, CourseDesc, Credits, ISBN)
Foreign Key:
ISBN
REFERENCES
TEXTBOOK
CLASS (CourseNo, ClassNo, RoomNo, FacultyID)
Foreign Key:
CourseNo
REFERENCES
COURSE
FacultyID
REFERENCES
FACULTY
FACULTY (FacultyID, FacultyName, Phone, Department, Speczn)
EXAMTYPE (TypeID, ExamName, MinScore)
GRADE (CourseNo, ClassNo, TypeID, SocSecNo, Score)
Foreign Key:
CourseNo, ClassNo
REFERENCES
CLASS
TypeID
REFERENCES
EXAMTYPE
SocSecNo
REFERENCES
STUDENT
Figure 9-22
University ERD: transformation into relational data model.
relational data models in the same way by adopting similar transformation
principles.
•
Each component of the semantic data model transforms into one or more com-
ponents of the relational data model.
•
Object sets transform into relations of the relational data model; attributes
transform into columns of relations.
•
Relationships transform into logical links through foreign key attributes.
•
In a one-to-one relationship, place the foreign key attribute in either of the par-
ticipating relations; in a one-to-many relationship, place the foreign key
attribute in the relation on the “many” side of the relationship; in a many-to-
many relationship, break the relationship down into two one-to-many rela-
tionships with an intersection relation between them and place foreign key
attributes in the intersection relation.
REVIEW QUESTIONS
1. List the major merits of the model transformation method of creating a rela-
tional data model.
Search WWH ::
Custom Search