- 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
So basically, he uses a single-column table as (totally unnecessary) scratch space for this existence check, when he could have just as easily has run SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '?' [table_name]. Assuming he really needed to check if the table existed in the first place.
He'd better have a really good justification for this...
Admin
Madness?
Admin
Scarecrow? Ain't this new word? I am massaging my hands to gether to find what it menes.
Admin
What if the disk where the XML file is stored is offline also.
All access to metadata shall be done through a MetadataManager class (subclassed from a DataManager and, ultimately, an AbstractManager class) which maintains a list of MetdataManagerDriver objects that represent different ways in which the metadata can be stored: MetadataManagerXMLDriver, MetadataManagerDBDriver, MetadataManagerCSVDriver, MetadataManagerExcelCompatibleCSVDriver, etc...
To prevent overloading any one storage medium, a different MetadataManagerDriver will be used for each method call to the MetadataManager. The algorithm for choosing which MetadataManagerDriverSelector to use per call (MetadataManagerDriverRandomSelector, MetadataManagerDriverRoundRobinSelector, etc.) shall be implemented in the MetadataManagerDriverSelectorMediator.
Just hardcode all the config values for the MetadataManager right in the constructor for now.
Admin
I ain't understanding this.
Admin
Admin
This madarchod is bad version of imitating me. Atleast I have spell-checking feature in my browser all enabled now.
Admin
I have seen code like this in real live production system. It is only for some special group of users, but each user having individual table that define rights and privileges.
We found out after some user changes his single-sign-on identity name. Then lose all rights. This table never maintained, except by severe sql scripts kept in a Unix folder with label of IMP-DO-NOT-MESS-WITH-THIS.
Then we discover reason for lost rights for that user. This is still the way the system is running. This is system in place for client in Canada. Not develop by Indian programmers, but now being maintain by us only
I could never make this story anonymous, so I not submit it to WTF
Admin
Kant compile. Must the ' marke be require for spell ain't?
Pls send me the corect codez.
Pls do not ignore becuse I know you are think "bad Nagesh I punnish him by ignore" but even so you are think about Nagesh so I win.
Admin
You do realize that a DBMS will routinely create temporary tables to execute large SELECT queries, right? There is absolutely nothing wrong with generating temp tables to handle your work, especially if they're only visible to your transaction.
For handling really large modifications to a table, often the best way to do it is through a CREATE ... AS SELECT because the DBMS doesn't have to do any locking: no one else can possibly access that table because it hasn't been created yet.
Certain systems absolutely do, for legal reasons such as provenance and auditing, require a fixed schema.
Many don't. The only good reason not to do DDL in a system that doesn't have a legal restriction on the schema is your concurrency model.
Oracle, for instance, isolates DDL from transactions. That is, (BEGIN DML DDL DML COMMIT) is quietly changed to (BEGIN DML COMMIT) DDL (BEGIN DML COMMIT), since, being Oracle, it happens in the most unexpected way possible.
Others, like PostgreSQL, handle DDL within a transaction just fine.
As to whether you have a genuinely good reason that your fields aren't fixed, and whether these tables you're constructing have any actual meaning in the real world, that's a whole other debate...
Admin
Well, the person who gave me the example teaches in a US College, he's a Professor. Perhaps he was thinking in an abstract way, but the information is way too often absorbed as "dogmatic way of doing things". No wonder, then, that some graduates come out with some abominations.
Admin
I'm not really a DB person as I find them incredibly boring, but wouldn't the obvious way to look at it be similar to a OO approach in programming? Tables take on the role of classes, and each row would be an instance of that class. If you think of it this way, then creating a table for each user would be analogous to creating a separate class for each user...i.e. batshit insane.
Admin
No, you're right. Not enterprisey. Need more layers of factories.
Admin
Most, yes. Another exception would be an installer that creates a database and initializes its tables and such.
You wash your hands out with soap, young man!
Admin
Yet DUAL isn't a reserved word, or otherwise restricted to its valid if ill-named purpose.
Conclusion: Oracle is the Real WTF. AMIRITE?
Admin
Admin
Admin
Admin
Fine, fine, but I think multiple inheritance of tables should be avoided. Instead we should have abstract and interface tables with no actual columns, just ideas.
captcha: letatio = lettuce head
Admin
You guys are all crazy. He's obviously using this code to see if the DATABASE is there. Jeez...
Admin
Admin