RelationalDBDesign
RedhatLinuxSys Seomining
prev next prev next
Course navigation
Lesson 10 Keys Column Descriptors
Objective Distinguish between key columns and descriptor columns.
View Image
Entities are represented by database tables
As we have seen throughout this module, entities are represented by database tables.
Those tables contain columns that describe different attributes of the entity.
For example, a table describing customers probably would include each customer's name, address, and phone number, along with several other categories of information. Click the View Image button to see this illustrated.
Key columns
The CUSTOMER table also contains a column labeled CustID, which you can not fill in on the basis of customer input or any pre-existing information about the customer. Values in the CustID column are assigned by the data-entry clerk or are generated by the RDBMS. Regardless of the source, the CustID column will contain a unique value for each customer in the database, thus distinguishing that record from every other record in the table. That makes the CustID column a key column, because it differentiates a record from every other record in the table.
Descriptor columns
Because it is possible for many records to have the same value as other records in columns such as CustFirst, CustLast, and CustPhone, those columns are referred to as descriptor columns. The columns describe the customer referred to by the record, but don't necessarily differentiate that customer from every other customer in the table.
In the extreme case, consider a father and son, both named Thomas L. Rothrauff, living at the same address. Because there is no column for a name suffix like "Jr." or "III", the two customers would be indistinguishable in the CUSTOMER table.
View Image
To solve the problem, the elder Mr. Rothrauff and the younger Mr. Rothrauff each would be assigned a unique CustID to differentiate them in the Stories on CD database. Click the View Image button to see this illustrated.
The next lesson defines primary keys.
Course navigation