4 ms·
What is a "known keys" table? Is it a table with columns like user_defined_text_1, user_defined_text_2, ..., user_defined_text_10, user_defined_integer_1, user
by ngrilly 10y ago
What is a "known keys" table?
Is it a table with columns like user_defined_text_1, user_defined_text_2, ..., user_defined_text_10, user_defined_integer_1, user_defined_integer_2, ... user_defined_integer_n ?
- inopinatus 10y agoNo, that kind of "extension table" is a well-known antipattern being fragile, unscalable, and denormalized. Just a table with columns for id, keyname & metadata about the key will do.
- ngrilly 10y ago> No, that kind of "extension table" is a well-known antipattern being fragile, unscalable, and denormalized. Ok, I agree. This is the reason why I was asking :-) > Just a table with columns for id, keyname & metadata about the key will do. Isn't this the Entity-Attribute-Value model (which has the well known drawback of requiring a join for each attribute)?
- inopinatus 10y agoNot exactly, I wouldn't be afraid of the data table having both attribute name & value columns. EAV is practically 6NF which would prohibit that. (to be honest that id field was out of habit, the known-keys table should probably be unique and indexed on the key name)
- ngrilly 10y agoI'm sorry, but I'm still unsure what you mean. A "known-keys table" is not a common term in the literature. Can you give an example by describing the tables and their columns?