0

I want to know what is the best way to build my database to deal with this problem :

I need to manage products. Each product has his own variables. For exemple, a table and a chair won't have the same parameters.

I have a lot of categories :

  • Motorcycles : Price year Km Brand Models CYLENDER
  • House : Price Date Rooms m2 etc
  • ...

Does someone have an idea to manage all those variables ?

Thanks :)

1
  • To get a good answer to this question, you will probably need to be more specific about some things. EG, distinguish properties that ALL products have from properties that only SOME products have. Perhaps you have categories of products that all have the same kinds of properties. If you can classify and categorize your data clearly, the database design will follow. Commented Nov 25, 2017 at 19:49

1 Answer 1

3

you can store categories in table like usual and then create another table called category_properties which contains categoryId as foreign key and propertyId which you will create another lookup table named propertyEnum contains any property you need using this technique will create dynamic properties as you much as you need

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.