954,219 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Link Tables

Hi,

I want to implement a functionality in a database so that a menu can hold as many drinks and as many food items as possible. I am using a Link table for this functionality.

Please have a look at the link Tables.doc file attached. There is a picture (er diagram) of part of the database.

Your help might help...

Thanks - Zahid

Attachments Link_Tables.doc (32KB)
abch624
Newbie Poster
2 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

Hi Zahid,

you´re describing a One-to-Many relationship between Menu and Food/Drink.
So you have to insert the primary key from Menu as foreign key into both Food and Drink.

It should look something like this (see attachment).

Hope this helps.

Attachments Tables.jpg 15.62KB
Ashragon
Newbie Poster
2 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

Hi,

Thanks a lot for the reply. I understand how to do it now... PERFECT!!!!

Thanks a lot.
Hi Zahid,

you´re describing a One-to-Many relationship between Menu and Food/Drink.
So you have to insert the primary key from Menu as foreign key into both Food and Drink.

It should look something like this (see attachment).

Hope this helps.

abch624
Newbie Poster
2 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You