Link to home
Start Free TrialLog in
Avatar of Henrypb
Henrypb

asked on

Table and Relationship Design

Hi,

I have a database that I need a little help configuring. This table is used to keep track of cable records for telephone numbers. The main table has these fields

Table: Main

Phone Number
Cable
Pair

My problem is that each phone number needs a unique pair on a cable. I don't know how to configure the table or releation ship.

In addtion, what can a set up as far forms where I can add a cable and specify that this cable X amount of pairs.  

Thanks for any help that you can provide.

Henry

 
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

>each phone number needs a unique pair on a cable
Can you explain this in greater detail?
Avatar of Henrypb
Henrypb

ASKER

Thanks for the rapid response. Here is an examle of what I am working with.

Phone number 8513030  gets to the customer on cable 1 pair 5.
Phone number 8513001  gets to the customer on cable 1 pair 10.
Phone number 8516000  gets to the customer on cable 4 pair 25

I want to be able to restrict users from assigning the same cable and pair to a phone number.
In that case, in your table just make Phone Number the primary key, and in the forms that allow data entry before you insert/update a record you'll have to run a query to see if there are already any cable-pair combinations that match what your user entered, and if so do not allow the insert/update.

The relationship between cable-pair 'pair' and phone number cannot be modeled solely in table design.

Hope this helps.
-Jim
If you just want to prevent more than 1 combination of Cable/Pair happening then you could join themtogether as a unique index under
View>Index

HTH

Peter
ASKER CERTIFIED SOLUTION
Avatar of thenelson
thenelson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Henrypb

ASKER

Thanks everyone for the replies. I am going to go with thenelson's approach. Thanks again.