Page 1 of 1

Database design question

Posted: Tue Nov 10, 2009 5:54 am
by fried
I'm modifying an existing database for use with a t-shirt ecommerce shop. The database I started with has a very simple structure, Product_id, description, image, stock. I need to add attributes to the T-shirts ( I thought using the T-shirt style (short-sleeve/ long-sleeve/polo etc) was best as the products). I need shirt_colour, size, logo, logo_colour combinations for all products. Is this too much info for an attributes table? I want to get a balance between useabilty and complexity.

Any suggestions gratefully recieved.

Re: Database design question

Posted: Tue Nov 10, 2009 6:00 am
by urooj786
u will have to design db according to the basic design db anamolies..like to which u give primary key
..etc, for t-shirt make tshrt_type feild and rest u will do easily

Re: Database design question

Posted: Tue Nov 10, 2009 1:27 pm
by califdon
fried wrote:I'm modifying an existing database for use with a t-shirt ecommerce shop. The database I started with has a very simple structure, Product_id, description, image, stock. I need to add attributes to the T-shirts ( I thought using the T-shirt style (short-sleeve/ long-sleeve/polo etc) was best as the products). I need shirt_colour, size, logo, logo_colour combinations for all products. Is this too much info for an attributes table? I want to get a balance between useabilty and complexity.

Any suggestions gratefully recieved.
There are no limits on attributes (fields). The answer is always: Whatever it takes to adequately describe the entity. I've worked on databases with literally hundreds of attributes for a complex, technical entity. The important issues include the requirement that every attribute must depend on the primary key. So if your customer needs to select a shirt by colour, size, logo and logo colour, and in each case a particular stock of shirts can be described by these attributes, then you need to include them in the table.