So, at a previous employer I was taught about reference tables. The way I understood it, was basically a DB can search ints faster than chars/varchars so you give textual data (char/varchar) unique values and a table which references it. Ex)
Table Flags
Flag ReferenceCode
1 1123
Table ReferenceCode
ReferenceCode Name Description
1123 TurnOnFeature Set the flag to 1 to turn on the feature
So, basically you can do all of your checks, joins, etc. on numbers instead of text. Then, if you ever actually need the text, you can reference it with the code.
Anywho, it seems like a pretty descent idea and it worked for the company, but is there not some DBMS that can automate this? I mean, the team I worked with had to managed 1000s of reference codes and if you ever had duplicates it really f'd things up. Since, in reality, the reference code is an arbitrary number, you would think this could be automated & managed, no?
Will someone tell me if I've totally gone awry or if this makes sense to you too...
Table Flags
Flag ReferenceCode
1 1123
Table ReferenceCode
ReferenceCode Name Description
1123 TurnOnFeature Set the flag to 1 to turn on the feature
So, basically you can do all of your checks, joins, etc. on numbers instead of text. Then, if you ever actually need the text, you can reference it with the code.
Anywho, it seems like a pretty descent idea and it worked for the company, but is there not some DBMS that can automate this? I mean, the team I worked with had to managed 1000s of reference codes and if you ever had duplicates it really f'd things up. Since, in reality, the reference code is an arbitrary number, you would think this could be automated & managed, no?
Will someone tell me if I've totally gone awry or if this makes sense to you too...
