02-11-04, 00:43 #1Registered User
- Join Date
- Feb 2004
Products table with many different characteristics
I have a few questions about the design of a products database. Basically, we are creating a database that will store listings of products, similar to the way eBay stores their auctions. I am not trying to duplicate their database design…I would just like to know how the tables could be set up to do this.
EBay allows a user to select a category for the product…then, depending on the category the user selected…they can enter specific data that is related to the particular category they chose.
Example 1: A user selects the Real Estate category. Then, the user is able to provide a predetermined set of characteristics about their real estate: square footage, type of real estate, number of bedrooms, etc.
Example 2: A user selects the Automobile category. Then, the user is able to provide a predetermined set of characteristics about the automobile: transmission, interior color, exterior color, make, model, etc.
They do this for a number of their categories.
I am wondering if anyone has any input on how they store this data. I am sure they use a table to store general information about the product. Then, I am sure that they store the category related data in other tables.
If anyone could help me understand how this works, as far as table relationships, I would be extremely grateful. If possible, an example would be great!!
Thank you very much.
02-11-04, 09:22 #2Registered User
- Join Date
- Sep 2003
- The extremely Royal borough of Kensington, London
I would recommend,
Products (Product_id, name, cat_id)
Categories (cat_id, title, description)
etc.Bessie Braddock: Winston, you are drunk!
Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.