EB> My thought was to add a new field to the listings table that would
EB> contain a comma-separated list of CategoryIDs, but something doesn't
EB> feel right about this solution.

> This would break the first normalization form and is extremely bad

Okay - I thought something was off...

> First of all ask your customer - what is the relation between listings
> and categories - is it one-to-many or many-to-one or many-to-many
relation

The current relationship is one to one - each listing can only have one
category.  

The customer is requesting a change to this, so that each listing can
have many categories.

> if it is one-to-many (many-to-one) then you should add a field to
> details table that constitutes a primary key in the main table and
> define a foreign key. That means having either CategoryID in listings 
> table or ListingID in categories table.

My current table definition for the listings already has the foreign key
of CategoryID.

What you are saying is that the categories table should have a field for
ListingID?

Thanks!

-Erich-







-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to