Chapter 5 Flashcards
What is an entity type?
A collection of entities (persons, places, events or thing) of interest represented by a rectangle in an entity relationship diagram.
What is an attribute?
A property of an entity or relationship. Each attribute has a data type that defines the kind of values and permissible operations on the attribute. Attributes are properties of entity types or relationships. An entity should have a primary key as well as other descriptive attributes.
What is a relationship?
A named association among entity types. A relationship represents a two way or bidirectional association among entities. Most relationships involve two distinct entity types. A relationship that involves two entities is a binary relationship. A solid relationship line indicates an identifying relationship. For weak entities, the underlined attribute is part of the primary key, but not the entire primary key. Thus, the primary key of the room is a combination of building ID and room no.
What is a Cardinality?
A constraint on the number of entities that participate in a relationship. In an ERD the minimum and maximum cardinalities are specified for both directions of a relationship.
What is the natural language correspondence for entity types and relationships?
Informally ERDs have a natural language correspondence. Entity types can correspond to nouns and relationships to verbs or prepositional phrases connecting nouns. In this sense one can read an ERD as a collection of sentences. For example, the ERD in figure 5.1 can be read as “course has offerings”, which means there is an implied direction. In the other direction one could write, “offerings are given for a course”. If practical it is a good idea to use active verbs rather than passive verbs for relationships. Therefore “has” is preferred as the relationship name one should use the natural language correspondence as a guide rather than as a strict rule.
What is the difference between an ERD and an instance diagram?
The main difference between an ERD and an instance diagram is that the later one gives us a more detail information when sometimes that information is not available or not shown in an ERD. It usually happens during a Many to many (M-N) relationships between two entities. In figure 5.5. the “Team Teaches” relationship allows multiple professors to jointly teach the same offering as shown in instance diagram of figure 5.6(instance diagram) which gives us a more detail review of which professors are teaching which offerings.
What cardinalities indicate functional, optional, and mandatory relationships?
A minimum cardinality of one or more indicates a mandatory relationship. A mandatory relationship makes the entity type existence dependent on the relationship. If there is a minimum cardinality of zero it means the relationships are going to be optional. The table below gives us a more detailed meaning of the cardinality classifications.
Existence dependency
An entity that can not exist unless another related entity exists, A mandatory relationship creates an existence dependency.
When is it important to convert an M-N relationship into 1-M relationships?
When an M-N relationship needs to be related to other entity types in relationships one must convert that into multiple 1-M relationships. For example: Assume that in edition to enrollment in a course offering, attendance in class session should be recorded. In this situation the 1-M style is preferred because it is necessary to link an enrollment with attendance records, because note that the M-N relationship between Student and Offering entity types would not have allowed another relationship with attendance.
What is a self-referencing relationship?
A relationship involving the same entity type. Self-referencing relationships represent associations among members of the same act. A self-referencing relationship involves connections among members of the same act. They are sometimes called reflexive relationships because they are like a reflection in a mirror.
What is an associative entity type?
A weak entity type that depends on two or more entity types for its primary key. An associative entity type with more than two identifying relationships is known as an M-way associative entity type.
When should an ERD contain weak entity types?
Weak entity type borrows all or part of its primary key from another entity type. Identifying relationships indicate the entity types that supply components of a borrowed primary key.
Difference between an existence-dependent and a weak entity type?
Existence Dependent entity cannot exist unless another related entity exists. A mandatory relationship creates an existence dependency.
What is inheritance in generalization hierarchies?
Inheritance supports sharing between a supertype and its subtypes.
Generalization Hierarchy:
a collection of entity types arranged in a hierarchical structure to show similarity in attributes. Each subtype or child entity type contains a subset of entities of its supertype or parent entity type.