relationship help

londonworker

New member
Local time
Today, 21:12
Joined
Jul 3, 2005
Messages
6
I have to tbls which have indeterminate relationships and I'm told that ther is no unique index found why is this?

i am using emplyID on both tblCommission and tblSales both are number type.

I might not need the commission table as I'm using this is calculate commission as said im my previous post
 
A "foreign key" is a key in another place. In order for Access (Jet) to determine the cardinality of a relationship at least one of the tables MUST have a primary key (a unique index will work but will not allow referential integrity to be enforced). The relationship must be from the primary key of one table to a data field in another table. That will be interpreted as a 1-many relationship.

Best practice in relational databases calls for EVERY table to have a primary key. A table that doesn't have a natural key can use an autonumber so there is no reason to not have a pk. Once your tables all have primary keys, you can define relationships and enforce referential integrity.
 

Users who are viewing this thread

Back
Top Bottom