Comment On Representative Table

"This is a small peek into the production database of one of our client's systems," writes Walter. "I wish I could say that this was an unused table, an isolated occurrence... or even that I had some other job prospects. But sadly, none of those are the case." [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Representative Table

2012-05-23 21:27 • by Coyne
381794 in reply to 381755
Reminds me of...:
The SQL Server database table of "States" that would have our normal 50, but had a few interesting ones like "Jamaica" and even "North Korea", but it wasn't a complete list of countries too (like 70 entries altogether)...very odd....


Did it have Ruritania?

Re: Not Oracle

2012-05-24 03:08 • by nomdeplume
381797 in reply to 381785
Hugh:
iwoas:
It may be a batch file called select.bat preceded by prompt mysql$g.
Wouldn't the '*' then be interpreted as all files in the directory (you'd need to escape it to pass it as a parameter)

The Windows command shell doesn't expand wildcards, that's left up to the program itself. There are standard API calls for processing fileglobs, which virtually every program utilises if it expects to be called with such parameters.

C:\Temp>type select.bat

@echo off

echo 1: %1
echo 2: %2
echo 3: %3
echo 4: %4

C:\Temp>select * from foo
1: *
2: from
3: foo
4:

Re: Representative Table

2012-05-24 04:20 • by ben (unregistered)
381798 in reply to 381729
You may not remember these old times, when the French tore down monarchy and decided to stand for a "Republic" thing. Well, they also decided to change days and months for almost 14 years.


And, even though it serves just about no purpose unless you read old Marxist literature and need to know when the 18th Brumaire of Napoleon III was, there is support for the Revolutionary Calendar in many date libraries today. Just like most computing languages allow for the fact that different jurisdictions switched to the Gregorian calendar at different times. Even creating new months is not a case for stuffing random values into a database table.

Re: Representative Table

2012-05-24 05:33 • by toshir0
This a... just... fucking insane.

I can't say if my eyes are bleeding... I don't feel no more.

Re: Representative Table

2012-05-24 05:52 • by Jesper (unregistered)
The REAL WTF is that you have a table called "month"?

Why the hell would you need a table for that? For if someone invents a new month someday, so that you can easily add it? Or for when January is going to be renamed to something else?

Re: Representative Table

2012-05-24 06:46 • by Trevor D'Arcy-Evans (unregistered)
Needs a 'FileNotFound'

Re: Representative Table

2012-05-24 09:13 • by token_woman
381804 in reply to 381802
All these nageshes are getting tiresome. Also "ain't" is cockney (native Londoner) pronunciation, not Indian IN ANY POSSIBLE WAY. So pls just stop it

Re: Representative Table

2012-05-24 09:34 • by Geoff (unregistered)
381805 in reply to 381754
If the table was structure in an application or something sure but this is a SQL database table. In order to imply a numeric value from the Sequence in the table you will lose the ability to join it directly. The cost of having a function/procedure/cursor called from queries to figure out that number is going to grossly exceed the cost of storing it; at least for something with a pretty finite number of values like "month" and in almost all other situations as well.

Re: Representative Table

2012-05-24 10:48 • by Nagesh (unregistered)
381807 in reply to 381804
token_woman:
All these nageshes are getting tiresome. Also "ain't" is cockney (native Londoner) pronunciation, not Indian IN ANY POSSIBLE WAY. So pls just stop it


You ain't right to be so bad about people of Hyderabad.

Re: Representative Table

2012-05-24 11:25 • by callcopse
381820 in reply to 381807
Chaos
Discord
Confusion
Bureaucracy
The Aftermath

...are all missing

Re: Representative Table

2012-05-24 11:56 • by Nagesh
381836 in reply to 381804
token_woman:
All these nageshes are getting tiresome. Also "ain't" is cockney (native Londoner) pronunciation, not Indian IN ANY POSSIBLE WAY. So pls just stop it


Alex should take one fatwa and ban all unregistered Nagesh user names. That will take teach him a lesson.

Re: Representative Table

2012-05-24 12:14 • by Paula Bean (unregistered)
381846 in reply to 381782
TroelsL:
Toolbag:
TroelsL:
Why on Earth would you even have a MONTH table anyway? In case "they" decide to change them?

In fact, they can change.

You may not remember these old times, when the French tore down monarchy and decided to stand for a "Republic" thing. Well, they also decided to change days and months for almost 14 years.

Weeks were ten days long, months were 3 weeks long, and added 6 days to make it even with Earth rotation.

You may check "Republican Calendar" on wikipedia and laugh about how we French are lame, I grant you this right.

However, never assume months are granted :)



Wow.. you just blew my mind. I will never rely on DateTime again - in case they change that, I'll have to redo all my code.

Did you also know that 0 is relatively new invention? I better create a NUMBERS table in case they invent new ones of those as well.

;)


If you really don't understand the value of a numbers table, you should probably leave the database stuff to the professionals.

Re: Representative Table

2012-05-24 13:30 • by Decius (unregistered)
TRWTF is using
select * from

Re: Representative Table

