Consider an automobile dealership with three locations. Data fields exist for stock number, vehicle identification number, make, model, year, color, and invoice cost. Identify the possible candidate keys, the likely primary key, a probable foreign key, and potential secondary keys.
What will be an ideal response?
To identify candidate keys, students must determine which fields in the record are unique to a single vehicle. Only the stock number and vehicle identification number meet this requirement and could serve as primary keys. Because the stock number probably is smaller and locally generated by the automobile dealership, it might be the best choice for the primary key. It is possible that the model field is in the form of a code, such as Z99 or 4DX, which might serve as a foreign key for a record in the MODEL table. The dealership might want to access, display, or print information by make, model, year, color, or invoice cost — so these fields are potential secondary keys. A record design might resemble the following:
VEHICLE (STOCK NO, MAKE, MODEL, YEAR, COLOR, INVOICE COST, LOCATION)
In this example, LOCATION would be a foreign key to link the VEHICLE table to the LOCATION table.
You might also like to view...
The ________ displays data horizontally across the page
A) Tabular Layout B) Layout C) Design View D) Stacked Layout
When using linked lists:
a. New records are always added to the bottom of the file. b. Deleting data is accomplished by moving all records up, after the deleted record, therefore, eliminating the deleted record. c. When data is deleted, the links are changed to jump over the deleted record. The deleted record number is entered into the empty list. d. New records are always added to the top of the file.