Хелпикс

Главная

Контакты

Случайная статья





Salary. Profession. Address. Status



Name

Salary

Profession

Building with fields:

Building ID – key field

Address

Type

Status

And fill them with records (not less than 10 entries in each table).

 

7. Establish relationships between tables, this

· In the database window open the tab "Database tools". Then select the command "Relationships".

· As you use this command the first time, the Show Tabledialog box will open, alternately add all three tables.

· Once you have chosen all the table, close a dialog box. A window will appear "Relationships".

· In order to establish a link between 2 tables have to "grab" the left mouse button a foreign key in one table and, without releasing the mouse button, drag the marker on the corresponding primary key in another table.

A foreign key, simply stated, is another table's primary key. The values in a foreign key field match values in the primary key, indicating that the two records are related.

· The following dialog box appears:

It specifies the attributes of both tables for which data table will be linked (in the case of an error, you can change the attribute on the right). Also in this window can be set to Enforce Referential Integrity mode (recommended). "Cascade Update Related Field" mode means that any changes made in the communication field of the first table will be automatically transferred to the corresponding fields of the second table. "Cascade Delete Related Field " mode works in a similar way, but when you delete records.

· After that, you need to click on the button "Create" dialog box. Relation will be created.

· Similarly, install all the necessary links between database tables. In the database "Construction" relationships will be look like on the screenshot below:

 



  

© helpiks.su При использовании или копировании материалов прямая ссылка на сайт обязательна.