Chapter Four Flashcards
(29 cards)
What is a One-to-Many relationship in database mapping?
Primary key on the one side becomes a foreign key on the many side.
How is a Many-to-Many relationship mapped?
Create a new relation with the primary keys of the two entities as its primary key.
What happens in a One-to-One relationship mapping?
Primary key on mandatory side becomes a foreign key on optional side.
How are weak entities mapped in database relations?
Becomes a separate relation with a foreign key taken from the superior entity.
What is the primary key composed of in a weak entity mapping?
Partial identifier of weak entity and primary key of identifying relation (strong entity).
What is view integration in merging relations?
Combining entities from multiple E-R models into common relations.
What are synonyms in the context of merging entities?
Two or more attributes with different names but same meaning.
What are homonyms in merging relations?
Attributes with the same name but different meanings.
What are transitive dependencies?
Even if relations are in 3NF prior to merging, they may not be after merging.
What is the requirement for a table to qualify as a relation?
It must have a unique name, every attribute value must be atomic, and every row must be unique.
What are the two main purposes of keys in a database?
Primary keys are unique identifiers; foreign keys enable a dependent relation to refer to its parent relation.
What is referential integrity?
A rule stating that any foreign key value must match a primary key value in the relation of the one side.
What does the Domain Constraint refer to?
Allowable values for an attribute, including data types and restrictions on values.
What is an Insertion Anomaly?
An insertion anomaly occurs when the structure of a database forces you to include unnecessary or duplicate data in order to insert a new record.
What is a Deletion Anomaly?
A deletion anomaly occurs when deleting a record from a database unintentionally removes valuable data that is still needed elsewhere.
What is a Modification Anomaly?
A modification anomaly occurs when updating a piece of data requires multiple changes across several rows due to data redundancy.
What defines First Normal Form (1NF)?
No multivalued attributes and every attribute value must be atomic.
What defines Second Normal Form (2NF)?
1NF plus every non-key attribute is fully functionally dependent on the ENTIRE primary key.
What defines Third Normal Form (3NF)?
2NF plus no transitive dependencies on non-primary-key attributes.
What is data normalization?
A tool to validate and improve logical design to avoid unnecessary duplication of data.
Fill in the blank: A relation is a named, two-dimensional table of ______.
data.
True or False: All relations are in 1st Normal Form.
True.
What is the goal of well-structured relations?
To contain minimal data redundancy and allow users to insert, delete, and update rows without causing data inconsistencies.
What is a candidate key?
A unique identifier; one of the candidate keys will become the primary key.