Counterfiet Merchandise Tracking system (1 Viewer)

rainman89

I cant find the any key..
Local time
Today, 09:12
Joined
Feb 12, 2007
Messages
3,015
Suggestion: Enable referential integrity (RI) on your relationships, to make the 'one' and 'many' side more clear.

As a matter of general practice, the foreign keys (FKs) on the 'many' side of 1:M relationships need to point to the Primary Key (PK) on the 'one' side of the join. Do not make a new field in the 'one-side' table for each join.

So, for example, your Purchase table should have a [LocationFK] field (or whatever your naming convention for FKs is), with a join to the [LocationID] PK of the Location table. With RI enabled, the 1:M will show up as soon as you make your join.

Once you go through this for all of your joins, I suspect you'll answer most of your questions. After that, come back here if you need more help

So your saying that my FKs were wrong in my table design?
I did what i think u meant! See attached.
Will this solve my problem of the Owners to the locations though? thats my main problem
 

Attachments

  • relates.jpg
    relates.jpg
    72.5 KB · Views: 151

KKilfoil

Registered User.
Local time
Today, 09:12
Joined
Jul 19, 2001
Messages
336
So your saying that my FKs were wrong in my table design?
I did what i think u meant! See attached.
Will this solve my problem of the Owners to the locations though? thats my main problem

That is more like what I would do. in the convention that I happen to follow, I would name the link table [LocationOwnerLink], but that is just a quibble.

I am unsure why your [Owner]-[LocOwn] join is showing the way it is if you have enabled RI, as it should then show the 1:M symbols on the join.
 

rainman89

I cant find the any key..
Local time
Today, 09:12
Joined
Feb 12, 2007
Messages
3,015
That is more like what I would do. in the convention that I happen to follow, I would name the link table [LocationOwnerLink], but that is just a quibble.

I am unsure why your [Owner]-[LocOwn] join is showing the way it is if you have enabled RI, as it should then show the 1:M symbols on the join.

I forgot to change that one when i took the screenshot, but i have fixed that part also!
 

Users who are viewing this thread

Top Bottom