Trouble setting up Relationships

laurat

Registered User.
Local time
Today, 21:18
Joined
Mar 21, 2002
Messages
120
I am having trouble setting up the relationships in my database correctly and looking for any help that anyone can provide. Here are my tables (some tables have many fields so I will only list the primary key which is the only similary field in the tables, if you need more info just ask)

Table A
SO Num (Primary Key)

Table B
SO Num (Primary Key)

Table C
SO Num
IRR Num (fields are a combined primary key)

Table D
SO Num
IRR Num (fields are a combined primary key)

Table E
SO Num
IRR Num (fields are a combined primary key)

Table F
SO Num
IRR Num (fields are a combined primary key)

Table G
SO Num (Primary key)

The relationships need to be set up (referential integrity enforced?) so that a record with a SO Num of 123 cannot be entered in Table B before it is entered in table A and so on. Each table has a form based off of it. Each form will be filled out by a different department within the company and must be done in order. Any help would be appreciated. Thank you.
 
You would need to explain what you are trying to accomplish with this database. I can't imagine a need to have the same field as all or part of the primary key of 7 different tables. Maybe what you need is to have SO Num as the PK of a "Main" table and then referenced as a foreign key in the individual form related tables. I'm just guessing at where you are going.
 
The setup of tables was not my doing, I was given specifications for that. The SO Num or SO Num/IRR Num are used as the primary key in each table because it is the only thing that is unique. This is my first larger database with many tables so I appreciate any help that comes my way.

There is one other table that holds comments for each record. I need it to be related to all the other tables.
 

Users who are viewing this thread

Back
Top Bottom