|
Posted by Sonnich on 02/15/07 12:47
On Feb 15, 2:19 pm, Daniele <"dmassaiu{["@]}yahoo.co.uk> wrote:
> Hi
> I want to build a shop from scratch,
> i'm laying down all the possible problem i can find during the way.
> how can i structure the database to be able to add unlimited properties
> or attribute to different kind of product ?
> like if i sell a t-shirt i will hate to chose size and colour
> if i sell a plate probable the model and the colour
> i'm looking into other open source shop like oscommerce and the
> structure of the database is really to big for my knowledge so i cant
> really understand it.
> i now that i neet to divide all in table as much i can but how?
How about:
table product: id, name
table properties: product_id, property_name, property_value - maybe
even type/type_id?
table property_type: id, name
You can add endless rows/properties for a product. The type might help
to check propery values. Just remember to store everything as
strings...
Order, if you like to show properties is a specific order.
BR
S
Navigation:
[Reply to this message]
|