Hello.
I have inherited a database with some very questionable design techniques. The one that is particularly troubling is the use of a composite code to track the status of a person in the database.
Scenario:
We run a member-based place. Each member has a status code and that code tells quite a bit about each member. The code is 6 digits long and can be a combo of letters and numbers.
A brief explanation of some of the code definitions in use is:
First place digit: Member Status – Values: 1, 3, 4, 7
Second place digit: Publication Status – Values: S, A, K, B
…and so on...
So you can have a code like: 1SX02E with each place meaning something different. Now I know this is stupid design, but I am having a hard time explaining it to my co-workers. I tried to tell them that, but I am having a hard time explaining why it’s stupid, or what a good alternative is.
Right now, our queries look like this: SELECT … WHERE .. LIKE ‘???4??’ (< Access 97 language) and they have been able to extrapolate whatever info they needed by doing a bunch of stuff like that, but it is a real pain in the butt to make these crazy queries and stuff...
I am thinking that since the code only has so many possible combinations that we can write out a list of numbers with a unique number representing each possible code combination.. Like this:
Status: 1SX02E = Numeric Value 1200
Status: 1SX02F = Numeric Value 1201
…and so on…
I’m very confused as to where to take this. I am also thinking about taking the composite code that we have now and making a database column for each digit..
HELP!!
Please post if you need more info.. Basically.. I am just looking for an angle of attack and not a real detailed solution.. Thanks as always!
-Chris-
I have inherited a database with some very questionable design techniques. The one that is particularly troubling is the use of a composite code to track the status of a person in the database.
Scenario:
We run a member-based place. Each member has a status code and that code tells quite a bit about each member. The code is 6 digits long and can be a combo of letters and numbers.
A brief explanation of some of the code definitions in use is:
First place digit: Member Status – Values: 1, 3, 4, 7
Second place digit: Publication Status – Values: S, A, K, B
…and so on...
So you can have a code like: 1SX02E with each place meaning something different. Now I know this is stupid design, but I am having a hard time explaining it to my co-workers. I tried to tell them that, but I am having a hard time explaining why it’s stupid, or what a good alternative is.
Right now, our queries look like this: SELECT … WHERE .. LIKE ‘???4??’ (< Access 97 language) and they have been able to extrapolate whatever info they needed by doing a bunch of stuff like that, but it is a real pain in the butt to make these crazy queries and stuff...
I am thinking that since the code only has so many possible combinations that we can write out a list of numbers with a unique number representing each possible code combination.. Like this:
Status: 1SX02E = Numeric Value 1200
Status: 1SX02F = Numeric Value 1201
…and so on…
I’m very confused as to where to take this. I am also thinking about taking the composite code that we have now and making a database column for each digit..
HELP!!
Please post if you need more info.. Basically.. I am just looking for an angle of attack and not a real detailed solution.. Thanks as always!
-Chris-