ad hoc users should use views then - shouldn't they.
The problems - one table, no correct datatypes - you'd use a string, of a fixed size - regardless - for all lookups.
You would not have referential integrity - because the primary key of your lookup table would be (code, fieldname,tablename) and I doubt you would put code,fieldname,tablename in your fact tables would you. so data integrity = NOT THERE (please don't tell me the application will do it, the application cannot do it without locking tables and tell me the last time you saw a program with the lock table command in it....)
You would negatively affect the optimizer, especially if some table/fields had LOTS of entries and others did not.
And you know, you'd end up having to join to this single table over and over. Let us go back to the original "argument"
...
One person argues that since one table have so many codes and requires 10-20
lookup tables, ad hoc users find it very difficult to work with.
.......
Let's see, they would have to
select a.description, b.description, c.description, t.*
from T, lookup A, lookup B, lookup C
where t.field1 = a.code and a.fieldname = 'FIELD1' and a.tablename = 'T'
and t.field2 = b.code and b.fieldname = 'FIELD2' and b.tablename = 'T'
and t.field3 = c.code and c.fieldname = 'FIELD2' and c.tablename = 'T'
and for some reason they believe that is EASIER, more understandable, better for these poor ad-hoc users than:
select a.description, b.description, c.description, t.*
from t, field1_lookup a, field2_lookup b, field3_lookup c
where t.field1 = a.code
and t.field2 = b.code
and t.field3 = c.code;
I'm not so sure I agree it would be easier - the end user would still have to know
a) fieldname (duh)
b) tablename (duh duh - they are quering the table!)
and heck, they'd even have METADATA (eg: the data dictionary) to tell them WHAT TO DO - so their little ad-hoc query tools would probably actually form the JOIN (if you use separate tables) whereas if you use a single table, these tools would form BAD JOINS if ANY
Meaning: I see no advatanges, I see only glaring disadvantages - and the perceived advantage stated by this person is actually a huge disadvantage.