Database Design

A database designer must define

These decisions depend on

Scheme Design

Two important principles guide scheme design

  1. Two pieces of information that are independent should reside in two different relations.

  2. Two pieces of information that are related should reside in the same relation.

Violations of principle 1 result in a database full of redundant information.

Violations of principle 2 result in a loss of information in the database.

Key Selection

Key selection is important, as it usually dictates the choice of primary index structure

Primary Index Structures

The choice of domain for the primary index structure determines

A typical choice is to use a hash table as the primary index structure

If the common queries don't use a key (eg. User Name in the Users relation), you can still use a hash table based on this domain, but the distribution of entries in hash buckets may be less even than if you used a key (such as user login).

Secondary Index Structures

A secondary index

How do we evaluate this tradeoff?