I'm struggling with a database architecture decision for a Rails app.
We have lots of different organizations and each organization has marketing assets they can sell. Examples of these marketing assets include:
- Banners
- Jerseys
- Web banners
- Email blasts
Each of theses assets have different properties. A banner has height, width, placement location attributes. A jersey has logo type, placement location, and logo type attributes.
What would be the best way to implement this? I've considered:
- Attributes on the organization model - This is messy, hard to maintain and seems to violate the single responsibility principle
- Polymorphic association - The specifics of each asset make me think that this isn't the right implementation either
- Single Table Inheritance - I'm leaning towards this. I'd implement a base class called assets that has common asset attributes and tables like "Banners" that inherit from the base class. However, seems really hard to maintain and messy.
Anyone have thoughts here? I'm looking for something that is easily maintainable, scalable, and adheres to standard architecture practices.