Professional Documents
Culture Documents
2. A CD with a case is manufactured from many parts. Define an attribute for each of the
component parts and aggregate them to produce the entity Compact Disk.
3. Now, lets look at a DVD at a video rental outlet, e.g. Redbox. What attributes would we use
to classify the DVDs in their collection? Identify the field type (e.g. numeric, text, date) for
each. Include an example of an instance for our Movie DVD entity. Note: Field type is an
example of metadata, i.e. data about data, in this case the field type. In Access the field type
is defined for each attribute in each table during development.
Multi-Valued Attribute: May have more than one value per instance of the entity.
Derived Attribute: An attribute whose value can be calculated from other attributes/data.
Key Attribute: A non-null attribute whose value is unique for each instance in the entity for the
entire database. Each entity must have a key attribute.
Candidate key: An attribute that meets the requirements to be a key attribute.
Composite key: Combination of 2 or more attributes that, when combined, meet the
requirements to be a key attribute.
Requirement that the key be minimum.
Use the entity Movie DVD and brainstorm candidate keys, single and composite keys, and
discuss the pros and cons. Why use sequentially assigned ID numbers such as SID?
E R diagram
How would you represent high schools attended as a multi-valued attribute of Student? How
would you represent high school as a separate entity linked to Student by a relationship? Sketch
the two alternate E R diagrams.
Examples
Determine the minimum and maximum cardinality for the following entity relationship entity
mappings. Explain your reasoning and assumptions.
1. Library Patron - CURRENTLY BORROWING - Book
Generalizations
Generalization abstraction: The process of defining a top-level class subclass relationship
that exists between two or more entities. In a generalization the top-level class inherits the
attributes that are common to all of the subclasses. Attributes and relationships that are not
common to all subclasses remain with their respective subclass.
All instances in the generalization share the same key attribute. The key attribute is always
represented as an attribute of the top-level class only.
At Redbox, Movie DVD is a subset of a larger class, call it Rental. What other classes of objects
can be considered as a subclass of Rental? What attributes of the top-level class are inherited by
the subclasses? What attributes are not? Relationships?
There are two properties of a generalization that must be determined:
Total or Partial: The coverage of a generalization is Total if each instance of the top-level class is
mapped to at least one instance of the subclasses. It is Partial if instead there exists some instance
in the top-level class that is not mapped to any instance of the subclasses.
Exclusive or Overlapping: The coverage of a generalization is Exclusive (E) if each instance in
the top-level class is mapped to at most one instance of the subclasses. It is Overlapping (O) if
instead there exists some instance of the top-level class that is mapped to instances in two or
more subclasses.
Generalization Mapping
For each of the following Generalization Mappings, determine if it is Total or Partial, and
Exclusive or Overlapping. Explain your reasoning and assumptions.
1.
Balls
Footballs
2.
Basketballs
Baseballs
Football
Player
3.
Basketball
Player
Baseball
Player
Undergraduate
Student
Graduate
Student