- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Human names are not identified. You can get two humans with name John. So this why you have national identifiers (or SSN in USA).
Admin
Only the necessary number of characters is stored with a varchar. That number (255) can be anything, and it will still only use the minimum number of bytes necessary to store the data.
This is not a wtf by any means.
Admin
What WTF? All I read was a lame ad for something called Rivendell
Admin
(BTW, as has been discussed on this site many times, SSNs and other national IDs are also a poor key, for a number of reasons.)
Admin
My company's ERP, while running on SQL Server, has a database schema with lots of holdovers from its days on IBM mainframes. Thus, field names are all 6 characters or less. All the fields in a table share a common 2-letter prefix; for example, the Address Book table has fields that all start with "AB". The remaining 4 characters identify the field in a cryptic manner that reminds me of old 8.3 DOS filenames.
Going back to the Address Book example, it stores the name of the last user to modify the record. That field? "ABUSER". So all of our customers, employees, suppliers, and all the other entities we have an address for have an ABUSER.
Admin
Depersonalizing? A Unique ID is the most personal thing possible! John Smith would have one and John Smith 2 would have a different one, while the name 'John Smith' itself could refer to either of them. I'd be happy to have a name unique in the whole world!
Yours truly,
['{6BE6761D-F5DE-4C49-BCEF-B6B0E9B2A798}']
Admin
Admin
At a bare minimum, appending the number to their first or last name would be preferable to breaking the datatype and ignoring all reasonable assumptions about a field named "MiddleInitial".
That's like having a field named StateAbbreviation and making it 3 characters.
AL = Alabama AL2 = Alaska //bypassing AK workaround
Admin
The best way to store someone's name in a database is not as 'first name', 'middle initial', 'last name' but rather as 'formal name', 'informal name'. It's the only way you can capture the complexity of reality in a sane way. (And no, 1NFers, you're not duplicating data.)
Admin
I do have two middle initials. Like for real.
Admin
Any parent who has twins and gives them the exact same name should be taken out the back and shot :P
Admin
How about an 'Nickname' or 'Alias' field?
Admin
Dunno about your part of the world, but banks around here are often offline due to "computer problems" -- the database servers crash often enough that the banks have instituted training days where they act as if the system is down (for normal transactions), even when it isn't. They don't announce these events, and they don't post notices of server crashes to the website, and they're not going to admit that they have corrupted data unless they absolutely have to.
The real WTF is the idea that someone would use a bank's policies as a guide to software best practices. Banks externalize almost all of their costs; they have no incentive (anymore) to do anything right, as they get your money regardless.
Databases are fine, if you take them offline before backing them up, back them up regularly, restore them routinely to verify that the backup actually is working, and keep a DBA on hand for when the inevitable emergency arises. Flat files may not be appropriate, but databases aren't an automatic win, except for DBAs.
Admin
I think it’s “press-ganged”. I don’t want to imagine what gang pressing is.
Admin
Admin
Didn't we just go over the whole "making ridiculous claims with undue confidence" thing?
Any database that actually does such a thing should not be used by anyone, ever.
Admin
The "beige box" part can be fixed with paint, stickers, or, in a pinch, duct tape.
Admin
Kudos to anyone who expands all of those letters into names and comes up with the most outrageous name ever.
Admin
Given the number of times I've gone into the bank and either had to have my transaction handled in some manual mode or not been able to complete a transaction at all because "the computer is down again", I'm somewhat inclined to side with "Jerry" on the database issue.
I'll take my tongue out of my cheek now.
Admin
That's what I love about this site. You find out who the TRUE WTF idiots are.
Admin
(Assuming this is anything close to a sensible way to store names at all, which it isn't.)
Admin
Cultural imprecision again (sigh) The middle initial: One for an odd number of names, two for an even number of names.
Admin
Is anyone else having problems trying to get through to the banks IT department?! I keep telling them that I have discovered from a well-informed source that they should not be storing my data in a database, but a flat file, and I keep getting disconnected?
Admin
As a side challenge, guess what my actual middle initial is.
Admin
Admin
He's right you know, version control is lousy with that... when hit by a meteorite, or a nuclear bomb explodes nearby. What happens if debris from that satellite the Americans shot down lands on your server and different developers are working on the same file, huh?
Admin
In some countries (such as Portugal and Spain) one can have multiple family names as well (and the number indicates one's social status).
Admin
There are people who have more than one middle name, like me. Ruben F. C.. Still That's not 255 characters but on US websites I can never fill in my two middle initials because apparently that phenomenon doesn't exist there.
Admin
Admin
Not in this case. For legal reasons, the first and last names had to remain identical to the employee's legal name, while the middle initial did not. If John Smith goes to the bank with a paycheck made out to John Smith2, the bank might let him deposit it, but technically they shouldn't.
Admin
Our penises are long enough as it is, but thank you for your concern!
Admin
Are you by any chance Alan Horatio Quintessence Brown?
Admin
captcha: WHO GIVES A FUCK WHAT YOUR CAPTCHA WAS
Admin
Our production schema has a unique constraint on the Initials field in the User table.
Admin
Admin
The problem isn't the names, names don't matter in most insurance applications. Everyone is referred to by number, and in some cases this number is generated by policy number + birthmonth + birthyear. Take a close look at that and you will see why twins are a problem.
One other thing to note is that this problem also raises it's head if the two adults are nearly the same exact age, born on the same month in the same year.
Admin
I'll admit when I am wrong and after reading these comments I had to go back and check for myself. I find that I am only half right. What I described for a varchar is a fringe case. Normally a varchar is a pointer outside the normal record in the table, this maintains the static record length for offset processing. But in 2005 in fringe cases, the data could be stored directly in the normal record stream but this is only when the data is small enough to be held in the space normally set aside for the address pointer. In this case it still uses all the storage space, but only returns the data up to the terminator.
Somewhere I took the fringe case and made it the normal case for varchar in my head. What I said still holds true for ntext and nvarchar, they are pointers. The fringe case might still apply to them but in even more rare circumstances, but I can't find anything actually stating this so that might not be the case.
I apologize.
Admin
Which database is this?
Admin
Regards,
Johann Gambolputty de von Ausfern schplenden schlitter crasscrenbon fried digger dangle dongle burstein von knacker thrasher apple banger horowitz ticolensic grander knotty spelltinkle grandlich grumblemeyer spelterwasser kürstlich himbleeisen bahnwagen gutenabend bitte eine nürnburger bratwustle gerspurten mit zweimache luber hundsfut gumberaber shönendanker kalbsfleisch mittler raucher von Hautkopft of Ulm.
Admin
Flat files are useful, especially in the telecoms. If you process like 400 millions records a day (average, not peak) with multiple transformations under way, you're better off using simple text files rather than a relational database.
Admin
SQL 2005
Admin
You're about 20 hours late on that reference, Johann...
Admin
I hate Middle Initial fields that are one char (I have two middle names).
Admin
Admin
Yeah 255 chars for the middle initial is obscene! My last company stored the middle initial as a bool - all employees were arbitrarily allocated a middle initial of Q or Z
Admin
Wow, automation! Back when I was working in radio, watching the automation fail (routinely) was a full-time occupation. We had to make sure there was a tape (reel-to-reel of course) mounted (correctly) on the correct drive, and there were carts in the cart players, one of which was the news, another was the weather, both of which you had to record in between failures, and ... That was only for two stations, (AM/FM sisters).
The hardware was proprietary (remember, the debate was TRS-DOS vs. CP/M back then), I have no idea what processor. And logging? Why, printing to paper of course! Talk about stability, non-volatility, near universal readability....Ah, the good old days. May they never return.
Admin
Oh and just so that people don't think I pulled this out of no where, here is the relevant quote:
If any columns are for LOB data types (text, ntext, image, and the new LOB types in SQL Server 2005 - varchar(max), nvarchar(max), varbinary(max), XML), then there's a pointer stored in the data record which points to a text record on a different page (the root of a loose tree that stores the LOB value). Exceptions to this are when schema has been set to store LOB columns 'in-row' when possible. This is when a LOB value is small enough to fit within the confines of the data page that holds the data record, and so is stored in the same data record. This is a performance benefit as selecting the LOB column does not require an extra IO to read the text record.
In SQL Server 2005, non-LOB variable length columns (e.g. varchar, sqlvariant) may also be stored 'off-row' as part of the new capability (called row-overflow) of having table rows longer than 8060 bytes. In this case the storage format is the same as for LOB values - a pointer in the data record pointing to a text record.
For your own reference this is at the following location: http://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/23/644607.aspx
Admin
Flat files would be something of a bust in this scenario, because they have no transactional integrity. I'm not fan of RDBMSes, but, if you can suck the whole lot into memory, then you're golden. Otherwise, use a decent ISAM solution. (MySQL and InnoDb, the horrors!)
This doesn't seem to be much or an argument, unless you're arguing against stored procedures, and there I'd (generally) agree with you.
Mind you, it does explain why my telephone bill is always so high.
Admin
OMFGROFLOL!
Admin
That's just the right amount of storage for a unary representation.