I am trying to design a schema where the columns of a table are not fixed. Ex: I have an Employee table where the columns of the table are not fixed and vary (attributes of
I recommend using a combination of numbers two and three. Where possible, model tables for standard associations like addresses. This is the most ideal approach...
But for constantly changing values that can't be summarized into logical groupings like that, use two tables in addition to the EMPLOYEES table:
employee_attribute_type_code and DESCRIPTION)In EMPLOYEE_ATTRIBUTES, set the primary key to be made of:
This will stop duplicate attributes to the same employee.