Chap 4 Flashcards
Determinant
The attribute on the left side of the arrow in a functional dependency
Functional Dependency
A constraint between 2 attributes in which the value of 1 is determined by the value of another.
Transitive Dependency
A functional dependency between the primary key and one or more nonkey attributes that are dependent on the primary key via another nonkey attribute.
OrderID->CustomerID->CustName
A functional dependency between the primary key and one or more nonkey attributes that are dependent on the primary key via another nonkey attribute.
OrderID->CustomerID->CustName
Recursive Foreign Key
A foreign key in a relation that references the primary key values of the same relation
Normalization
The process of decomposing relations with anomalies into smaller well-structured relations.
Composite Key
Primary key that consists of more than one attribute
Normal Form
A state of a relation that requires that certain rules regarding relationships between attributes or foreign dependencies are satisfied.
Partial Functional Dependency
A functional dependency in which one or more nonkey attributes are functionally dependent on part but not all of the primary key.
Enterprise Key
A primary key whose value is unique across all relations.
Surrogate Primary key
A serial number or other system-assigned primary key for a relation
Transitive Dependency
A functional dependency between primary key and one or more non key attributes that are dependent upon the primary key via another nonkey attribute.
3NF
A relation that is in 2NF and has no transitive dependencies
2NF
A relation in 1NF in which every nonkey attribute is fully functionally dependent on the primary key
1NF
A relation that has a primary key and in which there are no repeating groups
Anomaly
An error or inconstancy that may result when a user attempts to update a table that contains redundant data.
Three types: Insertion, Deletion, Modification
Well Structured Relation
A relation that contains minimal redundancy and allows users to insert, modify and delete rows in a table without errors or inconsistencies.
Normal Form vs. Normalization
Normalization is the process of decomposing relations with anomalies to Normal Form.
Candidate Key vs. Primary Key
Candidate key is an attribute or combination of attributes that uniquely identifies a row in a relation. It can be the primary key but does not have to be.
Partial Dependency vs. Transitive Dependency
A partial dependency is where A->B but something can be removed from A and yet A->B still.
In a transitive dependency, A->B, B->C therefore A->C
A partial dependency is where A->B but something can be removed from A and yet A->B still.
In a transitive dependency, A->B, B->C therefore A->C
Composite Key vs. Recursive Foreign Key
A composite key is a primary key that has more than 1 attribute where as a recursive foreign key is where the primary key also exists as a foreign key in the same relation.
Determinant vs. Candidate Key
Determinants is the attribute on the left side of the arrow of a functional dependency.
Candidate key is an attribute or combination of attributes that uniquely identify a row in a relation.
Enterprise vs. Surrogate Key
Surrogate keys have no business meaning and are solely used to identify a record in the table.
Enterprise keys are a primary key who’s unique across the entire database.
Differences between conceptual and logical data model
Conceptual data modeling is done in the planning and analysis phase. Analysts draw a diagram to outline scope of data involved. Then produces a data model that identifies all data, every attribute and relationship defined.
Logical Data Model describes data as detailed as possible. Attributes, PK, FKs specified. Normalization is done.
Two properties each candidate key must satisfy
- Unique identification: must uniquely identify row; implies each nonkey attribute is functionally dependent
- Nonredundant: no attribute in key can be deleted without destroying property of unique identification
Three anomalies that can arise
Insertion, Deletion and Modification
Purpose of Normalization
- Minimize redundancy thereby avoiding anomalies and conserving space
- Simplify enforcement of referential integrity constraints
- Make easier to maintain data (insert, update, delete)
- Provide better design and strong basis for future growth.