Hi All

I am a bit new to relational DB design and seek your opinion on the following:

I am working on an application in which I want to build models which are definable by a user. A model will consist of a number of parameters.

I want to create a table (let's call it parm_table) which has a record for each for each parameter; parm_table will contain columns like: parameter_name; parameter_type; min_value; max_value; default_value; display_format; and possibly more.

Each parameter will be assigned values over time. I want to store these values in another table (value_table) which has a one to many relationship with the parm_table (a parameter can have many values; a value belongs to one parameter).

I don't know how to do this most efficiently. Because a parameter has a type which could be various number formats or a string, the value table would have to hold values of different types. I guess one could save all values as an Ascii string and convert back and forth whenever used, but that does not seem very easy to me. I might also have more value tables, one for each type, but then the code needs to access different tables depending on the type. Not sure that's easy either.

Do you have any ideas or best practices for this?

Thanks for any advice you can provide!