Link Tables

Reply

Join Date: Oct 2007
Posts: 2
Reputation: abch624 is an unknown quantity at this point 
Solved Threads: 0
abch624 abch624 is offline Offline
Newbie Poster

Link Tables

 
0
  #1
Oct 27th, 2007
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, 6 views)
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 2
Reputation: Ashragon is an unknown quantity at this point 
Solved Threads: 0
Ashragon's Avatar
Ashragon Ashragon is offline Offline
Newbie Poster

Re: Link Tables

 
0
  #2
Oct 29th, 2007
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
Tables.jpg  
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 2
Reputation: abch624 is an unknown quantity at this point 
Solved Threads: 0
abch624 abch624 is offline Offline
Newbie Poster

Re: Link Tables

 
0
  #3
Oct 29th, 2007
Hi,

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

Thanks a lot.
Originally Posted by Ashragon View Post
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC