Parcial 2 Flashcards
Is a finite, time varying set of n-tuples (d1, d2, …, dn) such that d1 e Dom1, d2 e Dom2, …, dn e Domn, and A1 c D1, A2 c D2, …, An c Dn.
Relation with Attributes defined over n Domains
Tabular structure of data where
- R is the table heading
- Attributes are table columns
- Each tuple is a row
Relational Model
Is the definition; i.e., a set of attributes
Relation scheme
Is a set of relation schemes: i.e., a set of sets of attributes
Relational Database Scheme
Is an instance of a relation scheme
Relation
is a subset of the Cartesian product of the domains of all attributes, i.e.
Relation over a relation scheme
Is a type in the programming language sense.
Domain
Is a set of acceptable values for a variable of a given type.
Domain values
Binary operations (e.g., comparison to one another, addition, etc.) can be performed
on them.
Domain compatibility
Attribute values are repeated for each
project that the employee is involved in.
Repetition Anomaly
If any attribute of project is updated, multiple tuples have to be updated to reflect the change.
Update Anomaly
It may not be possible to store information about a new project until an employee is assigned to it.
Insertion Anomaly
If an engineer, who is the only employee on a project, leaves the company, his personal information cannot be deleted, or the information about that project is lost.
May have to delete many tuples.
Deletion Anomaly
Is a process of concept separation which applies a top-down methodology for producing a schema by subsequent refinements and decompositions.
Normalization
Criteria that should the decomposed schemas follow: Recover the original relation -> no spurious joins
Reconstructability
Criteria that should the decomposed schemas follow: No information loss
Lossless decomposition
Criteria that should the decomposed schemas follow: The constraints (i.e., dependencies) that hold on the original relation should be enforceable by means of the constraints (i.e., dependencies) defined on the decomposed relations.
Dependency preservation
Eliminates the relations within relations or relations as attributes of tuples.
First Normal Form (1NF)
Eliminate the partial functional dependencies of non-prime attributes to key attributes
Second Normal Form (2NF)
Eliminate the transitive functional dependencies of non-prime attributes to key attributes
Third Normal Form (3NF)
Eliminate the partial and transitive functional dependencies of prime (key) attributes to key.
Boyce-Codd Normal Form (BCNF)
Specify how to obtain the result using a set of operators
Relational Algebra
Relational Algebra Operators: Produces a horizontal subset of the operand relation
Selection (sigma)
Relational Algebra Operators: Produces a vertical slice of a relation
Projection