Database Design Theory and Methodology Flashcards
(38 cards)
the grouping of attributes to form “good” relation schemas
relational database design
2 levels of goodness of relation schemas
- logical/conceptual level : “user view” level
- implementation/storage level : “base relation” level
measures of quality of a relational database design (4)
- semantics of the relation attributes
- redundant information in tuples and update anomalies
- null values in tuples
- spurious tuples
refers to the interpretation of attribute values in a tuple
semantics of a relation attributes
bottom line of relational database design (2)
- design a schema that can be explained easily relation by relation
- the semantics of attributes should be easy to interpret
effects of redundant information in tuples (5)
- wastes storage
- causes update anomalies
- insertion anomalies
- deletion anomalies
- modification anomalies
some data cannot be easily inserted into the database
insertion anomaly
deleting some data can cause other information to be lost
deletion anomaly
all copies of the redundant data have to be changed or else the database will become inconsistent
modification anomaly
relational database design guideline 1 (4)
- each tuple in a relation should represent one entity/relationship instance only
- attributes of different entities should not be mixed in the same relation
- only foreign keys should be used to refer to other entities
- entity and relationship attributes should be kept apart as much as possible
relational database design guideline 2 (2)
- design a schema that does not suffer from the insertion, deletion and modification anomalies
- if there are any anomalies present, then note them so that applications can be made to take them into account
reasons for null values in tuples (5)
- attribute is not applicable or invalid
- attribute value unknown but may not exist
- value known to exist but unavailable
- can waste storage space
- leads to difficulty of performing selections, aggregation operations and specifying joins
relational database design guideline 3 (2)
- relations should be designed such that their tuples will have as few NULL values as possible
- attributes that are NULL frequently could be placed in separate relations
additional tuples that represent invalid information; a possible result of a JOIN operation on poorly designed relations
spurious tuples
relational database design guideline 4
relations should be designed in a way that no spurious tuples will be generated if a natural-join operation is applied to them
used to define normal forms for relations denoted by X -> Y
functional dependency
a property of the meaning of data and hold at all times
functional dependency
what inference rule for FDs is being shown:
If Y subset-of X, then X -> Y
reflexive
what inference rule for FDs is being shown:
If X -> Y, then XZ -> YZ
augmentation
what inference rule for FDs is being shown:
if X -> Y and Y -> Z, then X -> Z
transitive
what inference rule for FDs is being shown:
if X -> YZ, then X -> Y and X -> Z
decomposition
what inference rule for FDs is being shown:
if X -> Y and X -> Z, then X -> YZ
union
what inference rule for FDs is being shown:
if X -> Y and WY -> Z, then WX -> Z
pseudotransitivity
set of all dependencies that include F as well as all dependencies that can be inferred from F
Closure of F (F+)