If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > how to make set of properties?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-28-03, 08:19
Peter0 Peter0 is offline
Registered User
 
Join Date: Aug 2003
Location: Moscow, Russia
Posts: 2
Question how to make set of properties?

Hello all, I hope somebody can help me.

I have a database with products, something like this:

Products table:

product_id
category_id
manufacturer_id
product_name...
.. etc

Categories table:
Category_id
Category_name...
... and the same table for the manufacturer.

But actually each product may have different set of propeties.
I want to make table with properties, something like this:
property_id
property_name
property_unit(mm, kg or something)

The question is how correctly to join product whit its own set of properties, for example
product with product_id = xxx have 3 properties( I take their names by id from properties table), product with product_id = yyy have 13 properties.
I have no idea how to organize this data and what should be the structure of a table where the values of properties for each product are stored.

Thank you.
Reply With Quote
  #2 (permalink)  
Old 09-09-03, 10:42
baccon baccon is offline
Registered User
 
Join Date: Sep 2003
Posts: 12
first of all you'll have to create two tables, the first will be the property table with property_id, property_name, etc. and second you'll have to create a table named product_property that will have to primary keys one will be the product_id and the other property_id and the relation between product ---> product_property has to be 1 to infinite and the relation product_property --> property has to be infinite to 1.

greetings,

baccon
Reply With Quote
  #3 (permalink)  
Old 09-09-03, 15:35
Peter0 Peter0 is offline
Registered User
 
Join Date: Aug 2003
Location: Moscow, Russia
Posts: 2
Thank you, I've also found a CD database example that help me to understand how to design this database.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On