Amir Hardon wrote:
For example what will be better, storing all items information in one table with one column for category, or having a separate items table for each category.It's a good example where a premature optimization may become the root of all evil. a category on most cases is a _property_ of an item(column), it does not define it's class(table name).
My guess is that separate tables will be faster for use but will consume more disk space.
Besides being hard to manage(adding a new category is going to be pretty rough), in some cases it might actually be slower. think about setting a query for getting how many items you have in each category. usally that is something like:
SELECT COUNT(id),category FROM items GROUP BY category
Perhaps with a join if category refers to an identifer in another table, and if you have an index on category it should be quite efficent. what happends if you want the same thing when each category is in seperate table? you have to call N queries, which is likely to be less efficent.
Think about other cases, say, when refering to an item identifier from another table etc..
================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
