Ask A Question

Notifications

You’re not receiving notifications from this thread.

Storing Product Properties

Michael Victor asked in General

I'm creating a jewellery product catalogue application and I need to store properties for each product such as material, finishes, product type etc.

I've concluded that there needs to be a model for each property, mainly because things like material and finishes might have prices and weights and other things associated with them.

Which of the two options will be the most efficient way to store data and be scalable

Create a model PropertyMap that will map property types and IDs to a Product ID.
Create several other models such as ProductMaterial, ProductFinish etc that will made a property to a product
All the data needs to be searchable & filterable. The database will probably index around 10K products.

Open to other smarter ways to store this data as well!

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.