Database Scheme



next up previous
Next: Keys Up: Structure of Relational Previous: Basic Structure

Database Scheme

  1. We distinguish between a database scheme (logical design) and a database instance (data in the database at a point in time).

  2. A relation scheme is a list of attributes and their corresponding domains.

  3. The text uses the following conventions: These notes will do the same.

    For example, the relation scheme for the deposit relation:

    We may state that deposit is a relation on scheme Deposit-scheme by writing deposit(Deposit-scheme).

    If we wish to specify domains, we can write:

    Note that customers are identified by name. In the real world, this would not be allowed, as two or more customers might share the same name.

    Figure 3.2 shows the E-R diagram for a banking enterprise.

      
    Figure 3.2: E-R diagram for the banking enterprise

  4. The relation schemes for the banking example used throughout the text are: Note: some attributes appear in several relation schemes (e.g. bname, cname). This is legal, and provides a way of relating tuples of distinct relations.

  5. Why not put all attributes in one relation?

    Suppose we use one large relation instead of customer and deposit:



next up previous
Next: Keys Up: Structure of Relational Previous: Basic Structure



Page created and maintained by Osmar R. Zaï ane
Last Update: Wed Sep 20 15:45:57 PDT 1995