102. In what order must the tables be created?
Remember, We can NOT create
a table that has a foreign key until we first create the table it refers to (to
check for referential integrity)
There are
some alternatives, but here is the basic structure:
1. Building, Semester
q
We
could also include Instructor and Department,
BUT as we will see later,
these are very tricky
q
After
we create Building, we can create Classrooms
q
Once
we have created Department, we can create Major
and Course
2. Student (after we create Major)
3. Class (after we have created Semester,
Classrooms, Course, and Instructor
4. Enrollment will be the last table to be
created