Referential integrity - help required

mctaguma

Registered User.
Local time
Tomorrow, 07:13
Joined
Dec 30, 2006
Messages
18
Hi,

I'm making a database with frontend and backend.

I have one form, called frmHeader, for PersonalName data. (shown in screenshot080.jpg)

you click achievements, to get another form to enter achievement data, based on the member's section.

How should i establish referential integrity?? (relationships shown in screenshot079.jpg)

Any help appreciated,

Matthew
 

Attachments

  • screenshot079.jpg
    screenshot079.jpg
    92.5 KB · Views: 269
  • screenshot080.jpg
    screenshot080.jpg
    65.1 KB · Views: 264
Right click on a table relationship in the relationship viewer. Click "Edit Relationship", select the check box to enforce RI. The relationships in your JPG have RI enforced, since they are bold and display the "1" and "infinity" symbols.
 
I would highly suggest that you rename your ID fields for each table so that it is easier to tell which ID you are working with. I see every table with ID in it.
 
Relationships - Referential Integrity

boblarson said:
I would highly suggest that you rename your ID fields for each table so that it is easier to tell which ID you are working with. I see every table with ID in it.

Is this better?
 

Attachments

  • screenshot079.jpg
    screenshot079.jpg
    29 KB · Views: 244
No, not quite. I'm not totally sure about what some of the fields are and trying to accomplish, but this should give you a better idea.

ri.png
 
boblarson said:
No, not quite. I'm not totally sure about what some of the fields are and trying to accomplish, but this should give you a better idea.

Thank-you!!! :eek: :D

Here it is now! :)

screenshot079.jpg


I added to your Reputation ;)

Matthew
 
I suggest, if possible, to rename your foreign key fields the same name as they are primary keys in the table that they are primary keys in. It makes it WAY easier to know what is what when you look at it. For example, if you look at my sample I have PersonalNID, which is the primary key in the Persons table named the same in each table in which it is the foreign key. You don't have to do it that way but I'll tell you, from lots of experience, it will save you (and whomever follows after you) loads of time and effort when you come back to it (after not working with it after several months) and need to know what is what.
 

Users who are viewing this thread

Back
Top Bottom