okay here's your answer.
have more than just 2 tables.
combine what fields are identical into one table.
Code:
MASTER PRODUCT TABLE
---------------------
NAME
DESCRIPTION
:
:
:
CATEGORY_ID
under category_ID i would enter a category that would identify the product as a: CD, BOOK, SHOES, MASCARA, ETC.
have another table CATEGORY TABLE that describes these categories
Code:
CATEGORY TABLE
---------------
CATEGORY NAME
CATEGORY ID
then have a category description table
Code:
CD CATEGORY DESCRIPTION
--------------------
CATEGORY_ID
PRODUCT_ID
CD TRACKS
:
:
BOOK CATEGORY DESCRIPTION
--------------------
CATEGORY_ID
PRODUCT_ID
ISBN
TITLE
:
:
:
the reason you would do this is that if you just wanted to display the basics of a product you only have to query 1 table. when the person wants to get more details then you can involve the category tables and pull more info.
this would accomplish a faster query when displaying multiple products in that there isn't a bunch of white space or redundant stuff.
if you really want to get fancy under the category description table you can have a CROSS-SELL PRODUCT ID which would recommend a buyer a complementary product with their purchase.
if you ever wanted to sell hot dog buns this would recommend a set of hot dogs to the client while shopping. or milk when purchasing eggs...
man i'm hungry!
hope this helps.
dlg
Bookmarks