Advanced data modeling


Database schema before class: database_day10_end_of_class.sql
Slides from class

Database notes

Inheritances
The property that enables an entity subtype to inherit the attributes and relationships of the supertype.
Subtype discriminator
The attribute in the supertype entity that determines to which entity subtype each supertype occurrence is related.
Partial completeness
A condition in which some supertype occurrences might not be members of any subtype.
Total completeness
A conditions in which every supertype occurrence must be a member of a subtype.
Superkey
An attribute or set of attributes that uniquely identify each entity in a table.
Candidate key
A minimal superkey; that is, a key that does not contain a subset of attributes that is itself a superkey.
Primary key
An identifier composed of one or more attributes that uniquely identifies a row. Also, a candidate key selected as the unique entity identifier.
Natural key
A generally accepted identifier for real-world objects. As its name implies, a natural key is familiar to end users and forms part of their day-to-day business vocabulary.
Surrogate key
A system-assigned primary key, generally numeric and auto-incremented or could be generated as a UUID.
Composite key
A key with multiple attributes.
Universally Unique Identifier (UUID)
A value generated by the system that is gauranteed to be unique; the same value will never be generated by another computer or by the same computer at a different time.
Time variant data
Data whose values are a function of time. Example: a person's salary may change over time.
Weak entity
An entity that meets two conditions: (1) the entity is existence dependent on another entity; it cannot exist without the related entity, and (2) the entity has a primary key that is partially or totally derived from the parent entity in the relationship.
Strong entity
An entity that is existence independent from other entities; that is it can exist apart from all of its related entities. Sometimes called a regular entity.
Weak (non-identifying) relationship
A relationship in which the primary key of the related entity does not contain a primary key component of the parent entity.
Strong (identifying) relationship
A relationship that occurs when two entities are existence dependent; from a database design perspective, this relationship exists whenever the primary key of the related entity contains a portion of the primary key of the parent.
Note: many definitions from Coronel and Morris.