Prev | Current Page 393 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

Each tuple in the intersection
table will include values of primary keys from both relations. For each association between an instance of one
entity type and an instance of the other, there will be a row in the intersection table making the connection.
For instance, to create the M:N relationship between the Student and Course tables, one would create
the ???StudentCourseIntersection??? relation. StudentCourseIntersection would have foreign key columns
for Student (perhaps called StudentSSN) and for Course (perhaps called CourseNumber). Each row in
StudentCourseIntersection will record the fact that a particular student took a particular course. Any particular
student may take many courses, and many students may take any particular course.
The primary key of an intersection table usually is the composite of the two foreign key values. Since the
foreign key values must be unique among tuples in their respective relations, the combination of the two keys
must be unique among the tuples in the intersection table. This rule would only change in special circumstances.
For instance, if one were to decide to record multiple attempts by a student to take a particular course, the
primary key of the intersection table would have to be expanded to include another attribute that would allow
one to distinguish different attempts by the same student to take the same course.


Pages:
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
drukarki fiskalne kraków willa karmazyn międzyzdroje www.books61.hobbitstory.com terapia magnetyczna Informacje o hostingu