Comment On Those Unstable Databases & An Interesting Database Field

First, we've got Those Unstable Databases, originally posted by "tbcpp" [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:09 • by dextron
I've seen long middle initial columns before, somewhere in the life of the product they discover that they need a middle name, or names and change to column length. Column names should be considered the same as section headers in legal contracts, there is no guarantee that either actually describe the content.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:10 • by dave (unregistered)
You have to be able to support multi-digit initials; you never know what could happen to the initial standard in the future.3


captcha: damnum

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:17 • by Josh (unregistered)
When I saw "Access Database" I immediately thought of my time at a college radio station, using a similar (or possibly the same) program. The program originally came as a package on two 800MHz Win2k machines. Years later we upgraded to XP and found that we needed a new version of the program, once installed (which was an...eye opening process) we found that the program looked and operated exactly like it's 2k predecessor, complete with crashes and 800x600 resolution. We cut our losses and moved to Rivendell less than a year later.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:18 • by justsomedood (unregistered)
Everybody knows that a 255-byte field will be required to support a middle initial once Unicode v.9 comes around.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:26 • by FredSaw
178027 in reply to 178019
justsomedood:
Everybody knows that a 255-byte field will be required to support a middle initial once Unicode v.9 comes around.
I suggest using a SQL Text field for forward compatibility.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:28 • by NSCoder
I was disappointed that the last WTF was not referring to the image (in fact an ad) at the end, which had some kind of graph and the text, 'think outside of the box' along the bottom and 'A new TOE?' down the side. The idea of getting a new toe really is outside the box and I wondered which problem it was considered to be a solution for, although at the back of my mind I knew it was probably something like Tons of Oil Equivalent (actually, it was Theory Of Everything.) I wish I'd taken a screenshot.

You people with ad-blockers are missing out on so much.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:32 • by Someone You Know
Occasionally one does need more than one character for a middle initial. At my last job, there were two employees who had the same exact first, middle, and last names. Supposing that their names were John Andrew Smith and John Andrew Smith, it was common for official reports to refer to them as John A1 Smith and John A2 Smith. (Fortunately the headaches stopped when John A2 Smith got married and got a hyphenated name.)

Of course, 255 still might be a bit excessive.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:32 • by DOA
Ah, the ole lunatic statement delivered with the absolute certainty that ignorance provides.
I have yet to find a suitable reply to statements like that

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:33 • by Tp (unregistered)
In university, we had this project porting a php/html written patient register to Java. The system stored information about patients and a set of forms for each patient. THe guys who wrote the application had never used a database before and there was 4 tables where the biggest one had about 250 attributes!
We looked through the schema, and laughed pretty good when we found that "age" was defined as varchar(255). (The guys who wrote it was students and wrote it on their spare time, so mocking it is perhaps against the tdwtf-principles, but I think it's still a quite amusing story..)

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:33 • by b0b g0ats3 (unregistered)
178036 in reply to 178027
oh hell. stop screwing around and use a sql server 2008 "filestream" field.

you know, although (I think) filestream is a really terrific idea, i start having seizures when i think about how badly this thing is going to be abused.

By the way: FIST!!!!!!!!!111!!##!#1oneone

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:35 • by blah (unregistered)
I starting my career working for a telecoms systems supplier in their research department. After working late one night the CTO was talking to me about the database we'd started to use, and he said:

"You should be using a flat file system. In all my years working in IT text files are the only thing that have stayed the same".

What can you say to that? Really?

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:35 • by FredSaw
178038 in reply to 178028
NSCoder:
...and the text, 'think outside of the box' along the bottom and 'A new TOE?' down the side. The idea of getting a new toe really is outside the box and I wondered which problem it was considered to be a solution for...
A friend of mine was called from the reserves to active duty and shipped to Iraq for 18 months a couple of years back. As he was preparing to return home, his wife informed him that their daughter had grown another foot during the time he'd been gone.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:36 • by j0n (unregistered)
178039 in reply to 178027
stop screwing around and use the new sql server 2008 "filestream" datatype. attach the middle initial as an eps file. or a png. whatever floats your boat.

although i really think that filestream is cool and potentially very useful, i start having seizures when i think about how abused this thing is going to be.

"Why can't I store a PDF as a filestream document and then search the contents in a SELECT statement?"

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:37 • by Roundhill (unregistered)
Perhaps that database designer ran into someone like my mother, who has two middle names.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:39 • by charon (unregistered)
*N*varchar must be a typo

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:41 • by lurrrve (unregistered)
178045 in reply to 178034
DOA :
Ah, the ole lunatic statement delivered with the absolute certainty that ignorance provides.


When I asked my boss about using source control, he said it was a bad idea because developers sometimes work on the same files and version control doesn't handle that well.

(The preferred method (obviously) is having changes overwritten periodically because you're all editing on the same file on the server...)

And yeah, no good response :(

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:44 • by Erik (unregistered)
178046 in reply to 178035
Tp:
In university, we had this project porting a php/html written patient register to Java. The system stored information about patients and a set of forms for each patient. THe guys who wrote the application had never used a database before and there was 4 tables where the biggest one had about 250 attributes!
We looked through the schema, and laughed pretty good when we found that "age" was defined as varchar(255). (The guys who wrote it was students and wrote it on their spare time, so mocking it is perhaps against the tdwtf-principles, but I think it's still a quite amusing story..)


When a programmer who is not a DBA or even very conversant with databases builds an app that requires one, they usually don't spend a whole lot of time worrying about database design, and they usually won't do anything more complicated than simple SELECT statements to query the data. These people will often set every field in the database as some variant of VARCHAR(255) because they don't really care that much about maximum efficiency on the database side. The only exception is when the programmer aspires to be a DBA (for some unknown reason).

Programmers tend to treat databases as simple data stores from which to obtain data, and then use the language they're programming in to do all the heavy lifting involved in manipulating that data. DBAs, on the other hand, tend to use a lot of stored procedures and whatnot to get the database to do all the heavy lifting. Both groups tend to think their way is superior.


Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:44 • by clevershark
The only WTF about that database field is that it's called "MiddleInitial" when it should be called "MiddleName".

I have to wonder if perhaps Jerry the flat-file guy is related to Gary the frames guy...

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:45 • by DeLos
Flat files are much smarter to use. You can store more data on your drive if you use flat files because they are so thin you can stack them on top of each other.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:47 • by clevershark
178050 in reply to 178045
lurrrve:
When I asked my boss about using source control, he said it was a bad idea because developers sometimes work on the same files and version control doesn't handle that well.


I know that "LOL" is a cliche, but this actually made me laugh out loud. Good thing I'm working from home today.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 10:48 • by FredSaw
178051 in reply to 178043
charon:
*N*varchar must be a typo

Always a good idea to look before you leap.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:05 • by NSCoder
178062 in reply to 178049
DeLos:
Flat files are much smarter to use. You can store more data on your drive if you use flat files because they are so thin you can stack them on top of each other.
And you can merge them all into one file and search them using SSDS.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:13 • by jo42
178067 in reply to 178037
blah:
"You should be using a flat file system. In all my years working in IT text files are the only thing that have stayed the same".

Except, now, we call them XML files.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:14 • by A Nonny Mouse
gang pressed?

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:25 • by Alan (unregistered)
Yup, using a length of 255 for a middle initials field is stupid.

Regards

Alan Q. T. Z. D. I. B. I. W. K. L. S. D. W. Z. Q. R. R. G. O. A. P. Ú. Q. C. Y. S. L. Q. C. F. C. D. R. E. M. W. L. H. X. Í. C. L. Q. C. F. I. W. A. L. S. S. S. S. S. S. É. L. E. E. A. O. D. P. Ú. Q. C. Y. S. L. R. V. M. W. L. D. T. N. Ú. U. R. D. D. A. L. W. C. Brown

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:31 • by GregP (unregistered)
178076 in reply to 178035
Tp:
We looked through the schema, and laughed pretty good when we found that "age" was defined as varchar(255).


I saw something similar from an Indian programmer once, a numeric range was specificed as 1-1000 or so. We got back a varchar(1000).

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:31 • by Andrew (unregistered)
178078 in reply to 178051
FredSaw:
charon:
*N*varchar must be a typo

Always a good idea to look before you leap.


It was a typo to write National Character data type in the first place. It adds nothing to SQL that the default character set and defining a character set per-column doesn't already provide.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 11:57 • by Tumi (unregistered)
178091 in reply to 178033
Someone You Know:

Of course, 255 still might be a bit excessive.

You know, 255 letters for middle initials should be enough for everybody.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 12:01 • by morry (unregistered)
My ultra thin hard drives is so thin.
"how thin is it?"
My ultra thin hard drives is so thin it only supports flat files.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 12:19 • by mrprogguy
178098 in reply to 178049
DeLos:
Flat files are much smarter to use. You can store more data on your drive if you use flat files because they are so thin you can stack them on top of each other.


They also go across the intarweb more smoothly, because so many more of them can fit into the tube.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 12:31 • by Someone You Know
178101 in reply to 178091
Tumi:
Someone You Know:

Of course, 255 still might be a bit excessive.

You know, 255 letters for middle initials should be enough for everybody.


Fair enough. Realistically, though, I suspect that if our naming conventions ever change to the point where it's even slightly common for people to have more than 255 separate names, or there are over 255 people with the same exact name working in the same place, we will have to overhaul the way we represent and store names anyway.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 12:44 • by Bhaarat (unregistered)
178105 in reply to 178072
whats more stupid is your sig in the comment you posted.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 12:52 • by akatherder
178110 in reply to 178033
Someone You Know:
Occasionally one does need more than one character for a middle initial. At my last job, there were two employees who had the same exact first, middle, and last names. Supposing that their names were John Andrew Smith and John Andrew Smith, it was common for official reports to refer to them as John A1 Smith and John A2 Smith. (Fortunately the headaches stopped when John A2 Smith got married and got a hyphenated name.)


Are you posing that as a WTF or are you seriously posing that as an acceptable way to solve the problem of two people having the same name?

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:05 • by ca (unregistered)

Jerry: "Yeah, and you know how often those systems crash?"

-- silence --

How do you answer that? Needless to say, I kindof stopped asking for his advice on things.

Er... never?

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:14 • by Your Name (unregistered)
178114 in reply to 178019
I already wrote this (this WTF must be from the side bar)... but this will be the first field against the wall when UTF-2048 comes.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:23 • by KattMan
178115 in reply to 178110
akatherder:
Someone You Know:
Occasionally one does need more than one character for a middle initial. At my last job, there were two employees who had the same exact first, middle, and last names. Supposing that their names were John Andrew Smith and John Andrew Smith, it was common for official reports to refer to them as John A1 Smith and John A2 Smith. (Fortunately the headaches stopped when John A2 Smith got married and got a hyphenated name.)


Are you posing that as a WTF or are you seriously posing that as an acceptable way to solve the problem of two people having the same name?


Well it is so much better than the way a lot of health insurance companies deal with twins. Either one claim is always denied because they feel you are double claiming, or one child is "born" a month later.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:23 • by XK (unregistered)
The Real WTF (tm) is he wanted to use MySQL for it.
Yes. MySQL quite easily crashes and corrupts data.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:28 • by bad boss (unregistered)
MS-Access and old versions of MySQL are unstable.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:31 • by JUST ANOTHER WTF (unregistered)
178119 in reply to 178039
j0n:
stop screwing around and use the new sql server 2008 "filestream" datatype. attach the middle initial as an eps file. or a png. whatever floats your boat.

although i really think that filestream is cool and potentially very useful, i start having seizures when i think about how abused this thing is going to be.

"Why can't I store a PDF as a filestream document and then search the contents in a SELECT statement?"


Don't laugh too hard... how is any different from including XML parsers to pick values out of the xml stored in giant VarChars. And that is the lastest feature in just about every 'serious' Database out there

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:44 • by Jay (unregistered)
178122 in reply to 178118
I once worked on a database that had a field called "sex". I naively assumed it would be a single character, M or F. When my program failed, I checked again and found that it was two-digit numeric. I briefly wondered if it was not "which" but "how often" or "how good". I eventually discovered that it was really more like "title code". It had started out as 1 for Mr, 2 for Miss, and 3 for Mrs, but over time they gradually added in Doctor, Lieutenant Colonel, Baron (we had European customers), etc, and had to expand it from one digit to two.

My point being, there are probably many fields in systems today whose name accurately describes what they ORIGINALLY contained, but which have been enhanced or junked up (depending on the circumstances and/or your viewpoint) over the years.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:53 • by Joe (unregistered)
178124 in reply to 178115
KattMan:
akatherder:
Someone You Know:
Occasionally one does need more than one character for a middle initial. At my last job, there were two employees who had the same exact first, middle, and last names. Supposing that their names were John Andrew Smith and John Andrew Smith, it was common for official reports to refer to them as John A1 Smith and John A2 Smith. (Fortunately the headaches stopped when John A2 Smith got married and got a hyphenated name.)


Are you posing that as a WTF or are you seriously posing that as an acceptable way to solve the problem of two people having the same name?


Well it is so much better than the way a lot of health insurance companies deal with twins. Either one claim is always denied because they feel you are double claiming, or one child is "born" a month later.


This may seem strange, but that actually happens. Two twins will be born at once and the insurance company will give them different birthdays for the exact reason stated. It's a workaround for the many old legacy mainframe systems that serve as the underpinning of their financial systems.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:55 • by Jerk (unregistered)
178125 in reply to 178033
Someone You Know:
(Fortunately the headaches stopped when John A2 Smith got married and got a hyphenated name.)


TRWTF is that the man got married and changed his name. WTF, grow some balls and keep your name!

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 13:55 • by Khazwossname (unregistered)
178126 in reply to 178072
Alan:

Regards

Alan Q. T. Z. D. I. B. I. W. K. L. S. D. W. Z. Q. R. R. G. O. A. P. Ú. Q. C. Y. S. L. Q. C. F. C. D. R. E. M. W. L. H. X. Í. C. L. Q. C. F. I. W. A. L. S. S. S. S. S. S. É. L. E. E. A. O. D. P. Ú. Q. C. Y. S. L. R. V. M. W. L. D. T. N. Ú. U. R. D. D. A. L. W. C. Brown

(Silly party)

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:00 • by Joe (unregistered)
178127 in reply to 178124
Joe:
This may seem strange, but that actually happens. Two twins will be born at once and the insurance company will give them different birthdays for the exact reason stated. It's a workaround for the many old legacy mainframe systems that serve as the underpinning of their financial systems.


Of course, the proper way to do this is to use the members' ID numbers for all identifications. The ID numbers used to be SSNs, but after HIPAA they're still 9 digits and unique, but no longer SSNs. They're sometimes referred to as certification numbers.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:02 • by j (unregistered)
not a complete WTF. big commercial DB's like oracle do crash and get corrupted often, and recovery can be a pain. (as a developer who works with banks, DB corruption and recovery is a major issue.) but of course they are necessary in those situations. however, flat-file based DB's like HSQLDB are just fine for small databases, and sometimes preferable since the recovery process can be much easier, especially for a small company with no DB admin. so...he had a point. just sayin.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:04 • by DeLos
178130 in reply to 178122
Jay:
I once worked on a database that had a field called "sex". I naively assumed it would be a single character, M or F. When my program failed, I checked again and found that it was two-digit numeric. I briefly wondered if it was not "which" but "how often" or "how good". I eventually discovered that it was really more like "title code". It had started out as 1 for Mr, 2 for Miss, and 3 for Mrs, but over time they gradually added in Doctor, Lieutenant Colonel, Baron (we had European customers), etc, and had to expand it from one digit to two.

My point being, there are probably many fields in systems today whose name accurately describes what they ORIGINALLY contained, but which have been enhanced or junked up (depending on the circumstances and/or your viewpoint) over the years.

So if they had maintained the column but now allowed full middle names this would actually make sense.

Way to suck the fun out of this!

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:07 • by anonymous (unregistered)
178131 in reply to 178072
Thoroughly agreed.

Yours,

Johann Gambolputty de von Ausfern- schplenden- schlitter- crasscrenbon- fried- digger- dingle- dangle- dongle- dungle- burstein- von- knacker- thrasher- apple- banger- horowitz- ticolensic- grander- knotty- spelltinkle- grandlich- grumblemeyer- spelterwasser- kurstlich- himbleeisen- bahnwagen- gutenabend- bitte- ein- nürnburger- bratwustle- gerspurten- mitz- weimache- luber- hundsfut- gumberaber- shönedanker- kalbsfleisch- mittler- aucher von Hautkopft of Ulm

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:18 • by KattMan
178135 in reply to 178127
Joe:
Joe:
This may seem strange, but that actually happens. Two twins will be born at once and the insurance company will give them different birthdays for the exact reason stated. It's a workaround for the many old legacy mainframe systems that serve as the underpinning of their financial systems.


Of course, the proper way to do this is to use the members' ID numbers for all identifications. The ID numbers used to be SSNs, but after HIPAA they're still 9 digits and unique, but no longer SSNs. They're sometimes referred to as certification numbers.


Yes you would think so. The problem is that in some systems this number is generated from the birth date. The day is not included in this so you have a policy number portion, policy version, month of birth, year of birth. Those get smashed together into an individuals plan member number. Since names don't come into play here, now think about what happens when you have twins. This is why they are "born" a month apart, it takes that much of a difference to get a different number.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:22 • by bb (unregistered)
I really should introduce this guy to an ex co-worker who created a database and table to store one single row of configuration parameters for an application he was tasked to develop. This added a $3,000 requirement (SQL Server) to an application that otherwise needed none. A poor copy of cron, or windows scheduled tasks since it ran on windows.

Sometime a text file is better. It's just a matter a chosing the right nail for you hammer.

Re: Those Unstable Databases & An Interesting Database Field

2008-02-20 14:27 • by Someone You Know
178137 in reply to 178110
akatherder:
Someone You Know:
Occasionally one does need more than one character for a middle initial. At my last job, there were two employees who had the same exact first, middle, and last names. Supposing that their names were John Andrew Smith and John Andrew Smith, it was common for official reports to refer to them as John A1 Smith and John A2 Smith. (Fortunately the headaches stopped when John A2 Smith got married and got a hyphenated name.)


Are you posing that as a WTF or are you seriously posing that as an acceptable way to solve the problem of two people having the same name?


That depends on which problem you're referring to. In this case, the name was not being used as a database key or anything; the system was perfectly capable of treating two people with the same name as different entities. If I recall correctly, a unique employee ID number was used for this purpose.

The problem only arose when schedules and other human-readable reports needed to be generated. These guys needed to know which one of them was supposed to work which shift, and so did other people, like the supervisors assigned to those shifts. It was decided that a number would be appended to the middle initials; the guy with more seniority got #1. This organization had a staff of around 250, so the odds that this sort of issue would occur often enough to merit spending more effort on it were judged to be acceptably low.

If you don't consider this an acceptable solution to this problem, please suggest something better.
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment