I am in the midst of designing a personal database for keeping track of
wines.  After perusing through several beginner books on MySQL and PHP, I
have decided that my next step would be to embark upon database design.  

My design is almost complete and normalized, although I do expect to be
making many tweakings as my knowledge progresses.

I have come to a brick wall on one facet of my design, however.  I've come
to understand that having a lot of NULLs in your database may be a sign of a
poor design.  And yet I'm having a problem reconciling this with the wildly
un-uniform world of wines from around the world.  For instance, I would like
to have a table called "GrapeVariety," and have the variety_id be a primary
key.  Another table would be "Wine."  And yet, one wine could have one type
of grape or more. 

For instance, let's say that wine XYZ has 80% GrapeA, and 20% GrapeB.  Since
my grape variety would presumably be a foreign key in the Wine table, how
could I specify a certain *percentage* of a foreign key?  I've tried hashing
this out in numerous ways, including the addition of a "Blend" table with
multiple primary keys, but anyway I slice it, there will still be an
abundance of NULLs.  For while the majority of wines may only contain one
grape, there could be wines that have up to 5 or 6 in varying percentages.  

My apologies if this is inappropriately posted to this list (i.e. sorry for
all the "wine"-ing).  Any links or suggestions as to where I may find
answers to database design issues would be greatly appreciated.

bjc-

:::::======  Brian J. Colaluca - Software Engineer
:::::======  DRS Technologies - ESG
===========  [EMAIL PROTECTED]
===========  phone:  (301) 921-8107


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to