Week 5 Flashcards
What are entity supertype and subtypes?
A subtype entity inherits the properties of the supertype entity (attributes and relationships) from the supertype entity. The subtype contains the unique attributes.
How are relationships between subtypes and supertypes described?
Relationships are described in terms of “is-a” relationships
What are some “key” things about inheritance?
- All entity subtype subtypes inherit attributes and relationships of the supertype
- All entity subtypes inherit their primary key attribute from their supertype
- At the implementation level, supertype an its subtypes maintain a 1:1 relationship
- Subtypes inherit all relationships in which supertype participates
- Lower level subtypes inherit all attributes and relationships from its all upper level supertypes
What is a specialization hierarchy?
A specialization hierarchy depicts the parent-child relationship between a supertype and subtype.
What is an ERR model?
An extended entity relationship model (EER) is a type of ERD that presents the specialization hierarchy.
What are disjoint subtypes and overlapping subtypes?
- Disjoint Subtypes
Subtypes that contain unique subset of supertype entity set - Overlapping Subtypes
Subtypes that contain nonunique subsets of supertype entity set
What is partial completeness and total completeness?
- Partial completeness
Not every supertype occurrence is a member of a subtype - Total completeness
Every supertype occurrence must be a member of any.
What are the guidelines for a primary key?
A primary key should be:
- An attribute or combination of attributes that uniquely identifies entity instances in an entity set
- Main function is to uniquely identify an entity instance or row within a table
- To guarantee entity integrity, not to “describe” the entity
What are some more guidelines for primary keys?
Primary keys should be:
- Non intelligent
- No change over time
- Preferably single-attribute
- Preferably numeric
- Security compliant
When should use composite primary keys?
You should use composite primary keys when:
- There is a weak entity. Composite primary keys are normally used in this case to represent a real world object that is existent dependent on another real world object. Also used when a real world object that is represented in data model as two separate entities in strong identifying relationship
What are surrogate keys?
A surrogate key is a unique identifier for an entity instance. Surrogate keys are used when there is:
- No natural key
- Selected candidate key has embedded semantic contents
- Selected candidate key is too long or cumbersome
What is a natural key?
A natural key (or natural identifier) is a real world, generally accepted identifier used to uniquely identify real-world objects.