Chapter 6
Chapter 6
Includes 23
• creating the data dictionary based on the logical model
and information gathered.
• Hashed
Guidelines for choosing indexes
Do not index small relations.
Index PK of a relation if it is not a key of the file organization.
Add secondary index to a FK if it is frequently accessed.
Add secondary index to any attribute that is heavily used as a secondary key.
Add secondary index on attributes that are involved in: selection or join criteria;
ORDER BY; GROUP BY; and other operations involving sorting (such as UNION or
DISTINCT).
Add secondary index on attributes involved in built-in functions.
Add secondary index on attributes that could result in an index-only plan.
Avoid indexing an attribute or relation that is frequently updated.
Avoid indexing an attribute if the query will retrieve a significant proportion of
the tuples in the relation.
Avoid indexing attributes that consist of long character strings.
Cont.…
Design user view
Design security mechanisms (System security and Data
security)
Consider controlled redundancy
Monitor and tune the operational system
Denormalization(1)
sometimes a normalized database design does not provide
maximum processing efficiency.
Also consider that denormalization:
• Makes implementation more complex;
• Often sacrifices flexibility;
• May speed up retrievals but it slows down updates.
Denormalization refers to a refinement to relational schema
such that the degree of normalization for a modified relation
is less than the degree of at least one of the original
relations.
Denormalization(2)
• Transforming normalized relations into unnormalized
physical record specifications
• Benefits:
• Can improve performance (speed) by reducing number of table
lookups (i.e. reduce number of necessary join queries)
• Costs (due to data duplication)
• Wasted storage space
• Data integrity/consistency threats
• Common denormalization opportunities
• One-to-one relationship
• Many-to-many relationship with attributes
• Reference data (1:N relationship where 1-side has data not used in
any other relationship)
Denormalization(3)
Consider denormalization in following situations, specifically to speed up frequent or
critical transactions: