What a day to forget my lunch
God - I am hungry
I believe the key here is NOT the individual pieces - but the combination of those pieces that is the important piece of information, including no protein (for the vegetarians), no starch (for the ones like me who are dieting) and no vegetables (for kids who just plain hate them)
So in THAT respect - I cannot think of any other way of doing this
It will be interesting to see what anyone else comes up with

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H. Lampert
Sent: Wednesday, December 10, 2014 12:36 PM
To: Midrange Systems Technical Discussion
Subject: Database design issue: seems really bad, yet I'm having trouble coming up with anything better

Consider this scenario:

We have three sets of items. To avoid discussing the real-world situation, I'll use a food analogy, and call them protein, starch, and vegetable.

We have perhaps as many as 300 distinct protein items (to which others may be added in the future), some 60 starch items (to which others may be added in the future), and some 80 vegetable items (once again, to which others may be added in the future). A complete meal includes a protein, an arbitrary number of starches, and an arbitrary number of vegetables.

We always select the protein first. Each protein has its own subset of compatible starches and vegetables, e.g., if the protein is prime rib,
10 oz cut, then the available starches would include Yorkshire pudding, mashed potatoes, and baked potato, and the available vegetables would include creamed spinach and creamed corn, while if the protein is roast turkey, 8 oz, then the starches might be dressing and mashed potatoes, and the vegetables might be creamed corn, Brussels sprouts, and carrots.

Now, the solution that's been presented to me is for the protein file to have a record for every protein, the starch file to have a record for every valid combination of one protein and one starch, and the vegetable file to have a record for every valid combination of one protein and one vegetable.

Something about this seems wrong. Mainly because it would produce so many starch and vegetable records, repeating any given starch or vegetable for every protein with which it's a valid combination.

Yet I'm having trouble coming up with anything better. Any suggestions?

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].