Prev | Current Page 386 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

If all rooms permitted only two roommates, the relationship could be 1:1, but probably some suites allow for
three, four, or more roommates, so the relationship between student and roommates will be N:M, and we will call
it ???rooms-with???. The minimum cardinality on either side can be 0, if we have some students who will room alone.
Finally, some entity types can represent subclasses and superclasses. For instance, students may be either
undergraduate or graduate students. We would model ???student??? as the superclass, and we would model ???undergraduate???
and ???graduate??? as subclasses. Attributes of student would include those attributes relevant to all students,
such as name, address, etc. Attributes of undergraduate entities would include those attributes relevant only to
undergraduates, such as student life advisor (assuming graduate students have no such advisor assigned).
Figure 8-2 illustrates weak and ID-dependent entities, multivalued attributes, and superclass and subclass
entities.
In Fig. 8-2, the Dependents table is an id-dependent weak entity. The identifier for that table includes the
key for the related strong entity Faculty, plus the name of the dependent (spouse??™s name, child??™s name, etc.


Pages:
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
katalog stron katalog stron liga typerów dieta light katalog firm