User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 373,496 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,878 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser:
Views: 917 | Replies: 2
Reply
Join Date: Oct 2007
Posts: 2
Reputation: abch624 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abch624 abch624 is offline Offline
Newbie Poster

Question Link Tables

  #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, 3 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Location: Kiel - Germany
Posts: 2
Reputation: Ashragon is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Ashragon's Avatar
Ashragon Ashragon is offline Offline
Newbie Poster

Re: Link Tables

  #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 Images
File Type: jpg Tables.jpg (15.6 KB, 4 views)
Reply With Quote  
Join Date: Oct 2007
Posts: 2
Reputation: abch624 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abch624 abch624 is offline Offline
Newbie Poster

Solution Re: Link Tables

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Database Design Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 6:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC