• (cs)

    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.

  • 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

  • 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.

  • justsomedood (unregistered)

    Everybody knows that a 255-byte field will be required to support a middle initial once Unicode v.9 comes around.

  • (cs) in reply to justsomedood
    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.
  • (cs)

    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.

  • (cs)

    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.

  • (cs)

    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

  • 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..)

  • b0b g0ats3 (unregistered) in reply to FredSaw

    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

  • 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?

  • (cs) in reply to NSCoder
    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.
  • j0n (unregistered) in reply to FredSaw

    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?"

  • Roundhill (unregistered)

    Perhaps that database designer ran into someone like my mother, who has two middle names.

  • charon (unregistered)

    Nvarchar must be a typo

  • lurrrve (unregistered) in reply to DOA
    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 :(

  • Erik (unregistered) in reply to Tp
    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.

  • (cs)

    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...

  • (cs)

    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.

  • (cs) in reply to lurrrve
    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.

  • (cs) in reply to charon
    charon:
    *N*varchar must be a typo
    Always a good idea to look before you leap.
  • (cs) in reply to DeLos
    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.
  • (cs) in reply to blah
    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.
  • (cs)

    gang pressed?

  • 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

  • GregP (unregistered) in reply to Tp
    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).

  • Andrew (unregistered) in reply to FredSaw
    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.

  • Tumi (unregistered) in reply to Someone You Know
    Someone You Know:
    Of course, 255 still might be a bit excessive.
    You know, 255 letters for middle initials should be enough for everybody.
  • 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.

  • (cs) in reply to DeLos
    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.

  • (cs) in reply to Tumi
    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.

  • Bhaarat (unregistered) in reply to Alan

    whats more stupid is your sig in the comment you posted.

  • (cs) in reply to Someone You Know
    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?

  • 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?
  • Your Name (unregistered) in reply to justsomedood

    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.

  • (cs) in reply to akatherder
    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.

  • XK (unregistered)

    The Real WTF (tm) is he wanted to use MySQL for it. Yes. MySQL quite easily crashes and corrupts data.

  • bad boss (unregistered)

    MS-Access and old versions of MySQL are unstable.

  • JUST ANOTHER WTF (unregistered) in reply to j0n
    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

  • Jay (unregistered) in reply to bad boss

    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.

  • Joe (unregistered) in reply to KattMan
    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.

  • Jerk (unregistered) in reply to Someone You Know
    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!

  • Khazwossname (unregistered) in reply to Alan
    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)

  • Joe (unregistered) in reply to 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.

  • 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.

  • (cs) in reply to Jay
    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!

  • anonymous (unregistered) in reply to Alan

    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

  • (cs) in reply to Joe
    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.

  • 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.

  • (cs) in reply to akatherder
    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.

Leave a comment on “Those Unstable Databases & An Interesting Database Field”

Log In or post as a guest

Replying to comment #:

« Return to Article