CPSC 3660 - Relational Models and Mapping

  1. When was the Relational model first proposed and implemented?
    • Proposed: 1970
    • Implemented: 1980
  2. What is a relational model?
    A collection of relations
  3. What is a relation composed of?
    • Attributes
    • Tuples
    • Constraints
  4. How are specific relations defined?
    Using a relation schema
  5. What is a relation instance?
    A relation populated with tuples at a given time
  6. What is an attribute's domain?
    A set of valid values that an attribute obtains it's values from
  7. What is a tuple?
    • An ordered a list of values, each associated with a domain
    • A record
  8. What is a foreign key?
    A set of attributes in a relation that reference the primary key in another relation
  9. Difference between a Relation and a Relationship
    • A relationship links two entities
    • A relation is much like an entity
  10. Characteristics of relations
    • Tuples are not ordered
    • Attributes are ordered
    • All attribute values are either atomic or null
    • A null value can either be "unknown" or "not applicable"
  11. How are composite (branched) attributes represented in an ER map?
    • Ignore any non leaf nodes
    • Only list the leaves
  12. How are multi-valued attributes represented in an ER map?
    • The attribute will be written out (like a relation/entity) for each of it's possible values
    • Each instance of the attribute will have the host-relation's primary key as a foreign key and it's own value
  13. Should derived attributes be included in ER maps?
    • Sometimes, but they don't have to be
    • Can be represented as regular attributes
  14. How are weak entities represented in ER maps?
    • The weak entity will have the host-entity's primary key as a foreign key
    • It may have it's own partkey
    • Both keys will be underlined separately
    • There will be a note about what the foreign key references
  15. How is 1-to-1 with total participation represented on an ER map?
    The side with total participation will have the other entities primary key as a foreign key
  16. How is 1-to-1 with total participation on both sides represented on an ER map
    • Only one entity will have the other's primary key as a foreign key, not both
    • The foreign key is not underlined
    • Add a note indicating that the foreign key is unique
  17. How is 1-to-1 with both partial participation represented on an ER map?
    • The relationship is drawn as a relation(entity)
    • The new relation takes a foreign key from both sides, only one is underlined
    • Note down that the non-underlined foreign key is unique
  18. Why is a separate relation needed for 1-to-1 with partial participation on both sides?
    To avoid the use of null values
  19. How is 1-to-N with N-side participation represented in an ER map?
    • For the N relation, include the other relation's primary key as a foreign key (not underlined)
    • Similar to 1-to-1 with total participation, but the foreign key is not unique
    • Add a note that the foreign key is not unique
  20. How are N-to-M relations represented in an ER map?
    • A separate relation must be used
    • Include primary keys from both of the related relations - Both keys are underlined together
  21. How is N-to-M with total participation represented on an ER map?
    • This isn't possible, but it should be noted on a regular N-to-M representation that one (or both) have total participation
    • The same is true for partial - Participation can't be shown in this case, you have to rely on the note below
  22. How is specialization with total participation represented on an ER map?
    Both of the child relations will have the primary key from the parent as an underlined foreign key, followed by their own attributes
  23. How to enforce disjoint of overlapping specialization in an ER map?
    You can't make a note and do it programmatically
  24. How is specialization with total participation (of the parent) represented on an ER map?
    • The parent relation is not written
    • Both of the child relations are written, and all of the patent's attributes are included before the child's
    • The parent's primary key is included and underlined for each child
Author
Ant
ID
356443
Card Set
CPSC 3660 - Relational Models and Mapping
Description
Updated