DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Database Design (http://www.daniweb.com/forums/forum142.html)
-   -   Link Tables (http://www.daniweb.com/forums/thread94508.html)

abch624 Oct 27th, 2007 12:33 pm
Link Tables
 
1 Attachment(s)
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

Ashragon Oct 29th, 2007 9:49 am
Re: Link Tables
 
1 Attachment(s)
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 Oct 29th, 2007 10:01 am
Re: Link Tables
 
Hi,

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

Thanks a lot.
Quote:

Originally Posted by Ashragon (Post 459330)
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.



All times are GMT -4. The time now is 10:13 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC