71.2.1 Understanding the Relational Model
The Relational Database Model looks like this:
Simply stated, the Relational Database Model is a collection of Flat Files with the following characteristics:
Specialization: Each flat file specializes in storing a certain type of information.
Key Fields: Each flat file has a column that is called the Key Field. The data in this key field is unique -- that is, no two records will have exactly the same data in this key field. (For example, there will only be one Invoice with the number 101). This unique quality is what makes it possible to distinguish one record in the file from all other records in the file. In the example above, the key fields for the files Customers, Invoices, and Invoice Line Items are Customer#, Invoice#, and Line Item# respectively.
Indexed: Each Key Field is Indexed for fast queries.
Relations: So that they can share information, many of the files are related to each other. That's how the model got its name, Relational Database Model.
Duplicated Related Fields: To manage the relationships, we copy the Key Field data into the related records. For example, when we do invoices for Customer# 150, we copy that customer number into the Customer# field of the Invoice record. This makes it possible for us to match up (relate) Customer information to Invoice information. As we did with the flat file model, we are duplicating information; however, we are duplicating just one field instead of several fields.
|