Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Need help with normalizing

Re: Need help with normalizing

From: Mike Sherrill <MSherrill_at_compuserve.com>
Date: Wed, 13 Nov 2002 09:41:39 -0500
Message-ID: <cu5tsuga890td0m69vpletm7skqa8mp9h8@4ax.com>


On Fri, 08 Nov 2002 02:04:57 GMT, "Seth Brewer" <fieury_at_hotmail.com> wrote:

>I'm building a menu database which eventualy will allow people to order a
>meal by date. Only certain meals will be available on certain dates, but
>certain meals may be available on many dates. To make things worse I want to
>have the main courses and sides in separate tables so that they can be mixed
>and matched many-to-many.

You need to record the fact each meal is available on specific dates. So a table of MEAL_AVAILABILITY seems to be in order.

Bare bones . . .

 MEAL_AVAILABILITY
 --
 mainCourseID
 sideID
 dateAvailable

 PRIMARY KEY        (mainCourseID, sideID, DateAvailable)
 FOREIGN KEY        (mainCourseID, sideID) 
   REFERENCES MEALS (mainCourseID, sideID)

You'll have to flesh that out and translate that into your dbms's language.

-- 
Mike Sherrill
Information Management Systems
Received on Wed Nov 13 2002 - 08:41:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US