English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Please see the table here.
http://img.villagephotos.com/p/2007-3/1247850/Table.jpg

1) What are the topics of each tables?
2) Identify the primary key(s) and the foreign key(s).

2007-03-13 21:58:11 · 2 answers · asked by Xiangwei Xi 3 in Education & Reference Homework Help

2 answers

2) The primary key of a table is a field or set of fields that uniquely identify a row in the table. If more than one unique set exists, one set is arbitrarily chosen as the primary key. The other unique set(s) are called alternate keys. As your webpage shows, many systems internally generate a unique sequence-generated key value so that exactly one column is necessary as the primary key. Single-field primary keys are easier to program with.

A foreign key is an identifying value kept in a "child" table that references a primary key in a "parent" table. In your webpage, a single client can view many homes, so a single clientNo can appear multiple times in the Viewings table.

Table Client primary key (clientNo)
Table Client has no foreign key.

Table PrivateOwner primary key (ownerNo)
Table PrivateOwner has no foreign key

Note: missing from the picture is a Property table, which has a primary key of (propertyNo)

Table Viewing primary key (clientNo, propertyNo, viewDate)
Assumption: the viewDate holds the time, so that a client could visit a property more than once in a day and the system could record the different visits base on the time of day.
Table Viewing foreign key #1 (clientNo) references Client(clientNo).
Table Viewing foreign key #2 (propertyNo) references Property(propertyNo).

Note: missing from the picture is a Branch table, which has a primary key of (branchNo).
Also missing from the picture is a Staff table, which has a primary key of (staffNo).

Table Registration primary key (clientNo, branchNo, staffNo).
Assumption: a particular staff member can register a client only once at a branch.
Table Registration foreign key #1 (clientNo) references Client(clientNo).
Table Registration foreign key #2 (branchNo) references Branch (branchNo).
Table Registration foreign key #3 (staffNo) references Staff (staffNo).

1) The previous writer's answer is adequate

2007-03-13 22:38:41 · answer #1 · answered by VT 5 · 1 0

This appears to be a database used by a Realty© firm

1) The topic of the top table is a list of potential buyers and their preferences

The next table is a list of those who own the property listed

The third table from the top is a record of the properties in inventory that had been viewed by a potential buyer.

The last table is a record of the date potential buyers were registered with the firm, who registered them, what branch, and when.

2)The primary keys are clientNo and ownerNo while the foreign keys are propertyNo, branchNo, and staffNo.

2007-03-14 05:09:48 · answer #2 · answered by danny_boy_jones 5 · 0 0

fedest.com, questions and answers