2012-05-24 16:17 • by Scrummy (unregistered)
Had this team used Agile development, you'd never see data like this in the database. At the end of every sprint, a team goes through a retrospective. Junk records in the data table would surely be uncovered at that time.

Re: Representative Table

2012-05-24 16:37 • by Jack Foluney (unregistered)
You know it's sad when those fucking values actually have a purpose and deleting them would fuck up something else.

Re: Representative Table

2012-05-24 17:23 • by big picture thinker (unregistered)
Why would they allow users to submit any information that would affect column names??

And they forgot Wyoming...

Re: Representative Table

2012-05-24 18:12 • by Evan (unregistered)
381921 in reply to 381782
TroelsL:
Did you also know that 0 is relatively new invention? I better create a NUMBERS table in case they invent new ones of those as well.

;)

They have, a lot. I mean, first there was zero, then negative numbers, then fractions, then irrationals, transcendals, imaginarys and complex, surreals, hyperreals, ...

I mean, imagine if you were writing a program that dealt with numbers back when they were coming up with imaginary numbers. (If they had computers then, I mean. Would have been way harder to develop without imaginary numbers though. (By my understanding this is actually true.)) If you planned ahead, all you'd have to do is add a bunch more rows to your NUMBERS table.

Re: Representative Table

2012-05-25 07:01 • by Nagesh
381959 in reply to 381907
Scrummy:
Had this team used Agile development, you'd never see data like this in the database. At the end of every sprint, a team goes through a retrospective. Junk records in the data table would surely be uncovered at that time.


We are all using Agile, but no project manager is able to define Agile goal.

Re: Representative Table

2012-05-25 12:11 • by tirerim
381985 in reply to 381735
iToad:
Is the spiffy ASCII art formatting a feature of MySQL or -God help us-, was it embeddeded within each record in the table, so it would print out like this when queried?

Disclamer: I don't know anything about MySQL.


It's a feature of MySQL. Only in interactive mode.

Re: Representative Table

2012-05-25 12:44 • by redundantman
381988 in reply to 381716
Dragnslcr:
It's also missing Smarch.

Edit: Damn, beat me by under a minute.


Came here for Smarch reference ... leaving satisfied.

/Lousy weather in Smarch ...

Re: Representative Table

2012-05-27 09:26 • by Nickster (unregistered)
382036 in reply to 381773
[quote user="Codd"][quote user="AN AMAZING CODER"][quote user="Codd"]Please note I said "The numbering is implied by the sequence of the entries as stored in the table." That isn't going to change randomly every time you do a month lookup.[/quote]

If you're not in fact trolling, you need to revisit relational model. A table (relation) is a set of unordered tuples.

Re: Representative Table

2012-05-28 02:14 • by Dotan Cohen (unregistered)
382042 in reply to 381748
myName:
Like so many that are presented as WTFs, there's not enough background to know whether it's a really bad solution to a good problem or a really good solution to a bad problem.

How about if there was a table which held everything that the users had entered for "Month"?


This is obviously not user-entered data. The string "penis" is not represented.

Re: Representative Table

2012-05-28 11:18 • by Amy (unregistered)
OMG.. Thanks ya'll :) I just spit my coffee all over my monitor.. It needed cleaning anyway, and now it smells like coffee. :P

Re: Representative Table

2012-05-29 04:20 • by Bo the crusty old DBA (unregistered)
382053 in reply to 381907
Scrummy:
Had this team used Agile development, you'd never see data like this in the database. At the end of every sprint, a team goes through a retrospective. Junk records in the data table would surely be uncovered at that time.


Naaahhh - had they been agile, they would have added a new month per sprint (adding more than one month would not be need to fulfill requirements for this sprint), so you would end up with:

January
February
March
...
December
Next January
Next February
..
Next again January

etc, until they ran out of product backlog, or their customer got fed up

Re: Representative Table

2012-05-30 16:48 • by NotACoder (unregistered)
Data rot.

Looking forward to the days when this becomes so prevalent, that when data rot, or "PLAQUE" as it shall be known as, is such a serious problem that we instantly excise any table, host, network, or country that displays such, from the rest of the network, and then nuke it to prevent it's plaque from spreading.

I think we need to start with the database that this table came from. :)

Re: Representative Table

2012-05-31 04:43 • by Jeff Grigg (unregistered)
What?
Where's the "File Not Found" entry?!?

Re: Not Oracle

2012-05-31 09:19 • by notme (unregistered)
382250 in reply to 381691
TGV:
Judging by the fact that both NULL and the empty string occur, I infer it's not Oracle. At least something is sane.


Technically it is, since Sun Microsystems has bought MySQL AB and Oracle has subsequently bought Sun...

What we have here is... Oracle MySQL.

Re: Representative Table

2012-06-01 06:09 • by Yann (unregistered)
That table is auto populated from user entries in a field. Then the content of the table is used to present choices for the field in a dropdown list.

It has been a common practice in Ms Access.

(of course, it had been better to first populate the table with consistent values and disable the auto-update feature)
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment