Hello all.
I'm new in rails, and I've having some troubles about deisgning my database and rails models. I need to store different types of places(entertainments, hotels, sights) in database. This are different types if one entity, and they have different sets of attributes. So my question is what is a proper way to design: EAV-attributes or flat tables for each one entity.
This how I see each one: EAV-attributes - needs 3 more tables: place_type, type_attributes, attributes_values which will store attirbutes inside and join in to model dynamicaly. The pros of this method is that I can easily add/ remove attributes. Also I can easily filter places just by type, but having pain joining attributes for each entity
Flat tables - needs extra tables for each one type. It's the easiest way to store different types but needs a lot of relations tables because of my model. I also store user-place relations so I need different tables for each relation. Also I have translations which also complicates relations.