I'm designing a new revision of my Java application (using an embedded H2 database) around a redesign of the way I'll be handling my data. Here's how I have it planned:
- Entries table-
- Entry ID
- Entry name
- Properties table-
- Property ID
- Property name
- (Individual property) value table-
- Value ID
- Entry ID
- (Value columns...)
- (Individual entry) value table-
- Property name
- (Individual property) value ID
Each entry can have multiple properties (including multiple properties of the same type). Each property has its own way of storing its values. I need to look up all properties defined for a given entry, and maybe all entries for each given property.
Is this a good way to do it?
Edit: I'm not sure I explained it well...