- 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
Admin
your = belonging to you you're = you are
It's just not that hard
My impression of your IQ took a 10% hit because of that. Think.
Admin
An O-R mapping tool maps the object-oriented classes in your code to the relational structure used by relational databases.
So instead of using code like
<SAMP>queryString = "select * from Members as m where m.memberId = 42";
result = db.execute(queryString);
member = new Member(result);
you can use code like</SAMP>
member = Members::getById(42);
with the construction of the SQL abstracted away. Some tools will even get data from related tables and create instances of related classes as well, so you could also get
print member.ForumPosts.count();
without having to explicitely get data from the ForumPosts table.
In practice most OR mapping tools let you also use SQL, or something similar, to build up queries since it's easier to build complex queries that way.
Of course, in practice things don't work quite so easily, and using an OR tool or database abstraction layer helps but doesn't solve the challenges of switching databases.
Admin
sob All she has been reduced to is "Image 56294785".
I think we've all died a little inside today.
Admin
Obfuscation aside, I could see this being cause by a misconfigured gateway, there are a few ways this could work.
Mode 'A' where the oracle gateway is the only 'user' of the database, in which case it could cache as much as it wants. (This would be silly, because if no other software is accessing the database, you should just use Oracle.)
Mode 'B' where the gateway can be notified of changes by the underlaying server software. (I have no idea if MSSQL can do this.)
Mode 'C' where the gateway can send a quick "has this table changed?/last chaged time?" query. (I have no idea if MSSQL can do this any quicker than just checking the data.)
Mode 'D' where the gateway is one of many users possibly writing updates, so it has to check to make sure noone else updated the record it's using since the last read. (Provides the most current and consistant data.)
Transactions are slow, referential integrity is slow, but getting the wrong data is far far worse than waiting a few extra seconds/minutes.
Admin
SELECT * FROM PictureOfFoosballTable
If you folks want a *real* WTF, one that you might actually be using at this moment, just google for "mork database"
TDWTFWTF: When you click on the text style buttons, the keyboard focus goes away from the edit field. Brillant!
Admin
The title alone is a WTF by itself.
Admin
<FONT color=#000000>My god, you're right! Mork needs to be submitted to TDWTF, without any</FONT> anonymization!
Admin
You can't do that... No No No... You have to first PRINT out the disk...Then you can TAKE and PUT the print on the wooden table.
If you're gonna use the WTA ( wooden table approach ), it's gotta really work. Otherwise it's just another WTF.
Admin
This is not sashdot.
Admin
Agreed. It actually reminds me of something.
Back in the days when RAID was just starting, a certain well-known computer manufacturer came up with a product that was basically RAID 1 avant la lettre.
They did however decide to test it, and I was privileged to see an internal paper with the results. This was actually a sort of internal marketing paper - they had decided it was a Good Thing, and were encouraging people to look for opportunities to sell it.
There was just one small problem - depending on the configuration, a single write (no, no, not a transaction - we're talking about a single disk block) could take up to one second.
I don't think they sold many.
I have no idea what the product was doing internally, but it was surely as daft as this WTF.
Admin
Also the Real WTF here is wen You or Me try something that seems to work, but you dont really know how mature is. You think is mature, and everybody else also use the tool, you read comments on internet, and all comments are positive!.. Seems mature and work!.
Ok, so you code your app, and theres no problems on the development framework, mostly because the development framework is not real, not enough streess, no real data. Then you release, install or whatever, your code enter production. Then everything break because what you use its not good enough, its not good enough.
Example:
I have some productions sites designed with PHP and the gettext library. PHP is threadsafe, but gettext use enviromental variables ...that is no t thread safe. This mean that on developpment you dont see errors, everything work. But with enough users, there will be random errors.
Why people pimp the use of gettext with PHP on web applications?
Maybe because people haven't productions sites, but toys. Hobbyist pimping a tool that seems cool, but is broken.
Maybe people that are professional and very advanced already have solved that problem, with some version that fix it, etc.
Maybe other people that pimp the use of PHP + gettext are really coding single user applications: administration sites, blogs, content managements, etc.. even GTK destktop apps. Enviroments where you have 1 user (the admin, or user) so theres not problems.
Or maybe this bug doest not occur on Windows. And you use WAMP ideas to build LAMP applications.
Fortunally enough I can strafe, and avoid this problem on my PHP applications. So my code work with multiple users as intended. But I whas need to create some code that fake gettext, and now I hate hobbyst people. I used to hate people that pimp a particular database as "the best stuff before jesus" (Most, If not all databases are total WTF's). But now my special hate is for hobbyist people that pimp unmature tools, broken enviroment chains :I
</rant>
--Tei
Admin
well, again we see how slow MS SQL Server is... ;)
On Oracle it takes seconds, on MS SQL Server minutes... g
Admin
The real WTF is that they could support X databases using the open source Hibernate API.
The world is full of idiots.
Admin
And what the frigging hell do you think the ORM generates behind the scene? Pink bunnies on unicorns?
The only way to filter is via where or where-style commands, the ORM just abstracts the SQL away and generates it for you (sometimes very badly)
Admin
<FONT face=Arial><FONT size=2>I concur, I haven’t come across an OR mapping tool yet that actually constructs good SQL. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT>
<o:p><FONT face=Arial size=2> </FONT></o:p>
<FONT face=Arial><FONT size=2>I’ve always found it easier in the long run to write the store proc, proc wrapping code and object factory code myself.<o:p></o:p></FONT></FONT>
<o:p><FONT face=Arial size=2> </FONT></o:p>
<FONT face=Arial><FONT size=2>Some really bad O/R mappers I’ve seen directly map one relation to one class. Very rarely do I find that an applications required representation (normally objects) of the data directly map to the physical database model, nor should it.<o:p></o:p></FONT></FONT>
Admin
Don't forget that once upon a time SQL itself was the means by which you were supposed to be able to communicate with different databases. But then the marketeers of the world decided we needed different flavours of SQL.
It's always the same. You start with tool A. Then along comes tool B which does pretty much the same thing. Someone decides you have to support both, so you build or buy tool 2A, which talks to both A and B. Then along comes 2B which does pretty much the same as 2A. So you build or buy tool 3A, which talks to both 2A and 2B. Then along comes 3B ...
And when you have N levels in place, regardless of the value of N there is always someone like "US Navy Commander" who will tell you that you are an idiot for not using N+1. I presume he is the commander of the USS Enterprise.
And that is why the 25 Terahertz computers of today (or wherever we currently are - I don't try to follow it) have a nett performance precious little better than the 4 MHz computers of 20 years ago.
Admin
Steeeeerike Two!
Admin
If he is, then he's an idiot for not using a Nimitz class vessel.
Admin
reading this SIGHT? I'm blind you insensitive clod! (Do screen readers spell out homophones so that the visually impaired can detect the illiterates as well as we sighted?)
Admin
Those, and "brillant", "Paula" and "FileNotFound" too. Still, it was one of the better ones!
Admin
"And when you have N levels in place, regardless of the value of N there is always someone like "US Navy Commander" who will tell you that you are an idiot for not using N+1. I presume he is the commander of the USS Enterprise."
What you'er saying here, is that abstraction layers are bad.
So I presume you're hardwired into your computer.
And yes, when the commander says you're an idiot, you most certainly are.
Admin
Classic Babelfish joke (WTF traduction):
Spanish version:
Puede que la gente que lee este foro sea muy solitaria, y necesite una especie de simbolo para sentir que pertenecen a algo. Estos chistes forman parte de lo que nos identifica como comunidad. Y parece que hay muchas personas aqui desesperadas por sentir eso. A mi me parece un poco triste por la parte esta de "desesperacion", por la parte que tiene de desarraigo. Tambien me parece triste por lo que tiene que decir de como somos en general los seres humans, que vayamos donde vayamos tenemos que hacer circulos cerrados, tribus. Nos concentramos mucho en separarnos de los demas. Todos estos chistes sobre Paula y otras cosas son una barrera energetica para separarnos del resto de internet. Ademas no tienen maldita gracia, excepto repetidas un millon de veces que o bien resultan en un chiste a lo Andy Kauffman, o bien alguien tiene una genialidad y tropieza con algo de verdad divertido por casualidad.. y eso termina ocurriendo de modo que se "vindica" el uso exagerado de este humor geek.
Y eso. Hasta la vista!
----
Babelfish version:
It can that the people who read east forum are very solitary, and needs a species simbolo to feel that they belong to something. These jokes comprise of which it identifies to us like community. And it seems that aqui are many desperate people to feel that. To my this of "desperation" seems to me a little sad by the part, by the part that it has of uprooting. Also it seems sad to me reason why it must say of as we are in general the beings humans, who we go where we go we must do closed circulos, tribes. We concentrated much in separating to us of demas. All these jokes on Paula and other things are a energetica barrier to separate to us of the rest of Internet. Ademas does not have damn grace, except repeated millon of times that or are in a joke to the Andy Kauffman, or anybody has a genius and really encounters over something amused by chance. and that ends up happening so that "the exaggerated use of this humor is vindicated" geek.
And that.
Good bye!
-- Tei
Admin
Where I work, we are forced to use Toplink for database access. Now that's a real WTF.
captcha = pizza. Great, now I'm hungry.
Admin
Sorry for your loss. :/
Oracle contacted us to try to get us to migrate to Toplink.
Compared to Hibernate, they had no Pros, and all Cons.
And for the record, Foosball Girl > Bean Bag Girl
Admin
No, what I'm saying is that abstraction levels frequently get out of control. Almost every design problem in IT can be solved by an extra level of abstraction - except the problem of too many levels of abstraction.
Admin
And thank god for that.
Admin
The real WTF is that none of you can spell correctly!
Admin
In Oracle's defense (I never thought I would write that!), the Oracle Transparent Gateway is just not designed for this application. It's so that your Oracle DB can access data stored on some other DB (like SQL Server). In this application, though, there is no Oracle DB; all data is stored on SQL Server, so doing the query processing on the Oracle side is just a waste.
Whatever optimizations OTG has, this application for some reason cannot or will not use them. The only way to avoid a 100x loss in performance is to store a copy of the data on the Oracle server, which means constantly sending updates from SQL Server to Oracle. Since this requires the SQL Server to know what data will be needed, it means that only data for predefined queries is sent to Oracle, so this application's users can only see data for predefined queries.
Since the whole point of this application was to let MBAs access the DB without IT intervention, it is pretty much useless. My friend planned to spend a free weekend or two writing a replacement for the app.
Admin
Hmmm, if I interpret that as some kind of pictogram, it's *really* obscene!
Admin
That's what I said. Why get worked up over it?
The poster I replied to was himself replying to a comment that mentioned ORM tools.
Admin
It's a weird class action though. I clicked on it, and I got the impression it is actually a deceptive ad *for* some kind of scheme that is supposedly being actioned. Or it is a very very very stupidly arranged website.
Admin
A weird class action suit it is. I'd even go as far as to call it odd. Maybe even queer? Something is fishy about it, and I don't mean marlins.
Admin
I hereby suggest the standardization of the new SQL statement "SELECT .. FROM ", which selects from the union of all tables in the database. Non-existent columns are filled with null (or the corresponding default value) so the tables do not have to have the same row structure.
Example Usage:
CONNECT TO DATABASE * ON HOST ...* PORT *;
SELECT * FROM * INTO petabyteRAID;
Isn't it brillant?
Admin
"Mr. A. Nonymous, you are accused of cutting your coworker's skull open with a hacksaw. Several eye witnesses have testified against you. Never in my decade-long experience as a judge was I confronted with a more horrible crime. What do you have to say in your defense?"
"Well, I did it, but how else was I supposed to find out whether there's a brain in it?"
Admin
I have seen girls of this calibre and better playing foosball in pubs I go to....of course I did not make the mistake to talk to them about ours job :-)