Suppose I want to map a set of input values to database table fields E.g.
employeeFirstName --> emp.fName employeeLastName --> emp.lName ... --> ...
In theory I can create a lookup table like this:
create table lkp( input_field varchar(50), table_name varchar(50), column_name varchar(50), constraint table_name_fk foreign key (table_name, column_name) references information_schema.tables (table_name, column_name));
However, view columns can not be used as foreign key references.
Are there any other techniques for enforcing this relationship?
The RDBMS I'm using is SQL Server.