Step by step exercise. Editing relationships


Objective.

 

To practice the procedures of removing and adding tables, editing relationships, and deleting relationships from the Relationships window.

 

Exercise 1.

 

1 If not already in, open the Classes database, from My Documents folder.

2 Situate yourself in the Database window if not yet.

3 Drop down the Tools menu.

4 Select the Relationships option.

Firstly we will practice the procedures to Show and Remove a table:

1 Click on Courses table.

2 Drop down the Relationships menu.

3 Select the Hide Table option.

The table has disappeared with its associated relationship, the relationship has disappeared from the Relationship window but has not been erased.

4 Drop down the Relationships menu.

5 Select the Show Table option.

The Show Table dialogue box will appear.

6 Double click on Courses name.

7 Click on the Close button.

You have now returned to the Relationships window and on showing the Courses table the relationship has automatically appeared again.

Now we wish that when a course is erased, that all the students taking this course will automatically be erased, for this we need to edit the relationship:

1 Click on relationship.

2 Drop down the Relationships menu.

3 Select the Edit Relationship... option.

The Edit relationships dialogue box will be displayed.

4 Check the Cascade Delete Related Records box.

We also wish that when a course code is changed in Courses table, that all the students taking this course will automatically be update.

1 Check the Cascade Update Related Fields box.

2 Click on the OK button.

You have edited the relationship and have returned to the Relationships window.

Finally we will try to delete the relationship, in such a way that the tables will not be related:

1 Click on the relationship so that it stands out.

2 Open Edit menu.

3 Select the Delete option.

A dialogue box will appear asking us whether we want to delete the relationship permanently, we should answer Yes, but in order for this exercise to continue we will answer No.

4 Answer No.

5 Close the Relationships window by clicking on the button.

 

Exercise 2.

 

Now we are going to repeat the previous exercise, but using contextual menus.

1 If not already in, open the Classes database, from My Documents folder.

If the Relationships window is not open, open it:

1 Right-click on Relationships window

A contextual menu will appear.

2 Select Relationships... option.

To remove or show a table from the Relationships window:

1 Right click on the Courses table, the contextual menu associated to the table will open.

2 Select the Hide table option.

The table and the relationship associated with it have disappeared.

3 Right click on the Relationship window.

4 Select the Show Table option.

The Show Table dialogue box will appear.

5 Double click on Courses name.

6 Click on the Close button.

You have now returned to the Relationships window and on showing the Courses table the relationship has automatically appeared again.

Now to edit the relationship:

1 Right click on the relationship to open the contextual menu associated with relationships.

2 Select Edit relationship... option.

The Edit relationships dialogue box will be displayed.

3 Click on the OK button (we will not edit the relationship now).

To delete the relationship:

1 Right click on the relationship to open the contextual menu associated with relationships.

2 Select the Delete option.

A dialogue box will appear asking us whether we want to delete the relationship permanently, we should answer Yes, but in order for this exercise to continue we will answer No.

4 Answer No.

5 Close the Relationships window by clicking on the button.

 

Ejercicio3.

 

Finally we will repeat the exercise but using the buttons on the toolbar.

1 If not already in, open the Classes database, from My Documents folder.

2 Situate yourself in the Database window if not yet.

If the Relationships window is not open, open it:

1 Click on the button on the toolbar.

To remove a table:

1 Click on the Courses table.

2 Press the Del key.

The table and the relationship associated with it have disappeared.

3 Click on the Show table button.

The Show Table dialogue box will appear.

4 Double click on Courses name.

5 Click on the Close button.

You have now returned to the Relationships window and on showing the Courses table the relationship has automatically appeared again.

Now to edit the relationship:

1 Double click on the relationship to enter the Edit relationships dialogue box.

3 Click on the OK button (we will not edit the relationship now).

To delete a relationship:

1 Click on the relationship so that it stands out.

2 Press the Del key.

A dialogue box will appear asking us whether we want to delete the relationship permanently, we should answer Yes, but in order for this exercise to continue we will answer No.

4 Answer No.

5 Close the Relationships window by clicking on the button.

 



Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited. April-2006.