944,172 Members | Top Members by Rank

Ad:
Oct 27th, 2007
0

Link Tables

Expand Post »
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
Attached Files
File Type: doc Link Tables.doc (32.0 KB, 46 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abch624 is offline Offline
2 posts
since Oct 2007
Oct 29th, 2007
0

Re: Link Tables

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.
Attached Thumbnails
Click image for larger version

Name:	Tables.jpg
Views:	174
Size:	15.6 KB
ID:	4333  
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ashragon is offline Offline
2 posts
since Oct 2007
Oct 29th, 2007
0

Re: Link Tables

Hi,

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

Thanks a lot.
Click to Expand / Collapse  Quote originally posted by Ashragon ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
abch624 is offline Offline
2 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Database Design Question
Next Thread in Database Design Forum Timeline: Design for an order/product for a business





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC