> If all you want is a comma seperated list of the categories
> for each item. Why not just add a "categories" field to the
> item table? Store the comma seperated list there.

Because that would be denormalization of the data, which in a transaction
processing system is VERY VERY BAD. That's why we spend all sorts of money
on SQL Server, Oracle, and so on - so that we can store and manage
normalized data.

To illustrate some of the problems caused by denormalization, let's say that
you do store a comma-delimited list in a field. What if I want to find all
of the items within a specific category? I'd have to retrieve EVERY RECORD
from the item table, and iterate through the list. Alternatively, what if I
delete a category. Again, I'd have to retrieve every item, iterate through
each list, delete any entries for that category, then save that item.

Instead, if you have a one-to-many relationship, or a many-to-many
relationship, you should store each entity in its own proper table, and use
referential integrity to manage relationships between the tables.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to