I'm looking to do a project that will involve the user being able to add and remove fields on the fly.
One of my ideas involved having just basic entity table (for example: Contact), a Fields table (with the field name, datatype, etc...), and a link table that essentially has a link to the entity, a link the field, and a column with the actual data in it.
Can anybody offer any advice on doing this sort of thing? Stuff like, am I doing it wrong, am I nuts, etc.
I'm particularly interesting in the datatype of the actual column that is going to store the data, what should it be? Obviously a lot of conversions and checking is going to happen in code, but that's not really a topic for the dbms forum, is it? If anybody can offer any guidance on this then that would be greatly appreciated.
One of my ideas involved having just basic entity table (for example: Contact), a Fields table (with the field name, datatype, etc...), and a link table that essentially has a link to the entity, a link the field, and a column with the actual data in it.
Can anybody offer any advice on doing this sort of thing? Stuff like, am I doing it wrong, am I nuts, etc.
I'm particularly interesting in the datatype of the actual column that is going to store the data, what should it be? Obviously a lot of conversions and checking is going to happen in code, but that's not really a topic for the dbms forum, is it? If anybody can offer any guidance on this then that would be greatly appreciated.