| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Need help with normalizing
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 SystemsReceived on Wed Nov 13 2002 - 08:41:39 CST
![]() |
![]() |