Skip to main content
Ask A Question
You’re not receiving notifications from this thread.

Storing Product Properties

General • Asked by Michael Victor

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!

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.