- We distinguish between a database scheme (logical design) and a database instance (data in the database at a point in time).
- A relation scheme is a list of attributes and their corresponding domains.
- The text uses the following conventions:
- italics for all names
- lowercase names for relations and attributes
- names beginning with an uppercase for relation schemes
These notes will do the same.For example, the relation scheme for the deposit relation:
- Deposit-scheme = (bname, account#, cname, balance)
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:
- (bname: string, account#: integer, cname: string, balance: integer).
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.
- The relation schemes for the banking example used throughout the text are: