@Kicken... If I was to set it up your way and the count the columns and rows created for the setup based on your template:
Database Design A:
Table products - ProductID : - Name: Shirt Table colors - ColorID: - Name: Table product_colors - ProductID" - ColorID
the numbers of tables and rows I would get based on 1,000 colors for a t-shirt would be:
Number of Tables = 3
Number of Columns = 6
Number of Rows = 2,002 -----> 2 ( from table products), 1,000 (from table colors), and 1,000 (from table product colors)
if I was to setup a table with three columns and just store all the colors together in a long string for the column colors (and explode it into a list when needed).... the amount of rows and columns I would get is:
Database Design B:
Table shirt_colors
Product ID:
Name:
Colors:
Number Of Tables = 1
Number Of Columns = 3
Number Of Rows = 3
Can you explain to me how Database Design Option A is more optimal (overhead and perfomance wise) than setting the colors into one long string value and then exploding it (besides the fact that it's easier to read and maintain)?
Database Design Option A: would result in 3 tables, 6 columns, and 2020 rows being created.
Database Design Option B : would result in 1 tables, 3 columns, and 3 rows being created.
I'm having a hard time understanding how Databased Design Option A would be the more optimal choice from an overhead and performance perspective. I do realize that a column with a value of over 1,000 words can be very long, but I'm thinking it has no problem pulling up long strings since mysql is a very popular among article and forum sites.
Thanks in advance