I am creating a CMS (yes, yes, I know, but I like it, okay? :-)), which has "records". These records have a fixed number of standard fields that can be written in db-id, header, date, etc. All standard materials.
However, I also want the records to have X number of user fields associated with them. These custom fields will be user-defined and may have names, descriptions, formatting, maximum length, and other attributes. Now, obviously, I can easily store the definitions of these fields in the db table, but what is the best way to store and map data for each record that matches these custom fields?
ExpressionEngine does basically the same thing, and uses a table of records to which columns for each custom field are dynamically added. But I canβt believe that this is the best way to solve this problem.
Are there any more efficient ways to structure relational db to solve this flexible data model?
source share