Slashdot Mirror


Comparing MySQL and PostgreSQL 2

Mr. Jax writes "6 years ago Mr Poet submitted the story Comparing MySQL and PostgreSQL. Since then both databases have evolved to wherever they are today. Are the points raised 6 years ago still valid? What has changed? Are there other things to consider since then (e.g. licensing)?" This is certainly a valid question since both databases have had to evolve with the times. Have these applications been specialized to fit a particular niche market or are they both still strong competitors? What does the horizon look like for the development of these programs, especially considering the recent MySQL partnership with SCO?

902 comments

  1. Get off it ScuttleMonkey by Anonymous Coward · · Score: 4, Insightful

    SCO bought a freakin license to include a copy of MySQL that's not GPL. It's not like SCO bought the company.

    1. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 0

      Mod parent "-1 Wrong". The partnership is more then that.

    2. Re:Get off it ScuttleMonkey by ray-auch · · Score: 3, Interesting

      SCO bought a freakin license to include a copy of MySQL that's not GPL. It's not like SCO bought the company

      No, it's like MySQL _sold_ them something.

      There are (I expect) a large number of people reaing this who believe that SCO is not a company you should do business with.

      It would be interesting to know why MySQL did business with SCO, maybe on principle they turn no customer away, or maybe a need for money overrode. The latter case might be a legitimate concern for the community.

    3. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 0

      Did you actually read it? All they did was buy a license of MySQL that's not under GPL for their OS, and now they plan to offer certificiations for it. What next? "SCO and McDonalds announce deal" after some SCO employees eat a couple Big Macs?

    4. Re:Get off it ScuttleMonkey by rubycodez · · Score: 0, Troll

      yeah, I read it: "As part of the agreement, the companies will work together on a range of joint marketing, sales, training, business development and support programs" What are you, McBride's lap boy? You may soon be out of a job when McBride gets his 24K steel jewerly and new 350 lbs. body building homosexual rapist roomate for stock fraud.

    5. Re:Get off it ScuttleMonkey by jellomizer · · Score: 0, Redundant

      Well that is the real problem with the zealot GNU People they are just as bad as the religious right. SCO is against the GNU especially Linux, MySQL is a business who produces GNU products. SCO wanted to give MySQL money for products and services, MySQL being a company who has to pay for their expenses and employees and make a profit. MySQL doesn't need to agree with all of SCOs policies and to them SCO's Tiff with IBM and Linux are none of their business. It is just like the argument between evolution. Just because there is a topic that people don't want to agree with, Random vs. Divine intervention they will decide to toss out everything and classify it as evil. I think if you people want to argue about all the problems with religion you should also see how you are handling issues like GNU usage, and making lines on who are the bad guy and the good guy.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    6. Re:Get off it ScuttleMonkey by toddbu · · Score: 1

      As a zealot GNU person who is a member of the religious right and believes in free market economics, I'm just not sure what to think of your comments. :-)

      --
      If you don't want crime to pay, let the government run it.
    7. Re:Get off it ScuttleMonkey by ultranova · · Score: 1

      Well that is the real problem with the zealot GNU People they are just as bad as the religious right. SCO is against the GNU especially Linux, MySQL is a business who produces GNU products. SCO wanted to give MySQL money for products and services, MySQL being a company who has to pay for their expenses and employees and make a profit. MySQL doesn't need to agree with all of SCOs policies and to them SCO's Tiff with IBM and Linux are none of their business.

      There is an old saying: "Lie with dogs and you get fleas". SCO has such a horrible reputation that simply being associated with them makes no one want to associate with you, least they get fleas too. There's also practical considerations: considering SCO's stance towards GPL, is MySQL going to stop distributing its product under GPL ? Should those users for whom GPL and the freedoms it gives are important start preparing for a switch to something else ?

      It is just like the argument between evolution.

      Between evolution and what ?

      Just because there is a topic that people don't want to agree with, Random vs. Divine intervention they will decide to toss out everything and classify it as evil.

      It is pretty difficult to consider SCO as anything but evil, since they have been constantly lying in an attempt to blackmail others to give them money, and badmouthing those others in the process.

      Good job turning a database comparison into arguing about religion, BTW.

      I think if you people want to argue about all the problems with religion you should also see how you are handling issues like GNU usage, and making lines on who are the bad guy and the good guy.

      Good guys are those who do good things, bad guys are those who do bad things.

      That wasn't so difficult, now was it ?-)

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    8. Re:Get off it ScuttleMonkey by TeknoHog · · Score: 1
      when McBride gets his 24K steel jewerly and new 350 lbs. body building homosexual rapist roomate for stock fraud

      Well, at least we know which one of the couple is the 'bride'. ;)

      --
      Escher was the first MC and Giger invented the HR department.
    9. Re:Get off it ScuttleMonkey by Saeed+al-Sahaf · · Score: 4, Insightful
      No, it's like MySQL _sold_ them something.

      Well, MySQL AB is a for-profit company, they sell things to people. And, last time I looked into it, SCO wasn't gassing people or mowing down rain forrest, or something. Sure, they are obnoxious, but the truth is, so are many commercial companies we deal with every day.

      But does it even matter? The jokes on SCO, they paid to use something in a product very few companies will buy.

      More fun than dragging out this, would be guessing what non-issue Slashdot will toss up on their front page next in an attempt to stir shit and boost their dieing readership?

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    10. Re:Get off it ScuttleMonkey by entrylevel · · Score: 2, Interesting

      The jokes on SCO, they paid to use something in a product very few companies will buy.
       
      More precisely:
      The joke's on SCO, they paid for something that very few companies have to pay for, to use in a product that very few companies will buy. Additionally, for those companies already own UnixWare or OpenUNIX, MySQL AB already provides installation instructions and patches for them. Finally, for the exceptionally lazy, SCO themselves provide a GPL'd version for you to download for free!
       
      More on-topic, isn't this story a dupe? Granted I wouldn't expect these editors to search back 6 years to find it, but I would at least expect them not to be 6 releases behind on the PostgreSQL version number! Oh wait...

      --
      Karma: Incomprehensible (Mostly affected by posting at +5, reading at -1, and metamoderating everything unfair.)
    11. Re:Get off it ScuttleMonkey by pallmall1 · · Score: 2, Insightful

      Sure, they are obnoxious, but the truth is, so are many commercial companies we deal with every day.

      That's true, there are a lot of obnoxious commercial companies, but SCO has actually surpassed just being obnoxious. Their business model actually includes getting revenue from suing or threatening to sue their customers. That's way beyond what other obnoxious companies do. I'm not saying other companies have never sued a customer, I'm saying that SCO is doing this to extort money from their customers and also from people who don't even use SCO products (like linux users.)

      The SCOboys putrid conduct doesn't stop there. Just read over their press releases over the last couple of years and you'll find them so full of lies, contradiction, and deceit you will be amazed. Really. SCO is in a whole class of their own.

      So, in this case, it does matter that MySQL has partnered in this manner with SCO. It says to me that MySQL might not be mowing down the rainforest, but they're willing to sell the mowers to the ones who are.

      --
      3 things about computers: they're alive, they're self-aware, and they hate your guts.
    12. Re:Get off it ScuttleMonkey by Saeed+al-Sahaf · · Score: 1
      So, in this case, it does matter that MySQL has partnered in this manner with SCO. It says to me that MySQL might not be mowing down the rainforest, but they're willing to sell the mowers to the ones who are.

      I don't think so, no one is buying SCO products. At this point, SCO is not much of a threat to anyone. They are dying an ugly death, and will not be with us much longer. IBM, Red Hat, Novell and AutoZone are all they can handle right now, and when these people are done with them, there will be nothing left of SCO but dry bones

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    13. Re:Get off it ScuttleMonkey by TheWanderingHermit · · Score: 1

      That's okay. For the many of us who are none of the above, we're just not sure what to think of you! ;)

    14. Re:Get off it ScuttleMonkey by philovivero · · Score: 1
      SCO bought a freakin license to include a copy of MySQL that's not GPL. It's not like SCO bought the company.
      Yet MySQL trumpets it very loudly on their web page with a press release that looks like it was written by SCO.

      It includes such gems as this one:
      "Given that 85 percent of SCO UNIX-based solutions are database applications, it makes complete sense to work more closely with MySQL to jointly certify, market and support our product solutions for the benefit of our mutual customers," said Jeff Hunsaker, senior vice president and general manager, SCO's UNIX division.
      That sounds a bit more than Buying a non-GPL copy of MySQL.

      That's just one of the many gems from that page on MySQL's own site. I know Brian Aker posted yesterday (or whenever) saying this is just MySQL providing binary builds for SCO, but that press release doesn't match up with his statements (or yours) at all.

      Sorry. I'm going to have to play the ad hominem game here. You're just an AC, and your opinion isn't to be trusted.
    15. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 1, Funny

      Hey, I heard SCO buys their office supplies from Staples, OfficeMax, and Office Depot. Quick, boycott Staples, OfficeMax, and Office Depot!

    16. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      none of the above

      Wow, you really don't believe in free market economies? Are you like a Marxist then?

      --
      If you don't want crime to pay, let the government run it.
    17. Re:Get off it ScuttleMonkey by cswinter · · Score: 1

      The anonymous coward makes a valid point, It may be limited but in the absence of further details it is as complete as can be.

      For those who have or are inclined to comment further, I recommend the following:

      Google LES (licensing executive society).
      Read information.
      Understand. If understood goto 10. If not understood goto 20.
      10 refrain from posting uninsightful comment on slashdot.
      20 read again or obtain IP qualification

      I have IP qualifications and licensing terms can be a mystery to me. However, I can say that they do not condone the acts of the licensor as they fall outside the licence, and are often entered into to obtain the commercial certainty that one will not be sued.

    18. Re:Get off it ScuttleMonkey by MyHair · · Score: 1

      There are (I expect) a large number of people reaing this who believe that SCO is not a company you should do business with.

      SCO sues their customers, not their vendors. MySQL is safe. Maybe even safer now.

    19. Re:Get off it ScuttleMonkey by optikSmoke · · Score: 1

      Holy black-and-white batman!

      Just to make sure you're aware, [NOT free market economy] is not the same as [Marxism] (or communism, or socialism, or whatever you want to toss around). In fact, I don't think a single true free market economy exists in the world today.

      Maybe you should look up the phrase "grey area." You're probably living in one.

    20. Re:Get off it ScuttleMonkey by Black+Copter+Control · · Score: 1
      I pretty much agree. SCO is Really Freakin' Annoying, but they're not, like, gassing babies or running Abu Garib prison or anything. They paid MySql's commercial arm for services, and they got (more or less) what they paid for.

      It also seems to me that the MySQL group is being about as low-key about this as they can be. Hopefully, MySQL also charged them absolute full price along with a hazard-pay premium.

      This reminds me of back in '99 just after Microsoft had bought HotMail, and tried (unsucessuflly) to transfer the whole thing to NT... They ended up having to buy about $6Million worth of SUN hardware -- absolute full list price. Not a penny in discounts. As our SUN salesman said: "Discounts are to retain are to retain loyal customers. We knew that MS would never buy from us ever again, unless they absolutely had to." (in which case, I presume, they'd be charged full price once again).

      --
      OS Software is like love: The best way to make it grow is to give it away.
    21. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      Maybe you should look up the phrase "grey area." You're probably living in one.

      Only when Mount St. Helens blows ash to the north.

      [NOT free market economy] is not the same as [Marxism]

      I agree that the US economy isn't *completely* a free market economy, but it is *principally* one. And what I meant by my original comment is that I believe that market forces should for the most part be allowed to operate unimpeded. If MySQL wants to make a few bucks selling their database solution then let them do it. The market will ultimately determine the value of the product. Since MySQL derives much income from the F/OSS community, I personally think it's a stupid decision to hook up with SCO, much in the same way that I thought Red Hat was stupid for adopting a Microsoft-style licensing model for their distro.

      --
      If you don't want crime to pay, let the government run it.
    22. Re:Get off it ScuttleMonkey by LordKazan · · Score: 1

      toddbu And what I meant by my original comment is that I believe that market forces should for the most part be allowed to operate unimpeded. So you do recognize that monpolies and cartels interfere with market forces operating unimpeded?

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    23. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      So you do recognize that monpolies and cartels interfere with market forces operating unimpeded?

      It depends on what the barriers to entry are. In the case of Standard Oil where they were buying up land and preventing people from building pipelines to compete with them then the answer is "yes". In the case of Microsoft where anyone (like Linus Torvalds) can fire up a machine and write a new OS and distribute it freely on the Internet then the answer is "no". "Free market" means just that - a level playing field where all can participate with fearing harm from their competitor, other than that inflicted by delivering better goods and services.

      --
      If you don't want crime to pay, let the government run it.
    24. Re:Get off it ScuttleMonkey by Doc+Ruby · · Score: 0, Flamebait

      Don't worry, zealot. As usual, a blowhard hypocrite will be along presently to tell you what to think.

      --

      --
      make install -not war

    25. Re:Get off it ScuttleMonkey by LordKazan · · Score: 1

      Doc Ruby

      As usual, a blowhard hypocrite will be along presently to tell you what to think.
      That's funny.... because that's what the religious right specializes in doing [telling other people what to think and attempting to legislate their beliefs into law]

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    26. Re:Get off it ScuttleMonkey by LordKazan · · Score: 1

      Then you have a clearly incomplete picture of market forces.

      Especially specifically related to operating systems and the behavior of Microsoft. Microsoft is undeniably a monopoly and they undeniably abuse their position to supress competition just like Ol' Standard Oil and Ma' Bell

      You also forget the opposite side of the equasion: consumers have to be free from abusive behavior by the providers otherwise the market is not free either.

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    27. Re:Get off it ScuttleMonkey by toddbu · · Score: 1

      I'm sorry - aren't Mac OS, Linux, Sun, and three different versions of BSD enough competition for you? And that's just on the PC side of things. Nobody's twisting your arm to use Windows.

      --
      If you don't want crime to pay, let the government run it.
    28. Re:Get off it ScuttleMonkey by LordKazan · · Score: 1

      You don't even know the definition of a monpoly and you attempt to argue economics theory? Typical arrogant american [I'm american too so stop that thought there]

      You DO NOT HAVE TO HAVE A 100% MARKET SHARE TO BE A MONOPOLY. If you have a commanding market share that allows you to engage in anticompetetive practices then you are a monopoly. Microsoft has UNDENIABLY engaged in anticompetetive practices to supress competition in the x86 operating system market.

      * Made libelous claims about their competition
      * Financially coerced OEMs to only install their operating system
      And the list goes on

      I have a recommandation for you: Silence your lips until you learn something about economics.

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    29. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      If you have a commanding market share that allows you to engage in anticompetetive practices then you are a monopoly.

      On Slashdot, one man's "insightful" comment is another man's troll. The same holds true with anti-competitive practices. For example, if Microsoft really had true command of the market then they'd charge whatever they want for their OS. Now I don't know about you, but I think $100 for Windows XP is a pretty good deal. You might not, but then again you probably weren't alive in the days when a single seat on a mid-range VAX system ran around $1,000. Of course I think that Linux has a much better pricing model, which is why I have 6 Linux machines in my house and only 2 Windows boxes. (I haven't gotten my kids switched over yet, and I use the other primarily for testing on IE.)

      Maybe you don't feel you have any choice but to use Windows, but I suspect that you're in the minority on this forum. As for the broader marketplace, do you really think that Microsoft would spend millions of dollars lying about TCO or attempting to scare business owners with FUD about supposed problems with the Linux licensing model if they really had true control over the market?

      Personally, I hope that Microsoft sets the price for Windows Vista at $10,000/copy. It'll just speed up F/OSS adoption for both businesses and consumers.

      --
      If you don't want crime to pay, let the government run it.
    30. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 0

      "So, in this case, it does matter that MySQL has partnered in this manner with SCO. It says to me that MySQL might not be mowing down the rainforest, but they're willing to sell the mowers to the ones who are."

      Please, shaddapauface. You obviously love to preach and have never owned a successful business. They are a company who sells things. SCO was buying. MySQL made money, end of story.

    31. Re:Get off it ScuttleMonkey by lysergic.acid · · Score: 1

      they didn't just buy a license to include non-GPLed MySQL. IIRC, the article reported the announcement of an extensive business partnership between the two companies.

      they announced that MySQL and SCO would be establishing a joint certification process for OpenServer 6, which will include training and certification for MySQL. so it's not as simple as SCO just buying a license of MySQL. they are also working together on many business aspects of the two companies, including sales, marketing, training, and business development.

    32. Re:Get off it ScuttleMonkey by pallmall1 · · Score: 1

      Hey, I heard SCO buys their office supplies from Staples, OfficeMax, and Office Depot. Quick, boycott Staples, OfficeMax, and Office Depot!

      SCO doesn't sell stationary.

      --
      3 things about computers: they're alive, they're self-aware, and they hate your guts.
    33. Re:Get off it ScuttleMonkey by optikSmoke · · Score: 1

      I agree, MySQL can choose how they make money. My comment wasn't about the MySQL situation; it was directed toward your statement: "Wow, you really don't believe in free market economies? Are you like a Marxist then?"

      Knee-jerk statements like this always amuse me. So many people seem to believe that the United States represents the epitome of laissez-faire capitalism and free market economy, and that anything less would be communism (both of which are false). From your follow-up I can assume you aren't this short-sighted, but the comment you made certainly gave that impression.

    34. Re:Get off it ScuttleMonkey by Randseed · · Score: 1
      Maybe I'm just not clued in, at which point I hope someone enlightens me, but SCO wasn't a product that was really useful back in 1995, let alone 2005. Linux blew it off the map almost immediately, and this was made even worse by SCO's pricing schemes.

      In 1995, I was working with this (lame) company that sold industrial database frontend software. That isn't important. But they based their system off of something called OpenBasic, and ran it on SCO systems. So one day this new computer comes in, and I just partition the drive and install Linux on it.

      Not surprisingly, Linux ran the SCO OpenBasic interpreter binary just fine. For free. Meanwhile, the systems administrator (the kind of guy with a tin-type photo -- yes, that old) is back in the server room trying to install all sorts of patches to get their copy of SCO to run on a 486 processor. Then when he finally got it done, it boots up, and promptly hardlocks. Wash, rinse, repeat. So I calmly explain the situation with the Linux box, but they won't have anything of it because Linux doesn't have SCO's great support. Fast forward to him three hours later still trying to get SCO to fix it.

      SCO is now totally irrelevant, because even the people who dislike free software are either going to use some flavor of Windows, or some flavor of UNIX that isn't SCO.

    35. Re:Get off it ScuttleMonkey by Saeed+al-Sahaf · · Score: 1

      Exactly, and this is why this MySQL / SCO "issue" is irrelevent.

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    36. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 0

      No, it's like MySQL _sold_ them something.

      Yeah, like their soul or first born child.

    37. Re:Get off it ScuttleMonkey by KarmaMB84 · · Score: 1

      It may very well have been written by SCO. :P Of course most of it is marketing fluff that probably doesn't mean anything more than "SCO is paying MySQL AB not to drop support for SCO UNIX platforms and to certify and support MySQL on SCO UNIX." Who cares?

    38. Re:Get off it ScuttleMonkey by Anthony+Boyd · · Score: 1
      Who cares?

      Apparently a lot of people care, and a handful of ACs waving their hands saying "nothing to see here" doesn't seem to be swaying many.

    39. Re:Get off it ScuttleMonkey by Ohreally_factor · · Score: 2, Funny

      Nor do the sell mobility. What's your point?

      --
      It's not offtopic, dumbass. It's orthogonal.
    40. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 0

      Uh, sure they do. But they don't sell stationery, which is perhaps what you meant.

    41. Re:Get off it ScuttleMonkey by mikerozh · · Score: 0

      As more SCO money you burn, they will survive less. Thus selling something to SCO is a good idea. And as more you charge from them, better the result. :)

    42. Re:Get off it ScuttleMonkey by Gopal.V · · Score: 1
      Well, MySQL AB is a for-profit company, they sell things to people. And, last time I looked into it, SCO wasn't gassing people or mowing down rain forrest, or something. Sure, they are obnoxious, but the truth is, so are many commercial companies we deal with every day.

      SCO has a bad habit of burning anybody they come in contact with including partners and other fools who enter into contract with them. It could be a sock puppet move to choke MySQL with some legal infraction and sink a few hundred thousand of MySQL money. It's quite bad when an important FOSS company like MySQL takes such a decision, considering the risks involved. More of a Get the money NOW fly-by-night operator attitude.

      If you didn't understand what I was talking about - take a peek at Shirt sleeves showing .
    43. Re:Get off it ScuttleMonkey by LordKazan · · Score: 1

      Lying about TCO and using other FUD is a market control tactic

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    44. Re:Get off it ScuttleMonkey by Dolda2000 · · Score: 1
      There are (I expect) a large number of people reaing this who believe that SCO is not a company you should do business with.
      I, for one, believe that that's still better than seeing SCO ride the GPL and include a version of MySQL that doesn't cost them any money.

      Since they could just have included the GPL'd version of MySQL, it seems better to me that a) SCO loses money on a proprietary license and b) MySQL AB gets money from something that doesn't hurt anyway. It doesn't hurt since a) SCO could have had MySQL anyway and b) people using SCO software (if there still are any) will be further disadvantaged by getting a non-free version of MySQL.

      That might just be me, though.

    45. Re:Get off it ScuttleMonkey by jedidiah · · Score: 1

      This has NOTHING to do with "zealotry". These are mundane business concerns that are not merely limited to the Slashdot crowd. The vast majority of companies tend to be VERY interested in the strategic direction of their major suppliers. This is why the likes of GM or JCPenney's tend to keep track of what direction Oracle or Microsoft seem to be going.

              That you would associate such interests with blind zealotry just demonstrates that you are clueless and immature.

                When you BUILD YOUR BUSINESS on something you have to be very mindful of what is happening with that facility or technology.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    46. Re:Get off it ScuttleMonkey by druxton · · Score: 1

      ...take a peek at Shirt sleeves showing
      I don't know how I missed that - may be the best UF ever.

    47. Re:Get off it ScuttleMonkey by arkanes · · Score: 1
      Yay, a tangent!

      It's true that the barrier to entry for writing an OS is very small. But this is economics we're talking about, so we don't care about people writing OSes. We care about people *marketing* OSes, and selling them. And Microsofts monopoly clearly creates an enormous barrier to entry there. This, of course, is the basic failure of the free market - the most successfull player in any market will always have the ability to control the market. How is buying up land so other people can't build pipelines any different than bribing distributors to only sell your product?

    48. Re:Get off it ScuttleMonkey by Anonymous Coward · · Score: 0
      When our engineers caught wind of this, only a few hours later they were in my office with a proposal to nuke all the installations of mysql with microsoft sql server. Their rational was that SCO will soon force mysql to extort money from their customers (us) to the tune of many thousands of dollars and include involuntary audits of our server rooms. We decided to get rid of linux/mysql and go with Microsoft server with their sql offerings. Sure the porting will occur over a few years and cost many thousands of dollars but its worth it to remove this huge unknown liability from our shop and replace it with more predictable costs.

      Especially with the gpl 3 demanding opensourcing of internal code with all the company financed development subsequently going to our competitors, we've decided to end the experiment with "free software" as our company still has to pay the rent, unlike freeloaders like Richard Stallman who can crash just about anywhere.

    49. Re:Get off it ScuttleMonkey by arkanes · · Score: 1
      The primary obstacle for almost every desktop OS, and almost every office suit, is not "how good is it", or "how much does it cost", but "how well does it interoperate with Microsoft", and "how closely does it mimic Microsofts products". And you don't think Microsoft has a monopoly to leverage? Of course there are alternatives. There were always alternatives to Standard Oil, too. And even to the Bells. But,just like non-Microsoft OSes, they all work at a signifigant disadvantage and with an enormous uphill battle.

      Theres no such thing as a free marketer (maybe some crackpot in a shack somewhere). Nobody really wants to live in a society where there are no market restrictions. The only argument is how much and what rules should be implemented. "Let the free market decide" is invariably the cry of people with no more compelling argument to show why things shouldn't be regulated. It's demonstrable fact that a "free market" doesn't always produce an optimal market, not in an abstract economic sense and certainly not in a more humanist moral sense. Therefore, anyone who supports a "free" market over a regulated one should be prepared to show how and why normal competition forces would be superior to artificial ones, and they should also be prepared to define the limits of what they consider "normal" competition.

    50. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      No, it's a market influence tactic. Market control means that the market has no reasonable way of avoiding the pressure. When Standard Oil bought up key pieces of land that prevented their competition from building oil pipelines and thereby effectively choking off their delivery channels, that's market control. In that way it's not much different than using armed thugs to scare away competitors customers. In Microsoft's case, there is little that Microsoft can do to prevent an competing OS from delivering its goods short of controlling PC hardware market.

      "But what about the Microsoft tax?" you might ask. "Isn't Microsoft controlling Dell/Gateway/other vendors by forcing them to ship a copy of Windows with every PC?" Well, I won't disagree that Microsoft uses strongarm tactics to push their stuff, but all those vendors and the customers who buy their software have other choices. If you don't want to pay the tax, go buy hardware from another vendor or build it yourself, then load it with Linux. You may not get what you want (like being able to play WM9 files), but that's your choice because you wanted to save $100. You car doesn't automatically come with free air conditioning just because you live where it's hot - you have to pay for it. So either pay for it or live without.

      --
      If you don't want crime to pay, let the government run it.
    51. Re:Get off it ScuttleMonkey by LordKazan · · Score: 1

      With the ammount you dodge the issue and make false claims about the actual effects of microsoft's tactics I can only assume you work in the microsoft PR department.

      You are a troll at best, and at worst yet another one of those free-market ignorami who don't know the first thing about economics and yet feel their opinion should be respected.

      Learn something about economics before trying to reply again - everything either of us has cited microsoft is doing is a monopolistic tactic - the SAME ones that Standard Oil pulled.

      --
      If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
    52. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      Theres no such thing as a free marketer (maybe some crackpot in a shack somewhere).

      Actually, I have a home in Seattle. :-)

      "Let the free market decide" is invariably the cry of people with no more compelling argument to show why things shouldn't be regulated. It's demonstrable fact that a "free market" doesn't always produce an optimal market, not in an abstract economic sense and certainly not in a more humanist moral sense.

      I respectfully disagree, at least the way that you phrase it. Let me give you an example of what I'm talking about. I'm a libertarian at heart. When I say this, most people automatically jump to the conclusion that I'm a big supporter of the ACLU. And indeed I agree with some of their positions, but not a lot. That's because I'm both a civil libertarian (people free to chose their own paths) and a social libertarian (groups of people free to chose their own society). I extend the same principle to the free market - Individual companies may pursue their own interests, but the market has to be "free" for all players to enter and participate. It's why I'm not a big fan of software patents, especially when they don't meet the "new and novel" test as they should. The fact that a large software company can bully smaller companies into submission by having lawyers defend patents for the blatantly obvious is just wrong.

      optimal market

      I'd really love a definition of this. I'm sure that virtually any government employee will tell you that the "optimal market" is one which is highly regulated and controlled by the government because it ensures consistency and dependability. It's one reason that the US government controls the largest retirement fund in the world. If you're definition of "optimal market" is one in which the greatest number of goods and services exist and are freely traded, then a government controlled market is not optimal. To extend the example above, much of the push to a privatized Social Security system is to allow greater choice in the market with the possibility for greater gains (and losses). So without trying to have a debate on Social Security here, I'm just trying to say that different people will define what is optimal in radically different and often opposing ways.

      --
      If you don't want crime to pay, let the government run it.
    53. Re:Get off it ScuttleMonkey by Saeed+al-Sahaf · · Score: 1

      Excellent troll. It is unfortunate that many in the "Corporate World" will think exactly like this!

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    54. Re:Get off it ScuttleMonkey by arkanes · · Score: 1
      The definition of optimal market absolutely matters. Personally, I think that defining a market by the number of goods and services available is a pretty useless metric. The *quality* of the goods and services provided, as well as the price-quality ratio, is far more important. Standard capitalist theory states that, a free market will produce the best products at the best price. This is clearly false. In fact, I doubt theres any economic policy that could actually consistently create the best products at the best price - controlled markets regularly fail, but in some areas have beat out commercial alternatives (municipal broadband, for example).

      Now, personally, I'm a liberal, I don't think theres any point in having an economy (or a society for that matter) that doesn't provide for the needs of it's participents. So I consider things like the number of people below the poverty line, or who can't afford essentials, and the difference between the top 5% and bottom 5% as being important indicators as well. A "free" market clearly fails to reach the optimum given those standards. Capitalist economies tend to concentrate wealth.

      A *totally* free market, however, doesn't meet *anyones* standards. Even the most rabid of free marketers think that the goverment needs to enforce contracts and agreements.

    55. Re:Get off it ScuttleMonkey by d34thm0nk3y · · Score: 1

      It would be interesting to know why MySQL did business with SCO, maybe on principle they turn no customer away, or maybe a need for money overrode. The latter case might be a legitimate concern for the community.

      SCO sells an operating system (sometimes). Interoperability is something most software producers (and customers) consider a good thing.

    56. Re:Get off it ScuttleMonkey by toddbu · · Score: 1
      Standard capitalist theory states that, a free market will produce the best products at the best price.

      I think that you may misunderstand capitalist theory. My understanding of the theory is that free markets will produce what the free market desires, and that the free market will hopefully desire the best products at the best prices. This is a key distinction because it allows for things like McDonalds. The reason that McDonalds succeeds isn't because it has the best quality food at the best price. Instead is succeeds because you can walk into a McDonalds virtually anywhere in the world and get a consistent experience. The market likes that consistency, and McDonalds offers it to them. Another example is cell phones. The prices suck, but the convenience of not being tied to a landline makes it very attractive to many people.

      Now, personally, I'm a liberal, I don't think theres any point in having an economy (or a society for that matter) that doesn't provide for the needs of it's participents. So I consider things like the number of people below the poverty line, or who can't afford essentials, and the difference between the top 5% and bottom 5% as being important indicators as well. A "free" market clearly fails to reach the optimum given those standards. Capitalist economies tend to concentrate wealth.

      I'd describe my political leanings as "conservative with a mean libertarian streak running throughout the core". What might surprise you is that I agree with what you're saying about wealth and the bottom 5%. For as much as I'm not a fan of the way that we've currently implemented Social Security, I think that the Social Security Disability program is the greatest thing that ever existed. I don't think that as a society we can ask people to bear the huge cost of caring for a disabled relative, especially since it could happen to any one of us at any time. There are times when collectively we need to support each other.

      That being said, I also believe that there are people who want to be poor. They won't tell you that, but when they can't get off their lazy ass to get a job and then whine about it all day long then I have little sympathy. I remember when Wisconsin (I believe) switched over to a welfare-to-work program. I watched an interview on TV (PBS at that!) with a woman who was being paid to scrub hallways so she could get her check. Her comment was "I'm not learning anything this way." My thought at the time was "You're learning to work hard." It was clear that she was capable of doing the work, but her pride had gotten in the way. My hope for her was that she could turn that floor scrubbing job into a good paying job somewhere. I'm sure if she stuck with it then she could.

      A *totally* free market, however, doesn't meet *anyones* standards. Even the most rabid of free marketers think that the goverment needs to enforce contracts and agreements.

      Ok, you got me here. This is probably one of the few areas where I think that the government should step in. Having access to the courts to solve contractual disputes is a good thing. But again, if you think about it in the context of keeping free markets free, then you need to have some mechanism to keep everyone honest.

      --
      If you don't want crime to pay, let the government run it.
    57. Re:Get off it ScuttleMonkey by cloudmaster · · Score: 1

      Boo hoo. I'll bet the local electric company sells electricity to the SCO offices, so therefore electricity is bad! The SCO offices probably have some printers and copiers - the people selling to SCO are bad! I'll bet there are cars from all major American auto manufacturers in the SCO parking lots, which means the auto manufacturers are selling cars to these evil people - the American automotive industry is bad!

      You probably also blame human murders on gun and knife manufacturers too, right?

    58. Re:Get off it ScuttleMonkey by jonadab · · Score: 1

      > No, it's like MySQL _sold_ them something.

      Oh, is that all? And people are *upset*? I'd have thought anything that takes money *away* from SCO would be widely viewed on slashdot as a Good Thing. Now, if MySQL had *paid* SCO money for something, then that would be Bad.

      What am I missing?

      --
      Cut that out, or I will ship you to Norilsk in a box.
    59. Re:Get off it ScuttleMonkey by ray-auch · · Score: 1

      "What am I missing?"

      that a sale involves supplying something in return, not just taking money.

      The fact that taking the 30 pieces of silver leaves the bad guys poorer isn't really the important bit, is it ?

    60. Re:Get off it ScuttleMonkey by ACORN_USER · · Score: 1

      There's probably some under-the-contract-hood indemnity for MySQL in there. I can well imagine that they have a few linux boxes lying around.

  2. Many things by btk667 · · Score: 1

    I have seen many url comparing the two.
    But haven't seen any recent study.

    Is mySQL still the most popular one?

  3. Yawn.... by truckaxle · · Score: 3, Insightful

    This is a prefect flame fest topic - great scheduling for a vacation day. I will venture to guess the posts will be well into the 1000's Now what does it matter if Mysql partnered up with SCO. SCO as a O/S provider is history may a well extract a scraps of meat from the bones.

    1. Re:Yawn.... by IdleTime · · Score: 1

      I don't know about you, but I prefer not to be associated with people or companies that cheat, steal and lie. SCO does all of it and it's reputation... sorry scrap that, they don't have a reputation, they are just criminals.

      Come to think about it, this country has a long history of supporting companies that cheat, steal and lie, so maybe SCO will become a hero someday, crazy as it may sound, but in USA this is a real possibility based on corporate morality or rather lack thereof.

      --
      If you mod me down, I *will* introduce you to my sister!
    2. Re:Yawn.... by Anonymous Coward · · Score: 0

      You guessed wrongly!! So wrong. Wrong is what you eat for breakfast, lunch, dinner, and your bedtime snack. You sleep and breathe wrong all day long.

  4. Popularity by truthsearch · · Score: 1

    MySQL definitely has a lot more mindshare. Therefore it's probably still more popular.

    1. Re:Popularity by mellon · · Score: 4, Insightful

      MySQL is like Microsoft. It's not entirely compatible with the standard, but everybody is using it, so if you want to use their software, you have to use it too. I have a copy of PostgreSQL and a copy of MySQL on my server, because Wikipedia doesn't work with PostgreSQL. I presume this is because the developers started working with MySQL back in the bad old days when it was _really_ incompatible, and their code now contains dependencies on MySQL.

      I don't really know what to say about all of this - these incompatibilities are really frustrating as an end-user of this software, but I understand that it's hard to make things work with both MySQL and PostgreSQL, and resources are limited. What frustrates me is that these incompatibilities create a form of lock-in - once you've based your app on MySQL, you are stuck with it.

      I suspect that if you were to start now, and to use the SQL spec rather than the MySQL documentation as a reference while doing your development, you would wind up with something that was a lot more portable, so this isn't actually an argument against using MySQL. It's more an argument towards sticking to standards when using whatever db you choose, so that when the time comes to use a different DB backend, you aren't faced with a monumental refactoring job.

    2. Re:popularity by Jerry · · Score: 3, Insightful
      He didn't seem to be at all bothered that this the main argument people give for using windows.


      That's probably because those features are part of PostgreSQL and is the main argument for why people believe that PostgreSQL is overtaking MySQL. Also the fact the PostgreSQL can run PL/SQL with only some modifications, and visa-versa.

      --

      Running with Linux for over 20 years!

    3. Re:popularity by winkydink · · Score: 1

      he responded "yes, well, it's the most popular database on the planet".

      If you don't need transactionm support or stored procedures; two things a lot of large-scale, high transaction databases cannot live without.

      It's like saying legos are the most popular building material in the world.

      --

      "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    4. Re:popularity by Bloater · · Score: 4, Informative

      MySQL's biggest problem is that if you try to update or insert with invalid data, in many cases it successfully inserts wrong data. PostgreSQL doesn't do that.

      PostgreSQL has this nice Object-Relational model where tables can be derived from each other, but there are some nasty bugs that mean I think those features are still best avoided.

      Overall, though, I think PostgreSQL is by far the better RDBMS.

    5. Re:Popularity by TheMMaster · · Score: 3, Insightful

      I hate to burst your bubble here, but ALL dbms's are slightly different from eachother, this is largly because the SQL spec leaves room for these kind of things.
      It's not like there is a HUGE difference, as long as no dbms specific procedural language was used (think plsql (oracle)) it's pretty trivial to port an application from one dbms to the other
      The biggest differences are usually pretty subtile and indeed rather frustrating, but by no means hard to solve.
      The biggest and most 'incompatible' difference between postgres and mysql is the autoincrement field really, the rest is just small fish to fix.

      --
      Fighting for peace is like fucking for virginity
    6. Re:Popularity by Billly+Gates · · Score: 1

      And I forgot to say this is why Microsoft took over since we are comparing mysql to Microsoft. :-)

      Sure DOS sucked but hey the tools were for DOS and it was very user friendly since it came on a pc and you could develop quick apps on it. (proprietary though)

    7. Re:Popularity by Infernal+Device · · Score: 1

      The other possibility is to use some sort of intermediate layer such as ADODB to relieve some of the problems associated with specific platform issues. These have their own sets of problems, but we don't live in a perfect world.

      --
      "My God...it's full of trolls!"
    8. Re:Popularity by Donny+Smith · · Score: 1

      >What frustrates me is that these incompatibilities create a form of lock-in - once you've based your app on MySQL, you are stuck with it.

      Nicely said. And the same could be said of many Linux distros. Sure, code and settings ARE portable, but at sometimes prohibitive cost.

      >It's more an argument towards sticking to standards

      At the same time, from what I've read, standard SQL code = non-optimized code.
      Choose the lesser of two evils...

    9. Re:Popularity by petermgreen · · Score: 1

      reagrding mediawiki i belive it does now also work on postgresql.

      afaict there are two main issues with porting php/mysql stuff to php/postgresql, one is the few propietry features of mysql and the other is that if you wan't to support both you have to wrap stuff yourself as php has totally seperate calls for postgresql and mysql

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    10. Re:popularity by ultranova · · Score: 1

      If you don't need transactionm support or stored procedures; two things a lot of large-scale, high transaction databases cannot live without.

      Even if you don't need transactions, you'll still benefit from them in PostgreSQL, since P automatically wraps every statement that isn't a part of an explicitly started transaction inside an implicit "BEGIN...END" block, which should (in theory) make the database proof against sudden power failures and program crashes (since the transaction either happened or it didn't, so the database won't be in an inconsistent state when the program starts again). I don't know if this also applies to reality.

      It's like saying legos are the most popular building material in the world.

      They propably are. I remember when I realized how to build a durable wall from lego bricks - by moving each layer half a brick length sideways compared to the previous layer. Ah, those were the days...

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    11. Re:Popularity by nvivo · · Score: 1

      I suspect that if you were to start now, and to use the SQL spec rather than the MySQL documentation as a reference while doing your development, you would wind up with something that was a lot more portable, so this isn't actually an argument against using MySQL. It's more an argument towards sticking to standards when using whatever db you choose, so that when the time comes to use a different DB backend, you aren't faced with a monumental refactoring job.

      I am against this kind of compatibility. Trying to maintain sql compatibility between different databases works only if you are developing a very simple app. Complex systems with lots of data use complex queries that need good performance and they should use whatever the database can offer, like built in functions, different sintax, different data types and etc.

      I believe there are better ways to accomplish multiple database support using a good software design and abstraction layers. There are things that oracle or postgres can do with one query that you need a stored procedure in sql server, or a big select with a bit of programming with mysql.

      The big difference between database server is in fact the features they offer. If you should not use them, why bother comparing them?

    12. Re:Popularity by jadavis · · Score: 3, Informative

      but ALL dbms's are slightly different from eachother

      MySQL is far away and completely alone in it's flavor of SQL and behavior. There are all kinds of strange things it does, like use the "`" to quote identifiers. Oracle, PostgreSQL, SQL Server, &c. all have their differences. But they all look a lot more like eachother than any of them look like MySQL.

      The biggest and most 'incompatible' difference between postgres and mysql is the autoincrement field really, the rest is just small fish to fix.

      Actually, the biggest differences are regarding types and constraints, in my opinion. For instance, MySQL thinks February 31st is a date, PostgreSQL does not. PostgreSQL enforces constraints, MySQL does not. MySQL NULL handling is non-standard.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    13. Re:Popularity by kryonD · · Score: 3, Insightful

      "I hate to burst your bubble here, but ALL dbms's are slightly different from eachother, this is largly because the SQL spec leaves room for these kind of things."

      I hate to burst your bubble, but the differences have nothing to do with a poorly designed spec. They have everything to do with companies either being too lazy, or too stubborn to adjust to and adhere to the specs. Even M$, who created the ODBC standard fails to adhere 100% to it in both Access and MS SQL.

      In their defense however, DBMS's have often evolved far faster than the specs could keep up resulting in dozens of different ways to do something the specs didn't originally cover. However, my forgiveness ends right where the spec catches up and then the dbms developers fail to add compatibility to their product. The fear that compatibility will leave room open for customers to migrate to a competing product is exactly why the USA is about 2 to 3 years behind in technology right now. Go to NTT Docomo's website and look at their newest line of phones and you will note two very distinct trends:

      #1 The lowest model blows away all US phones.

      #2 They all share the same baseline standard design...which forces them to compete in the non-standard areas...which rewards the consumer with a consistant design and interface and innovation.

      Wake me up when companies (or even OSS project managers) in the US stop screwing their customers with proprietary interfaces designed to lock in their customer base. I really don't measure a product's worth by the number of users it has....otherwise I'd still be using IE.

      --
      I've dirtied my hands writing poetry, for the sake of seduction; that is, for the sake of a useful cause. --Dostoevsky
    14. Re:Popularity by mellon · · Score: 1

      Like many web apps first developed with MySQL, it is indeed possible to make MediaWiki work with PostgreSQL, or so I am told. However, to do so requires an intimate knowledge of the guts of MediaWiki, such that it is really difficult in practice to actually do it unless you have a lot of spare time to kill, and nothing better with which to kill it.

    15. Re:Popularity by timmarhy · · Score: 1

      i hate burst everyones bubble here as well, but how often do you move database packages? db portablity is totally over rated. use a decent database to begin with and you won't have to move to anything.

      --
      If you mod me down, I will become more powerful than you can imagine....
    16. Re:Popularity by mellon · · Score: 1

      No offense, but that's not the problem. I don't mind if the queries are more or less efficient in one database than another, although I would argue that this is a flaw in the database implementation for the slower database.

      The problem is when the SQL code doesn't work on a different SQL engine, not when it's slower.

      Were I you, by the way, I would not brag in public about how enamored you are of non-portable code - it's not good for your job prospects.

    17. Re:Popularity by Marcus+Green · · Score: 1

      It's not necessarily about moving databases, it may be about simply supporting databases. Imagine you are developing a web application. You decide MySQL is decent enough for you and tailor your code for that flavour of SQL. Then megacorp comes along and says they are very interested in buying it but they will only support SQL Server, Oracle or whatever. Then suddenly database portability seems a little more important.

    18. Re:Popularity by Tony+Hoyle · · Score: 2

      When I write code I write a backend to support multiple databases. I have to if I want to sell any product.

      Sqlite for the quick install 'embedded version'
      Mysql/Pgsql for those that use it
      MSDE/SQLServer for Microsoft types
      Oracle for large businesss.
      ODBC for everything else

      Guess which one is the hardest to get working? Luckily Mysql support is EOL now... the license issues have killed it (can't use anything over mysql 3.23 and that doesn't have proper variable binding).

    19. Re:popularity by gizmonic · · Score: 0, Flamebait

      MySQL's biggest problem is that if you try to update or insert with invalid data, in many cases it successfully inserts wrong data.

      While that can be annoying, to be sure, why do people rely on the database to do their data validation? That should be done in the application code long before you ever run an insert or update. If you're trying to insert invlaid data, you're the only one to blame.

      --
      WWJD?
      JWRTFM!
    20. Re:Popularity by crucini · · Score: 1

      And yet, MySQL without proper binding is usually faster than other databases with variable binding and statement cache.

      Or do you want the interface of binding, regardless of the implementation? I do. Perl DBI gives it to you, quoting and interpolating under the covers, and I've written the same functionality in other languages.

    21. Re:Popularity by willdenniss · · Score: 1

      Easy to solve, use an abstraction layer (e.g. JDBC).

      Will.

    22. Re:popularity by Bloater · · Score: 2, Interesting

      > If you're trying to insert invlaid data, you're the only one to blame.

      That would be fine if the database were compiled into the application and strongly type-checked by the compiler. Even small software can't be reliably checked by humans, and the database is connected to at runtime so the compiler can't really do it.

      With schemas this can be done better. The compiler could know the types that the database supports and the software is compiled against the schema specification, then as you connect ot the database, the schema is checked for agreement and the compiler had assured the types (and the database author had provided classes to compile against). Then you can be *reasonably* safe, but shit can still happen (database version changes, nearly compatible competitor is substituted, etc). When that shit happens, you need to know that the database has its shovel ready. Its because of the loose connection between the application and database that the database must provide this assurance and it can't just be left to the application compiler to check everything at compile time.

    23. Re:Popularity by huiac · · Score: 1

      Care to elaborate?

      Most people here are talking about apparently deliberate misfeatures like non-standard treatment of NULL and constraints, poor date handling, expressions with non-standard results, truncation of data, etc. (to which I might add, table 'types' that are non-transpoarent in that they affect features & syntax).

      As a procedural language, SQL itself is so small it's hard to see that whatever non-standard features they make available would have any impact that couldn't also be provided in a more SQL-compliant fashion.

      So, can you provide an example of 'non-standard' MySQL that is better optimized than the equivalent 'standard' SQL on a decent database?

      huiac at internode.on.net

    24. Re:popularity by schovanec · · Score: 2, Insightful
      why do people rely on the database to do their data validation? That should be done in the application code long before you ever run an insert or update. If you're trying to insert invlaid data, you're the only one to blame.

      The DBMS is not validating the user's input. That is the application's job. The DBMS is validating that the data an application is trying to store conforms to the schema. The DBMS is your last hope of having correct data. Your application could be blowing chunks all over the place. As long as the data is correct, then the problem can be fixed.

      In a small web environment this distinction is harder to see. There is usually only one version of the client application in existence. In a larger system you can't always trust the application. Servers in a large server farm may have slightly different versions (e.g. if updates are applied in stages to avoid crashing the entire system because something was missed in testing). Different applications sharing the data (e.g. common data but different needs: sales and management). You might also have a "thick" client application the versions of which are often very difficult to control. If one in-use version validates incorrectly then you can't trust the data anymore, even if the majority of in-use versions are correct.

    25. Re:Popularity by huiac · · Score: 2, Insightful

      I call bullshit.

      While it may not be the best design, SQL *is* the abstraction layer of choice for using an RDBMS. As written it's weird, inconsistent, potentially unparseable and arguably incomplete, but that doesn't mean it's inefficient (arguments about whether NULL values should be allowed notwithstanding).

      I've written SQL for MySQL, Informix (IDS & SE), Postgresql and Oracle. Supporting all of them at once is essentially impossible (on date handling alone), but using the 'right kind of quotes', standard SQL syntax and type names for simple scalars and so on makes the differences minimal in most areas.

      The remainder of the differences range from substantial missing features (stored procedures, foreign keys, triggers) which might rule a specific DBMS out for a given design, and stupid misfeatures which most databases have in some measure (I'll give Oracle a guernsey for 'select ... from dual'), but which MySQL appears to make a specialty of (and appears to have little inclination to fix).

      I've been in the position of taking code originally written for Informix or MySQL and having to port it to PostgresQL or Oracle, and the more standard it looked the easier it was. Why port it if it was working fine? Well, *we* had more than one customer; try telling them that they should install MySQL alongside their Oracle server...

      You refer to built-in functions, different syntax, different data types etc.: SQL provides a standard library of SQL functions, and most good DBMSes allow you to define your own in SQL, C or Java, as well as 'private' languages like PlSQL and PlPgSQL; differing syntax should have no impact on how efficient a query is; and while the standard SQL types are limited, they are sufficient for a wide range of applications, and where there's a genuine need the major players have responded with very similar features (e.g., int8 and 'serial' types) that map well onto each other.

      If you care, and your RDBMS supports views and stored procedures, then there's an excellent chance that you can provide a clean, efficient (within the limits of the DBMS) and consistent interface across a number of RDBMS's; it may take more time than writing a straight-to-MySQL (or whatever) app might, but it will be more portable and maintainable (and for complex apps, it may reduce your coding time in any event).

      huiac at internode.on.net

    26. Re:Popularity by laffer1 · · Score: 1

      Mysql used to have a bad JDBC driver. I found I could not use Prepared statements very reliably with mysql. In fact, I thought it was a java problem for the longest time. I've heard the newer drivers work well.

      Mysql is like redhat.. its commercial and the goal is to make money. I wish people would realize that. There is nothing wrong with it and its what the GPL is all about. The protection is for the user and the person who wrote the software.

      Personally, I chose mysql because it seemed easier to administer than postgresql when I first tried it. I'd use oracle if I could afford it or Microsoft SQL which i'm most familiar with. Oracle and MS SQL do not run on my platform of choice though. (FreeBSD)

    27. Re:Popularity by bani · · Score: 1

      mind not reading from a script next time?

    28. Re:popularity by lamber45 · · Score: 2, Insightful
      You can avoid that problem in MySQL by enabling strict mode. By the way, MySQL 5 also supports triggers and views.

      It's true that MySQL does not have syntax for object-oriented queries. The object-relational model is significantly different from the relational model; there are a lot of applications where it's not needed.

      I guess neither Postgres nor MySQL supports native storage of XML. However, it might not be too hard to implement. 6 years ago, neither database could store GIS data; today, they both can.

    29. Re:popularity by Overly+Critical+Guy · · Score: 1

      Nonetheless, bugs exist because humans are imperfect, and I'd rather the database actually not silently corrupt its own data and instead at least give me a little warning to check for in code so I know something is wrong, instead of just quietly truncating my numbers or happily accepting February 31st as a valid date.

      You don't rely on the database to validate your data, but you do expect it to refuse the statements and let you know when your code is trying to enter invalid data, so that you can fix the code and not be corrupting your database unknowingly.

      --
      "Sufferin' succotash."
    30. Re:Popularity by Overly+Critical+Guy · · Score: 1

      In other words, you have no counterargument to any of his points?

      --
      "Sufferin' succotash."
    31. Re:Popularity by jim_keller · · Score: 1

      >one is the few propietry features of mysql and the other is that if you wan't to support both you have to wrap stuff yourself as php has totally seperate calls for postgresql and mysql

      You should be wrapping your database calls anyway, in preparation for what the future holds. Personally, I've gone so far as to create an abstraction layer in PHP with methods such as select(), order_by(), limit(), etc, that get called like:

      $query->select('something');
      $query->from('widgets');
      $query->where( 'widgetID=10');

      so that I can switch my RDBMS by alterting just the abstraction layer for that RDBMS, not by having to edit my entire codebase. Yes, compatibility problems still arise, but generally, by having such specific functions for query data, I can do clever query generation to handle the incompatibilities between mySQL, PostGres, msSQL, etc...
      Yes, it's less efficient than hardcoding queries, so it's a matter of how important portability is to you. Remember though, it's usually easier to upgrade your hardware than to rewrite an entire app.

    32. Re:Popularity by bani · · Score: 1

      what's the point of arguing with a script? ever tried arguing with a telemarketer? same thing.

    33. Re:popularity by Anonymous Coward · · Score: 0

      As far as invalid data goes, MySQL has different 'modes' (similar to Mozilla's different rendering modes). It has a TRADITIONAL mode which makes MySQL act like a traditional database and instead of futzing with your data, it will throw an error.

    34. Re:popularity by einhverfr · · Score: 1

      As far as invalid data goes, MySQL has different 'modes' (similar to Mozilla's different rendering modes). It has a TRADITIONAL mode which makes MySQL act like a traditional database and instead of futzing with your data, it will throw an error.

      I think you mean "strict" mode which is not suitable for production use yet becuase it is part of 5.0 beta.

      Now even when it comes out, what about things like shopping carts. ISP's are not going to switch on strict mode because it will break many customer applications. So for ecommerce solutions this gets you nowhere fast.

      --

      LedgerSMB: Open source Accounting/ERP
    35. Re:popularity by einhverfr · · Score: 1

      It's true that MySQL does not have syntax for object-oriented queries. The object-relational model is significantly different from the relational model; there are a lot of applications where it's not needed.

      Hardly. There are only two instances in PostgreSQL where there are any extensions for object relational extensions:

      SELECT * ONLY FROM table
      and
      CREATE TABLE () INHERITS()

      THese are the only cases.

      And the "bugs" in these are mostly design limitations. They are not suitable for real O-R work because index entries don't get inherited meaning that an inherited UNIQUE constraint means that the column is guaranteed to be unique within the child table not within the inheritance tree. Also custom workarounds will be expensive performance-wise.

      This being said, the O-R extensions in PostgreSQL 8.1 (especially when combined with rules) will be extremely useful for table partitioning, allowing you to split a table across various physical tables for performance reasons. This is important for data warehousing applications.

      I guess neither Postgres nor MySQL supports native storage of XML

      What do you mean? You mean queries being transfered in or out of XML or storing XML documents and manipulating them? If the later, PostgreSQL has been able to do this for years via extensions in the contrib folder.

      --

      LedgerSMB: Open source Accounting/ERP
    36. Re:Popularity by Not+The+Real+Me · · Score: 1

      Ever hear of Sybase ASE? This is where Microsoft SQL Server originated from. Actually, back then, Sybase's database was known as SQL Server. :-P

      Although their versions of Transact SQL have forked (slightly), Sybase and Microsoft T-SQL is still roughly 98% compatible.

      If your download FreeTDS from http://www.freetds.org/ and use that instead of the Microsft or Sybase libraries and download unixODBC you will be able to develop apps that'll run on most of the *nixes or Windows. And you can switch your DBMS from Sybase to Microsoft (and vice versa) with very little effort.

      Anyhoo, FreeBSD does have a port of Sybase ASE 11.0.xxx which Sybase allows you to work with and last I heard, there were no licensing fees.

    37. Re:Popularity by Decaff · · Score: 1

      In their defense however, DBMS's have often evolved far faster than the specs could keep up resulting in dozens of different ways to do something the specs didn't originally cover. However, my forgiveness ends right where the spec catches up and then the dbms developers fail to add compatibility to their product. The fear that compatibility will leave room open for customers to migrate to a competing product is exactly why the USA is about 2 to 3 years behind in technology right now.

      Hundreds of thousands of developers already write code that is easy to migrate between different database products. Systems like Hibernate and the Java JDO API include the option to use full-featured portable query languages (HSQL or JDOQL). These languages are translated to optimised vendor-specific SQL at run time. (Incidentally, one of the many faults of the hugely over-hyped Ruby on Rails is that it does not include such a portable language, and forces use of raw SQL). This can work very effectively as a huge amount of effort has gone into the efficiency of the generated SQL.

      Pressure for portability has reached the stage where some database vendors (such as Oracle) are now backing new portable APIs (such as EJB3) and are having to focus more on quality, and not tying developers into their SQL dialect.

      There is no need for developers to stick to vendor-specific SQL anymore in most situations.

    38. Re:Popularity by Overly+Critical+Guy · · Score: 1

      what's the point of arguing with a script?

      To see if you actually had a valid reason for calling it a script.

      --
      "Sufferin' succotash."
    39. Re:popularity by zootm · · Score: 1

      While that can be annoying, to be sure, why do people rely on the database to do their data validation? That should be done in the application code long before you ever run an insert or update. If you're trying to insert invlaid data, you're the only one to blame.

      Because at that level, the same validation would have to be carried out by every single application that used the database. Why would you make developers do that?

    40. Re:Popularity by commanderfoxtrot · · Score: 1

      I'm using ADODB for all of my PHP/Postgres work. It's pretty good, but it doesn't yet do proper prepares, unlike Perl's DBI.

      I just don't feel happy making my code database dependent. However, at the same time, my confidence in using Postgres is so much greater than when using MySQL- it just seems more solid.

      --
      http://blog.grcm.net/
    41. Re:Popularity by jedidiah · · Score: 1

      A number of commercial applications support multiple databases, actually. It's not entirely uncommon outside of the "well I just need an embedded db for my MythTV" crowd.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    42. Re:Popularity by wilcoxon · · Score: 1

      Probably the least compatible feature in a database is Sybase's support for multiple return sets (might also be in MS SQL-Server since it originated from Sybase).

      select * from foo
      select * from bar
      go

      is perfectly legal in Sybase. Personally, I think this is a bad thing since no other database I know of supports it (makes porting Sybase programs to anything else really hard unless the coder intentionally avoided this).

    43. Re:popularity by jedidiah · · Score: 1

      Bugs happen. You shouldn't get a corrupt database just because some database developer screwed up. Constructs such as an RDBMS schema exist specifically to prevent this sort of thing.

      This is why Unix is not built like MacOS System 6.

      Bad things are bound to happen eventually and you should prepare for that.

      Your response makes you sound like a MacOS programmer.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    44. Re:popularity by jedidiah · · Score: 2, Insightful

      Why do people depend on the database?

      Easy, it's centralized and easy to manage. This is the same reason that anyone uses a large robust server to begin with.

      It is far easier to lock down one database than n+1 applications and ad hoc query users. Abstraction and modularization is good. This is computer science.

      --
      A Pirate and a Puritan look the same on a balance sheet.
    45. Re:Popularity by Defiler · · Score: 1

      In general I totally agree with your post, and I am definitely a fan of portable data mappers like Hibernate.
      However, in defense of Ruby on Rails (which I like very much), the vast majority of data operations do not require any SQL code, and are freely portable across database platforms. Every Rails app I've built so far runs without modification on MySQL and Oracle.

      Even when you need to do something that requires some embedded SQL, usually it is easy to restrict it to something platform-neutral.
      For example, :conditions => ["blah = ? and whatsit is null", some_blah] ..which should work on anything that even remotely supports SQL, and definitely on everything that ActiveRecord currently has a database driver for.
      Given that ActiveRecord is not trying to solve the same problem as Hibernate, I think the complexity vs. portability tradeoff is worth it.

      Also, at the risk of being pedantic; Ruby on Rails does not depend on ActiveRecord. Many people are using other model layers, such as Og, which defines its own OO query language, a la Hibernate.

    46. Re:Popularity by LDBA · · Score: 1

      A point very well taken. Way too many developers take advantage of special capabilities of the DBMS their using for development purposes. It makes no matter if it's MySql, PostGreSql, Microsoft Sql*Server, Oracle, or DB2. If they just stuck to the standard then the application would care less about the underlying DBMS and there would be a greater demand for the application. The idea of standards like the SQL standard was to make the dbms invisible to the app. Why are we still shooting ourselves in the foot??

    47. Re:Popularity by Decaff · · Score: 1



      the vast majority of data operations do not require any SQL code, and are freely portable across database platforms. Every Rails app I've built so far runs without modification on MySQL and Oracle.

      I would suggest this is simply not the case for applications of even moderate compexity. If you don't use SQL code in Rails you often end up with serious performance problems (such as the N+1 fetch issue) which mature ORMs automatically handle.

      Even when you need to do something that requires some embedded SQL, usually it is easy to restrict it to something platform-neutral.

      I don't find that. Anything serious requires things like subselects and SQL functions. These are not portable. A mature ORM will automatically translate their portable query languages into the specific dialect of the particular database. Why should I use anything less that the full features of what might be an expensive database? Hibernate or JDO allow you to do this yet remain portable. Sticking to some hypothetical minimal subset of SQL is an inefficient waste in my view.

      Also, at the risk of being pedantic; Ruby on Rails does not depend on ActiveRecord

      I keep hearing this sort of thing: Ruby on Rails is fine as long as you don't use it as provided! My response is why is the system as provided so bad?

      As for Og - it may be good, but to suggest I should build serious commercial apps with something that is at a beta level 0.2-0.3 is a bit of wishful thinking.

    48. Re:Popularity by arkanes · · Score: 1

      Does anyone but me get exasperated at how fucking *stupid* it is that we need to do shit like write our own query language because no database vendor will conform to the standardized one, and even if they did the standard is woefully inadequate for many tasks? This is exactly the sort of shit standards are supposed to address.

    49. Re:Popularity by Anonymous Coward · · Score: 0

      "Subtile [sic] and ... frustrating" are not enough to equal "hard"?

      Actually a good point--subtlety and frustration are routine in real-world problem-solving--as ubiquitous as oxygen debt in running: it takes something truly extraordinary to be "hard" for the competent.

    50. Re:popularity by arkanes · · Score: 2, Interesting

      This is the single most common response to people pointing out MySQLs data validation issues, and I think it pretty much sums up both the attitude of the typical MySQL developer as well as the reason for MySQLs popularity: People who totally misunderstand both the theory and importance of databases. Amusingly, this same sector of people (because this argument essentially becomes "don't write buggy code, every") have produced some of the most atrociously written and flawed applications to ever be used on the Internet. Except for sendmail.

    51. Re:Popularity by ckaminski · · Score: 1

      Honestly, what's wrong with using phpODBC?

    52. Re:popularity by Anonymous Coward · · Score: 0

      Object-Relational? You mean a view on a table? Or are they using the ideas of Chris Date and Hugh Darwin? The idea of types and defining something in terms of what it adds or changes from a base is certainly not just an OO idea.

    53. Re:Popularity by Kazin · · Score: 1

      Either "php" or "ODBC", take your pick.

    54. Re:Popularity by Defiler · · Score: 1

      Can you give me an example of something that requires a subselect, rather than an ActiveRecord association (with or without the :include => [] parameter is fine).
      I haven't run into one yet, and I'm writing largeish apps for government customers.
      Are you talking about legacy schemas, or tables designed for use with RoR?

      Please don't feel that I'm trying to attack your position. I'd like to know if there's something ugly waiting for me around the corner.

    55. Re:Popularity by Decaff · · Score: 1

      Are you talking about legacy schemas, or tables designed for use with RoR?

      This does include legacy and current schemas. The way most commercial (and government) database work is that you simply don't get to design the tables for just your app - you get to work with a subset of the tables that you are allowed to access via the database administrator. This is why mature ORMs have mapping files (which are considered excess by RoR) - they help isolate your app from what others are doing with the tables.

      Please don't feel that I'm trying to attack your position.

      Don't worry - I try to debate reasonably even if I think people are trying to do this :)

      I'd like to know if there's something ugly waiting for me around the corner.

      I just don't know - and that is what worries me! What would seriously concern me is that although RoR expresses some good ideas, it is very new and much of what it uses is in beta. I would not use any new product for a large app until it had a few years to mature.

      I use things like JDO/Hibernate with Java, and (very occasionally) PHP because they have been around for years, are out of beta, and the issues regarding their use are well understood. This is NOT the case with RoR.

    56. Re:Popularity by ckaminski · · Score: 1

      No, I meant the ODBC interface in PHP. In general I meant ODBC, but in reference to the topic of the parent (PHP), I tried to allude to the fact that there is indeed an ODBC interface present.

      ODBC may be old, it may have bugs, but thousands of apps were built with it... Why can't we have a generic database-agnostic interface?

    57. Re:Popularity by Anonymous Coward · · Score: 0

      The incompatibilities are not that great. I'm a developer at a company that sells a commercial financial package. We use mySQL as out enterprise backend for our ASP model as well as for larger customers, but for our standard product we simply swap out mySQL for Jet (Access). We've even tested on MSSQL when we had a customer that thought they had to have it, they went with mySQL though after testing showed better performance and the IT guys signed off on it as acceptable. All in all it's not very hard to write the small amount of compatibility code needed.

    58. Re:Popularity by ralatalo · · Score: 1

      I argue with telemarketers all the time... so what was your point?
        I don't how ever arge with answering machines....

  5. Another question by Eightyford · · Score: 4, Insightful

    Sure it's slashdot and we all love free software, but how do these two compare with oracle, sql server and other non-free db's?

    1. Re:Another question by Orkie · · Score: 1

      Well, I don't like MS MSQL Server but that is just me (nothing to do with it being Microsoft of non-free, it just doesn't suit me).

    2. Re:Another question by Anonymous Coward · · Score: 2, Informative

      Not really. Oracle has the 'non benchmarking' clause that prevents you from doing that. If people were able to compare it to, say, PostgreSQL, and publish the results you'd see a lot pgsql boxes replacing expensive Oracle licenses. MS's SQL server is a total joke.

    3. Re:Another question by Jerry · · Score: 4, Interesting

      PostgreSQL compares very well to Oracle.

      I use PostgreSQL as a test database against which I write and test QT applications. I can switch an app between the two backends by changing only a few lines of code and recompiling, or I can build the switching capability into the app. Using PostgreSQL reduces the number of access licenses required for Oracle, or doesn't waste existing connections.

      If I had my way I'd use PostgreSQL as the primary database, but some folks believe you've gotta pay money or the app isn't any good. As long as it's their money and not mine.

      --

      Running with Linux for over 20 years!

    4. Re:Another question by Dogtanian · · Score: 4, Insightful

      Oracle has the 'non benchmarking' clause that prevents you from doing that.

      Then arrange to have the benchmarking done in a country which won't uphold anti-competitive bullshit clauses (and when Oracle protest that the license lets them sue the guy in the jurisdiction of Buttfuck, Illinois, will tell them where they can stick their extradition request).

      Although I reckon such a case (brought by Oracle) might still get thrown out in a US court, I wouldn't bet my life savings on that, and the US legal system means you're unlikely to get fees paid if Oracle lose (does this *ever* happen in the US?); a great way for the large company to effectively win by attrition if the benchmarkers don't have that much money.

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
    5. Re:Another question by ron_ivi · · Score: 5, Informative

      This page is the best document I've seen comparing each of the majordatabases (Oracle, Postgresql, DB2, MySQL, SQL Server) not directly against each other, but against the SQL Standard. In cases where at least one of the databases differs from the standard, this guy's article shows both the SQL called for by the standard, and how each of the implementations may either follow or deviate from the standard.

    6. Re:Another question by Trigulus · · Score: 2, Insightful

      A joke in what way? I have run several MS-SQL servers for many years and the only two things that continualy bother me is the lack of being able to include an auto-numbered column in results without using something expensive like functions and the lack of paged (limit) result sets. I am however in the process of migrating to PostgreSQL.

      --
      If something exists that does not need a creator (god) then why must the cosmos need one?
    7. Re:Another question by clambake · · Score: 2, Funny

      They don't compare very well at all... Oracle doesn' hold a candle to postgres.

    8. Re:Another question by Anonymous Coward · · Score: 0

      Why is SQL Server a joke? I've built a few apps around this and Analysis Services, its fast, very stable and has stupidly easy to use management tools.

    9. Re:Another question by LurkerXXX · · Score: 1, Informative
      Compares very well to Oracle? In what metric?

      Please, Oracle has a ton of features that just aren't there in PostgreSQL. For features a mom&pop shop need, Postgres is usually fine. But for serious enterprise work PostgreSQL is not anywhere on the same playing field as Oracle.

      I'm not dissing PostgreSQL. I like it, and I use it. I also use MS SQL server and when I have no other choice, MySQL.

      The feature list difference between each of the databases is quite large. Simply saying "PostreSQL compares very well to Oracle" is NOT informative.

    10. Re:Another question by Anonymous Coward · · Score: 0

      MS's SQL server is a total joke.

      -1, Troll.

      You're basing this on what? It's fast, scalable, easy to maintain. Please share your experiences that have led you to call MS SQL Server a "joke."

    11. Re:Another question by shywolf9982 · · Score: 1

      I can ask you, just out of curiosity, how MS-SQL compares to the other players? Some of my customers want to use it for their solutions... should I issuade them or let them go (or get all my work on MS-SQL? Jokin ;))

      --
      nbody2002:If you can read this you may be addicted to the internet
    12. Re:Another question by Stinking+Pig · · Score: 4, Insightful

      SQL Server gets a lot of flack on /., I'd be interested to know why? I've worked a fair amount with it, Oracle 8 and 9, Postgres, and a little bit of MySQL. I've also done extensive benchmark testing of SQL/Oracle/Postgres handling the same load on the same hardware (shh, don't tell Oracle :).

      My experience leads me to beleive the following things:
      1) MS-SQL is a high quality database that is ridiculously easy to set up, tune, and maintain. It is also very expensive.
      2) Postgres is a high quality database that is ridiculously easy to set up and maintain, but fairly difficult to tune. However, its performance is just as good as SQL server as long as you stay away from nested loops(*). It is also fairly inexpensive (free license, but increased TCO).
      3) Oracle is a pig, and it requires a professional, certified swineherd. If you spend an amazing amount of money on licenses, gear, and certified DBAs you will presumably get good performance; I however was never able to get it past 60% of the performance of MS-SQL or Postgres.

      (*) Nested loops are like candy to SQL server, and I've heard this is the same for Sybase (understandably). Deep sets of nested loops will kick the other databases I've tested in the teeth. Given an instruction with several nested loops and 16 million rows of data, I got results from SQL server in 5 minutes, results from Oracle 9 in an hour, and results from Postgres in 18 hours. This was a year ago and Postgres has changed, so it might be better now. Does MySQL handle them well?

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    13. Re:Another question by Herschel+Cohen · · Score: 1

      I too have an overall unfavorable impression of MS's SQL Server. Compared to Sybase, they [MS] have added a lot of features to the "shared" Transact-SQL language, which is used in both to write stored procedures and creation of tables, indexes, triggers and constraints (for example). Some added real advantages, while their attempts to stress their independence from which their RDBMS sprung has led them to ruin some of the best feature in Sybase. That is, the temporary tables. Other "features" just leave me a bit dizzy.

      Originally, my desire was to use Oracle, because it was and seems still to be the most popular (and had the reputation of being the most powerful), however, when offered the opportunity to work on Sybase I accepted. Later when I began to study on my own the Oracle PL/SQL syntax, I was struck on how much cleaner, more elegant Transact-SQL was. Moreover, this was despite my liking the Oracle syntax structure that was nearer to other past programming experience. Now having dabbled in Perl, Python and PHP my previous syntactical preferences play no role. Given the opportunity I would work with any of the three, but I still think I would prefer Sybase.

    14. Re:Another question by Herschel+Cohen · · Score: 1

      RE: "... has stupidly easy to use management tools."

      You have hit upon a great truth. It can invite individuals too unskilled to operating a serious RDBMS. Moreover, this same group might not recognize their lack of skills, because any "fool" can do it.

    15. Re:Another question by kimanaw · · Score: 2, Informative
      ...but some folks believe you've gotta pay money or the app isn't any good.

      There are good reasons to pay someone for support, if the people you're paying know their stuff. If you're building enterprise level, mission critical data warehouses, you'll want immediate access to expert help when things go horribly wrong. And Sorbannes/Oxley reinforces that need.

      For those seeking paid support, there are several companies working to do interesting things with Pg:

      • GreenPlum also working to enhance Pg with the Bizgress project
      • EnterpriseDB - working to make Pg interoperable w/ Oracle tools
      • Netezza - MPP appliance h/w running a modded version of Pg

      There are some other outfits dedicated to Pg support, but I can't recall the particulars...

      Meanwhile, MySQL still seems to be having difficulty getting stored procs and real views released...5.0 is starting to make Longhorn's development schedule look like a quarterly maintenance release.

      It's also interesting that TFA didn't mention the rise of alternatives ranging from SQLite (which pretty much does everything that folks used MySQL for in the first place, but wo/ any license confusion), to Firebird, to the recently open'd Ingres.

      --
      007: "Who are you?"
      Pussy: "My name is Pussy Galore."
      007: "I must be dreaming..."
    16. Re:Another question by killjoe · · Score: 1

      Why do they always compare mysql and postgres anyway. Ingres and SAPdb can both compete oracle on a feature for feature basis much better then mysql can and so can firebird.

      Wake up people there are more then two open source databases and some of them enterprise ready TODAY and have been in heavy production use by fortune 500 companies for a long time.

      --
      evil is as evil does
    17. Re:Another question by killjoe · · Score: 1

      Why not use SAPdb or ingres. Both are open source and both have virtually every feature you are likely to need.

      --
      evil is as evil does
    18. Re:Another question by zufar · · Score: 1

      MySQL and Oracle compare like dolphin and SSN Seawolf.

    19. Re:Another question by FlopEJoe · · Score: 1

      OTing all the way but... you recompile to change DB backends??!? We use registry settings or (more often these days) config files. When we're past the beta and really feeling froopy, we add it as a user or admin option, changable from within the program.

    20. Re:Another question by LurkerXXX · · Score: 1
      It's really hard to boil it down since there are so many metrics and variables. Tools, features, learning curve, performance both on small and large scale, clustering, apps it needs to interact with, yadda, yadda, yadda. Basically you have to go with the saying 'use the right tool for the right job'. For some jobs that's going to be one DB, for others it will be another. You can always get a trial copy of SQL server to test vs the other databases you are considering to see what fits the bill.

      Franky, and this is extremely generally speaking, for features and scalability, I find it just above PostgreSQL, but well below Oracle. MS SQL has been well ahead of PostgreSQL feature wise for years (uptatable views, PostgeSQL's need for vaccuming, etc, etc), but PostgreSQL is starting to catch up. Then again MS is about to release a new version of their SQL server. I haven't had a chance to play with the beta, so I don't know what they will be bringing to the plate.

      It's a love-hate thing with SQL server. I like their tools, but really don't like they ways they handle some things like date/time/timestamp, etc.

      If they need to tie it into other MS apps, access, etc, or think down the road you might use portal server, etc, it's not a bad way to go. Should you let them use it? It depends on their needs.

    21. Re:Another question by a11 · · Score: 0

      True, true. I personally live in Buttfuck, IL, and people get sued by Oracle all the time. Contrary to the name though, we don't enjoy the ass sex nearly as much as the infamous 5th musketeer, Dogtanian. Now bend over bitch.

    22. Re:Another question by Enrico+Pulatzo · · Score: 2, Insightful

      My biggest beef with SQL Server is that I'm used to using PostgreSQL and like things such as SELECT * FROM tablename LIMIT 5 OFFSET 20 to get a partial results list. With SQL Server I can select the TOP 5 results, but cannot offset them server side, which means I have to send more data to my client program which I don't wanna do. It's got a few little foibles other than that that bug me, but none of them come close to bothering me as much as the LIMIT/OFFSET one.

      (secretly posting this to lure someone into refuting/solving my problem)

    23. Re:Another question by Eunuchswear · · Score: 1

      Could you please translate this into standard terminology?

      What's a "loop"?

      --
      Watch this Heartland Institute video
    24. Re:Another question by ttfkam · · Score: 2, Informative
      Damn! DB2 looks damn good in that comparison.

      I loved the CHAR type section, specifically the MySQL entry:
      Breaks the standard by silently inserting the string, truncated to specified column CHAR-length.
      (It's actually not completely silent, as it issues warnings if values were truncated: If you manually check for warnings, you will know that something bad happened, but not which of the rows are now invalid.)
      Beautiful.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    25. Re:Another question by dotgain · · Score: 5, Interesting
      Get over yourself. If a DBA fails to "recongnize their lack of skills", maybe they're doing just fine with the management tools. If his skills are so lacking he'll screw up his own database eventually.

      Creating graphical tools to enable more people to do more things easier is a part of Microsoft's business model. SQL Server Enterprise Manager etc. are just examples of where they've succeeded here.

      Personally I'd love to see an open source equivalent of these tools, the offerings I've looked at so far are unfortunately lacking.

      And don't give me crap about being a click-and-drool reboot monkey. I'm sick of typing SQL to get things done, when I can grant permissions by picking users from a list and ticking the right boxes.

      Did you use telnet to post your slashdot comment? No, you used a graphical browser. Because you don't want to type the http request, and the graphical browser presents the HTML to you in a way that is more natural and effective for you.

      Seeing me use Enterprise Manager does not make my co-workers think that they could do my job just as easily. They do not end up thinking any "fool" can do it.

    26. Re:Another question by Craig+Davison · · Score: 1

      If you want rows 10-50, try this (assumes that tablename has an ID column):

      DECLARE @temp TABLE (ID INT IDENTITY (1,1), tableID INT)
      INSERT @temp(tableID) SELECT TOP 50 ID FROM tablename
      SELECT tablename.*
      FROM @temp, tablename
      WHERE @temp.tableID = tablename.ID
      AND @temp.ID > 10

    27. Re:Another question by tarquin_fim_bim · · Score: 0

      I bet awk and a flat ascii file would have got the same results in 2 minutes. This kind of fantasy scenario result is easy to cook up, but not really using the databases for what they are intended.

    28. Re:Another question by Anonymous Coward · · Score: 2, Interesting

      SQL server gets bashed on slashdot just because it's made by microsoft. If it's linux/FOSS oriented, then it's cool n stuff. This is the slashdot mindset.

      Oracle is not only more complicated than SQL server, but much more expensive to buy/maintain/administer (than not only SQL server but pretty much every other DB I've used).

      Price comparison between Oracle 10g Enterprise Ed vs SQL server 2000 Enterprised Ed; with management tools + advanced security features + business intelligence features (OLAP); for a 2 cpu box (which aren't dual core - because if they're dual core then double the oracle costs - only them counts cores as separate CPUs):

      Oracle: 192000$
      MS SQL: 39998$

      Nearly 5 times the price (not just like 50% or such which would already be significant). At that price I'd expect to get a LOT more than I'm actually getting. Plus, Oracle on that same hardware won't actually be faster. Oracle may have a couple extra nice features, but nothing to warrant paying 5 times as much for. Not counting that for our Oracle DBs, you'll have to pay a lot for a competent DBA (senior oracle DBAs make a killing and are in shortage too).

      SQL server routinely wins on all kind of benches against Oracle, it's usually (always?) FAR cheaper, much easier to use and administer, more widely known (so many MS certified kids know MS SQL vs the few who know oracle), SQL server is much better integrated with Visual Studio for internal apps (winforms or asp.net - using SqlClient) and everything, SQL server's enterprise manager is much better than oracle's tools, and it offers all most big corporations need (there's nothing in oracle we're really missing).

      I'm sick of trolls who've never seen or tried SQL server and bash it for no reason at all. It's a VERY GOOD database, lots of big corporations use it (we do) and are very happy about it.

      We've actually considered other databases as well (like Matisse), and there's LOTs of others we'd have picked over oracle if it wasn't for SQL server (Postgres included). Oracle just doesn't make sense to use in 99% of cases, it's just too fucking expensive.

    29. Re:Another question by nogginthenog · · Score: 2, Insightful

      Erm, MS SQL *is* scalable. Do you have at an iota of knowledege or experience on the subject? How much does pay you to post these lies? Come on, at least provide some detail for your arguement! MS SQL is perfectly scalable here for me.

      I'm normally MS fan but MS SQL is an very good (if expensive) tool (but then, they didn't write it, but that's another story).


      Escuse any typos, I'm drunk...

    30. Re:Another question by Anonymous Coward · · Score: 0

      Yeah that seems really efficient and well-maintainable code. Keep up the good work. What is this 1965? We might as well be writing directly to the disk API.

    31. Re:Another question by Stinking+Pig · · Score: 1

      I'm a cut-n-paste SQL writer, so I may go off into left field here quickly...

      The condition I was referring to, which was called nested looping by the DBAs and development lead at the company I worked at, is the condition where one query causes additional queries to be performed. Think queries against dynamic view tables. In this case, the nightmare query went four or five levels deep. I recently saw an Oracle trace in which a data view was unrolling to 88 levels deep...

      Keep in mind this was over a year ago and it probably doesn't represent best coding practice. However, the most popular supported platform performed just fine with it, which tends to make a company loathe to spend much time finding workarounds for the other platforms.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    32. Re:Another question by Jaime2 · · Score: 1

      Food for thought, but of course not an end to all discussion:
      http://www.tpc.org/tpcc/results/tpcc_price_perf_re sults.asp

      This is a price/performance benchmark. It is mostly supported by hardware manufacturers, so it's less likely to be influenced by Microsoft's or Oracle's bank accounts. Notice that in a price/performance benchmark, free DBMS don't even show up. The most obvious conclusion to be drawn is that free choices require more expensive hardware to get to the same performance level. I'm quite certain that if HP could leapfrog over Dell by using MySQL or PosgreSQL, they would. Also note that RedHat and SUSE made it on the list. They aren't anti-open source.

    33. Re:Another question by Anonymous Coward · · Score: 0

      "If his skills are so lacking he'll screw up his own database eventually."

      Oh, surely they do! Don't you remember slammer worm?

      There were no way such a worm could be able to infect servers in the tens of thousands unless average ms-sql dba is fucking incompetent.

    34. Re:Another question by einhverfr · · Score: 2, Informative

      You could also use the server-side cursor and scroll forward without sending that info to the client.

      --

      LedgerSMB: Open source Accounting/ERP
    35. Re:Another question by Anonymous Coward · · Score: 0

      Just because you're clueless doesn't mean it's not the right way to do things. This stuff is used quite often, including inside stored procedures.

      This is why you're flipping burgers instead of being a DBA (or working with SQL at all)

    36. Re:Another question by NickFortune · · Score: 5, Interesting
      Compares very well to Oracle? In what metric?

      Please, Oracle has a ton of features that just aren't there in PostgreSQL

      "What metric" is the right question. But I'm not convinced that the best answer is "comparative length of feature lists". One man's feature is another man's bloat, after all.

      I've been writing database apps for a living since 1984. I've worked on trading systems for stockbrokers and multinational merchant banks; I've worked for telecoms giants and for manufacturers. I can't think of a single oracle feature that I've ever needed to use that wasn't available in PostgreSQL.

      Admittedly, this has a lot ot do with my style - I'm old school enough that I write my logic in C, C++ or Perl and use the database purely for storing and retrieving data. DBMS vendors (and some database researchers, to be fair) would like coders to do program purely with database packages. I've always though this a supremely boneheaded idea - I trust database designers to design databases, but not progamming langauges thank you. However, if that approach appeals, then you probably need a lot more features than I do.

      But they ain't necessary, and it most assuredly is possible to write non-trivial real-world apps using the PostgreSQL feature set.

      --
      Don't let THEM immanentize the Eschaton!
    37. Re:Another question by Craig+Davison · · Score: 3, Interesting

      The only rows that would get sent back from the server are the ones you want; the temporary table exists server-side.

      Yes, you could use a cursor instead, but to avoid problems if the table gets updated while your cursor is open, you'd either have to lock the table or deal with errors from the server.

    38. Re:Another question by megalomaniacs4u · · Score: 1
      Admittedly, this has a lot ot do with my style - I'm old school enough that I write my logic in C, C++ or Perl and use the database purely for storing and retrieving data. DBMS vendors (and some database researchers, to be fair) would like coders to do program purely with database packages. I've always though this a supremely boneheaded idea - I trust database designers to design databases, but not progamming langauges thank you. However, if that approach appeals, then you probably need a lot more features than I do.
      Amen!

      I hate stored procedures, they may be useful when the DB designer has borked the design, but just redesign the damn thing already! There is no other sane use for them.

      (wishing I had mod-points...)

    39. Re:Another question by loconet · · Score: 1

      "MS's SQL server is a total joke"

      Care to elaborate? I've heard from many ex MySQL/PSQL users that MS SQL is far from a joke. I guess they are wrong? What makes MS's SQL server a joke?

      --
      [alk]
    40. Re:Another question by ultranova · · Score: 1

      Not really. Oracle has the 'non benchmarking' clause that prevents you from doing that.

      Well, I for one believe that Oracle knows their own product best, and take their apparent lack of faith in said product into heart :).

      After all, if Oracle believed that their DBMS would perform favourably compared to other databases, why would they forbid this ?

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    41. Re:Another question by einhverfr · · Score: 1

      And also something like:

      Select * from mytable order by mycol limit 100 offset 10000000;

      is going to be very memory intensive on MS SQL....

      --

      LedgerSMB: Open source Accounting/ERP
    42. Re:Another question by Anonymous Coward · · Score: 0

      A lot of big companies run Windows 2000 and XP too, that doesn't make it a reliable or secure operating system.

      (Posted by a troll who knows nothing about MS-SQL)

    43. Re:Another question by QuietLagoon · · Score: 1
      This is a price/performance benchmark. It is mostly supported by hardware manufacturers, so it's less likely to be influenced by Microsoft's or Oracle's bank accounts. Notice that in a price/performance benchmark, free DBMS don't even show up.

      All that shows is that the free DBMS's do not have a lot of marketing money behind them, marketing money that makes the product more expensive than it needs to be.

      Additionally, why pay for TPC capability when you don't need it?

      So that's two holes in your argument.

    44. Re:Another question by Anonymous Coward · · Score: 1, Interesting

      This page is the best document I've seen comparing each of the majordatabases (Oracle, Postgresql, DB2, MySQL, SQL Server) not directly against each other, but against the SQL Standard.

      Who cares if they support the standard to the letter or not? Standard conformance != useful performant scalable database.

      In most of these cases the standard has been playing catch-up: they've only recently added features that T-SQL and Oracle's extensions have had for years, and with a different syntax. There's no one right set of syntax or programming methodology for these databases because they're all very different beasts.

    45. Re:Another question by Anonymous Coward · · Score: 0

      I can't think of a single oracle feature that I've ever needed to use that wasn't available in PostgreSQL.

      AFAIK, neither MySQL nor PostgreSQL let me alter a live database without pausing write operations to that database. If Oracle can do that, then that's a feature where it wins.

      I'm old school enough that I write my logic in C, C++ or Perl and use the database purely for storing and retrieving data.

      Yeah, me too, though it's largely due to that limitation (along with some others I don't really expect out of a database). Of course, using a DB for that purpose is basically overkill. In fact, I could accomplish pretty much the same thing by just installing a reiserfs filesystem. But that would require a kernel module, and wouldn't be nearly as portable. I could use a b-tree library and some code to store variable length data, but it wouldn't work in pretty much every language. So I use mysql.

    46. Re:Another question by Anonymous Coward · · Score: 0

      I make my living as a SQL Server DBA/developer. As far as I'm concerned, it's the killer app that makes putting up with Windows O/S worthwhile.

      The apps I work on are C/S, have under 200 connections with transaction rates less than 1/sec, and DBs under .5TB. Some of them started life as MSAccess programs and eventually ballooned out of control and into unreliability.

      I don't know about FOSS DBMSs - my employer won't go there yet. I need stored procedures and triggers for what I need to do. FOSS seems to be getting there, and sometime I'd like to try something on a proof-of-concept basis just to show that it can be done.

    47. Re:Another question by aftermath09 · · Score: 1

      What nested loop query are you referring to, and have you invested time into performance tuning the query?

      You realise that some people invest their whole lives towards this right? they're called dbas and they get paid a crapload to make sure oracle doesn't run queries in "an hour" as you put it

    48. Re:Another question by Saturn49 · · Score: 2, Interesting

      I've recently ported an mid-size level enterprise application to both MySQL and Oracle from MS SQL. Amongst this was a data layer in C# and about 200 stored procedures. I have this to say:

      Besides the null/empty string thing, converting to Oracle was a breeze. Oracle even provides a migration wizard, that, with a little tuning, converted most of the stored procedures automatically.

      On the other hand, working with stored procedures in a beta version of MySQL 5.x was a huge pain. The utilities didn't support them well, and crashed constantly. I eventually gave up trying to use the included utilities and stuck with the console. I would think beta meant "most usable", but that was nowhere near the case.

      The .NET connector was buggy as heck. Just getting a stored procedure to run took me two days due to a case sensitivity problem. The error messages were hugely cryptic (stored procedure not found actually created a message like "Invalid attempt to access a field before calling Read()"). I had to dig down into the code and make fixes myself to get a reliably working connector, since it didn't handle all whitespace between parameters in a stored procedure properly.

      As mentioned elsewhere, MySQL has no problem inserting bogus data into fields, such as 00/00/00 00:00:00 for a date/time. That wouldn't be so bad, except it completely borks up the .NET connector when trying to read that data (it throws an exception and won't return any data.)

      Now, some of this I'd rack up to it being a beta, which is fine. Beta software has bugs. BUT, the length of time it took to get those bugs recognized and fixed was over a month! (see bugs 9722 and 9668.) It took another 2 months before those fixes were included in a release. One was erroneously marked as duplicate, even though there is no other bug in the system (earlier or later) describing the same problem. Requests to find out what it was "duplicating" went ignored. I have no idea if that bug is actually fixed or not now. I'd expect a company with a product in beta to be responsive to people putting it through its paces, and acknowledge and fix bugs quickly. Neither happened.

      The kicker was when we contacted MySQL to get some sort of developer license. We wanted to include the .NET connector in our general release, since our data layer compiled against it. Their own sales people were clueless as to how to go about such a thing and eventually concluded it wasn't possible. What sort of company makes a developer component that you can't license?

      We finally gave up on MySQL. We were 90% done converting, ran up against the licensing wall and simple dropped the project. We may revisit when 5.x is released and stable if they actually have some sort of developer license for their COM/ODBC components.

    49. Re:Another question by Anonymous Coward · · Score: 0

      Check out postgres, it's out on windows now.

    50. Re:Another question by dcam · · Score: 1

      As a matter of interest, does this mean that you leave RI out of the hands of the database? Do you use SQL to manipulate the data (it is after all a set based language), or do you do this client side?

      --
      meh
    51. Re:Another question by Jaime2 · · Score: 1

      This isn't a scalability benchmark, it's price/performance. Some of the system on the list are pretty modest. One of the HP systems is only a $4,000 server with a small truckload of drives attached. If you aren't at least in that ballpark, you shouldn't be worried about which is best because any server you'd put together would perform just fine.

      As for money, it was all HP and Dell's money that made up this list. Both of them would do whatever it takes to make a system that would outperform the other. MySQL and PostgreSQL wouldn't have to cough up a dime, they'd just have to be faster on the same hardware.

    52. Re:Another question by Mr+Bill · · Score: 1

      PostgreSQL has had updatable views for quite a while now (at least as far back as 7.2) through the Rule System. The rule system is powerful enough to allow you to update ambigous insert or update statements in a view that may join across multiple tables. One INSERT/UPDATE statement can be rewritten into multiple updates or inserts into multiple tables.

      There may be other things that MS-SQL can do that PostgreSQL can't (I haven't used MS-SQL so I have no knowledge there), but I just wanted to clear that one up.

      As for vacuuming, it hasn't really bothered me. Especially now that the autovacuum daemon does the work very efficiently for you. And before that, a cronjob always did the job.

    53. Re:Another question by dcam · · Score: 1

      One brief opening comment, as far as I am aware LIMIT is not part of the SQL standard (I haven't checked the more recent standards). This is also a feature I have personally requested for the new release of SQL Server. As I am some random guy off the web, I don't imagine that that holds any weight with Microsoft.

      There are a number of solutions to this problem, unfortunately I would characterise most of them as hacks.

      1. Your first option is to write a mess of dynamic SQL. The only thing SQL Server has that is close to this is TOP. To make life just that little bit easier, TOP does not allow you to limit by a variable, hence the dynamic SQL. Effectively you write something like this. I've written this off the top of my head, so it is probably wrong:

      DECLARE @Start Int, @End
      SELECT @Start = 10, @End = 20

      DECLARE @SQL VarChar(8000)

      SET @SQL = 'SELECT TOP ' + CAST((@End - @Start) AS VarChar(100) + ' MyID FROM (SELECT TOP ' + CAST(@End AS VarChar(100) + ' MyID FROM MyTable ORDER BY MyID DESC) ORDER BY MyID ASC'

      EXEC(@SQL)

      Yuck. Dynamic SQL is teh suck.

      2. You next, better option is to use a temp table. Something like this:

      DECLARE @Start Int, @End
      SELECT @Start = 10, @End = 20

      CREATE TABLE #IDs
      (
      RowNum Int Identity,
      MyID Int
      )

      INSERT INTO #IDs
      SELECT MyID
      FROM MyTable
      ORDER BY MyID DESC

      SELECT *
      FROM #IDs
      WHERE RoNum BETWEEN @Start AND @End

      DROP TABLE #IDs

      This is a cleaner solution, but obviously not a reasonable option if the table gets large.

      3. The last option is one I've never really liked, so I can't explain it as well. From what I recall, it is a half-solution, where you use ROWCOUNT to limit the reaults returned. I'd have to hunt down an article on the subject.

      Summary: so there is no nice, clean, neat way to do this I am afraid. Someone else has suggested that you use a cursor. Ignore that advice. There is very, very, very rarely excuse to ever use a cursor on set oriented data.

      I think I have access to a beta of Yukon so I'm not sure if they have offered a comparable feature to LIMIT. I darn well hope they have.

      --
      meh
    54. Re:Another question by Herschel+Cohen · · Score: 1

      RE: " Get over yourself."

      Well if I were that pretentious I would have added a bonus point. Moreover, I could mention experience that probably surpasses yours but I would never describe myself as a backend database administrator (DBA). Moreover, I have encountered a number of very dense people that could not even conceive of how uninformed they truly were. When I wrote the note I was thinking of that sort of person, because machines with easy GUI's seem to attract those types. I have several friends that are active users of SQL Server, that I consider to be more skilled both as programmers and in their understanding of database theory. I perhaps should note, however, I was never trained to be the application database programmer I describe myself currently. If, however, you wish to match my academic training and experience (I only have two degrees) we will see which of us is over impressed with themselves.

      Regarding MS marketing, do not take the Enterprise adjective too seriously. Furthermore, the graphical browser it's an alpha version that on my machine is more stable than the current stable release. Hint and it's not IE.

    55. Re:Another question by Pig+Hogger · · Score: 1
      Not really. Oracle has the 'non benchmarking' clause that prevents you from doing that. If people were able to compare it to, say, PostgreSQL, and publish the results you'd see a lot pgsql boxes replacing expensive Oracle licenses.
      Yeah, sure. Okay, let's do some Oracle benchmarking, and I'll be glad to publish them on my own web server. Oracle can then try to sue me...
    56. Re:Another question by Anonymous Coward · · Score: 0

      A common use of such a query is an exploded parts list or somesuch. There's some good recent contributed code for PostgreSQL that makes use of GiST indexes to allow you to manipulate hierarchical data of this sort. I can't give you any performance data, but I'm sure it performs much better than unrolling the data in the procedural manner you describe.

    57. Re:Another question by dotgain · · Score: 1
      What. The. Fuck.??

      Well if I were that pretentious I would have added a bonus point. Wha?!

      Moreover, I could mention experience that probably surpasses yours ...

      Don't worry. That you're so experienced you can take if for granted any given person that argues with you is less so, leaves us in no doubt of your superior intellect.

      [rebuts point that was never made, re DBA]

      Moreover, I have encountered a number of very dense people that could not even conceive of how uninformed they truly were.

      Wow. It's a wonder they can even breathe eh? So you've met a few dorks. Big deal.

      I perhaps should note, however, I was never trained to be the application database programmer I describe myself currently.Of course not, as we have been shown, you're naturally brilliant! If, however, you wish to match my academic training and experience (I only have two degrees) we will see which of us is over impressed with themselves.

      Regarding MS marketing, do not take the Enterprise adjective too seriously. Furthermore, the graphical browser it's an alpha version that on my machine is more stable than the current stable release. Hint and it's not IE.

      Holy shit. You're so smart your computer runs alpha versions more stable than mere mortals like me can run stable versions. I clearly don't stand a chance in this arguement, since my browser's 10 times more likely to crash, to say nothing of you out-doing me in degress. Not that you were trained, though. You did them while waiting for your five wives to pick something to wear, right?

      Thanks mate, you've put at least a little humour into an otherwise dull day for me.

    58. Re:Another question by Pig+Hogger · · Score: 1
      "MS's SQL server is a total joke"
      Care to elaborate?
      Sure. At school, we worked on MS SQL server and we had lots of fun.

      (More specifically, I got an A for not doing my session project because it was "too much" for the class MS SQL server. But we got the A anyways because when the prof looked at the SQL code, he clearly saw that I digged the matter at hand, and he also did not expect that making the database multilingual (with as many languages as you want) with a built-in dictionnary actually made the needed database much simpler, too (but at the price of more data indirection - hence the too big a load problem)...

    59. Re:Another question by Pig+Hogger · · Score: 2, Informative
      Admittedly, this has a lot ot do with my style - I'm old school enough that I write my logic in C, C++ or Perl and use the database purely for storing and retrieving data. DBMS vendors (and some database researchers, to be fair) would like coders to do program purely with database packages. I've always though this a supremely boneheaded idea - I trust database designers to design databases, but not progamming langauges thank you.
      Seems that the bonehead is not where one thinks. By putting the transaction logic in the database, you put it where it will interact the most efficiently possible with the data, inside the database server itself. This also has the advantage of centralizing that logic at one place, so the clients do not have to worry about it while accessing the database. This means that the clients can be varied and need less ressources to run.
    60. Re:Another question by huiac · · Score: 3, Insightful

      Please, don't take away my stored procedures. They give me:

          - Complex column & table constraints;
          - Rapid retrieval of rows satisfying particular conditions, by indexing on a complex expression;
          - Programmable actions on insert/update/delete (triggers)
          - Updateable views

      huiac at internode.on.net

    61. Re:Another question by Pig+Hogger · · Score: 1
      There are good reasons to pay someone for support, if the people you're paying know their stuff. If you're building enterprise level, mission critical data warehouses, you'll want immediate access to expert help when things go horribly wrong. And Sorbannes/Oxley reinforces that need.
      And, pray tell, where is it written that the people you pay for support cannot support a free product???
    62. Re:Another question by Splab · · Score: 1

      What I really miss in postgres/mysql is some proper assertions. Constraints isnt even half of what they are supposed to be - its bloody annoying when you want to do something a bit more advanced than insert/select/update.

    63. Re:Another question by QuietLagoon · · Score: 1
      But where is the marketing money behind MySQL and PostgreSQL (gawd, can't they come up with a name a mere mortal can remember???) ?

      The amount of money behind the Oracle's, DB2's, and MS-SQL's of the world dwarfs that behind the Open Source databases.

    64. Re:Another question by HaggiZ · · Score: 1

      Okay, I'll bite! Hopefully this comes in handy, it's helped me a few times in the past. I generally don't go using it a great deal though, as the performance is nothing like the limit offset you get from Postgres.

      CREATE PROCEDURE sp_limitoffset (
              @table as nvarchar(255),
              @limit as int,
              @offset as int,
              @primary_key as nvarchar(30),
              @conditions as nvarchar(255)=null
      ) AS
              declare @sql as nvarchar(4000)

              set @sql = N'SELECT * FROM (
                              SELECT TOP '+cast(@limit as nvarchar)+' * FROM (
                              SELECT TOP '+cast(@offset as nvarchar)+' '+@primary_key+' FROM '+@table
              if (@conditionsnull)
              begin
                      set @sql = @sql + N' WHERE '+@conditions
              end
              set @sql = @sql + N' ORDER BY '+@table+'.'+@primary_key+' ASC) as foo ORDER by '+@primary_key+' DESC) as bar ORDER by '+@primary_key+' ASC'

              execute sp_executesql @sql
      GO

      Then you can simply:
      exec sp_limitoffset 'tablename',5,20,'ID'
      and get the results you were expecting. I guess you could also include a call to sp_columns to determine which field was the primary key and automatically sort on that, but I figured the performance hit probably didn't justify it as I always know what the PK is.

      Enjoy

    65. Re:Another question by tjstork · · Score: 2, Informative

      The money you are spending for Oracle in the above case gets you some features that SQL Server flat out doesn't have. Like all things, you do have to know what you are doing with Oracle, but, if you do, you get some features that make or break a big, big application.

      uber partioned indexes
      uber materialized views
      outstanding mvcc transaction support

      SQL Server 2005 is supposed to have some of these features in it, plus the kitchen sink, but then I would expect the price to move on that.

      The other thing is that with Microsoft you generally are going to spend an extra $2000 / developer for tools.

      --
      This is my sig.
    66. Re:Another question by Herschel+Cohen · · Score: 1

      RE: "Moreover, I have encountered a number of very dense people that could not even conceive of how uninformed they truly were."

      Sorry, guess I just encountered one more. No need to waste my breath here.

      Think of running for President? I know you probably cannot qualify immediately seeing the British spelling, but if the constitution is altered for the Terminator you should try out. You probably cannot even top the current one for stupidity, but I have been proven wrong so many times ...

    67. Re:Another question by Anonymous Coward · · Score: 0

      You forgot to mention security boundaries between tiers. I hate dealing with these moron dev who try to implement all their data logic in the business logic layer. One SQL injection bug cuts through that like a warm knife through butter. I really wish your average DBA had even a rudimentary knowledge of the security issues in the crap they spew.

    68. Re:Another question by grassbeetle · · Score: 5, Interesting
      No. He got it right the first time. Why on earth would you want your RDBMS vendor cramming their lousy procedural programming language down your throat? For the privilege of burning cycles for your application code on CPUs that you've paid your database vendor upwards of $10k per core for licenses? Or is it because your control-freak DBAs like the app code right up close to the data where they can micro-manage it. The only folks with a worse appreciation of programming languages and application design than sysadms are DBAs.

      Finally, if you want to scale, getting your app code out of the DB is the best first step. Outside the database server you can throw cheap app servers at a problem if you need to. Growing your DB server is another beast altogether. Despite the IBM/Oracle propaganda, big grown-up businesses are very hesitant to cluster their databases. Not just the cost but for tuning and safety (the odds of bugs in this super-complex technology bringing them down). In general, you have one live DB server for an app and at least one failover. Growing that single DB server is a lot harder than throwing in a few more pizza boxes, or whatever.

    69. Re:Another question by Anonymous Coward · · Score: 0

      Just fyi, ROWCOUNT is a SET option that applies to a whole transaction and works the same as TOP, only for multiple statements.

    70. Re:Another question by dotgain · · Score: 1

      Yay. Ad hominem. And again, nothing substantial. Apologies for the British spelling, which seems to have lessened me further.

    71. Re:Another question by Anonymous Coward · · Score: 0
      What I really miss in postgres/mysql is some proper assertions. Constraints isnt even half of what they are supposed to be - its bloody annoying when you want to do something a bit more advanced than insert/select/update.

      Please give me a specific example of a constraint that is possible on Oracle but not PostgreSQL, so that I can refute it.

    72. Re:Another question by BoysDontCry · · Score: 1

      The .org and .info registries are run on postgresql. I would consider that to be "serious enterprise work". Granted, there are a lot of features that Oracle has that aren't there in postgresql, but that doesn't mean that it's not ready for the enterprise.

    73. Re:Another question by quantum+bit · · Score: 1

      Yes, you could use a cursor instead, but to avoid problems if the table gets updated while your cursor is open, you'd either have to lock the table or deal with errors from the server.

      Gah, thanks for reminding me of why I love PostgreSQL so much.

      MVCC rules.

    74. Re:Another question by MoralHazard · · Score: 2, Informative

      Then arrange to have the benchmarking done in a country which won't uphold anti-competitive bullshit clauses (and when Oracle protest that the license lets them sue the guy in the jurisdiction of Buttfuck, Illinois, will tell them where they can stick their extradition request).

      When you're sueing someone, there's no extradition--that's solely for criminal proceedings. There is no analogous concept in civil litigation. It doesn't matter WHERE the violation of the contract takes place. You could have someone in Venezuala, or on Mars, perform the benchmarking, and you'd STILL get sued in a California court (assuming that's what Oracle wrote into the license agreement).

      So if Oracle has a contract/license agreement with a customer that says "no benchmarking", and another clause that says "all disputes will be settled in Marin Co., CA", they don't have to bother with Buttfuck, IL at all:
              1) Oracle files lawsuit against customer in Marin Co. court.
              2) Marin Co. court looks at the contract clause governing jurisdiction, agrees that Marin is a valid court to hear the case.
              3) Lawsuit proceeds.

      If the defendant doesn't respond or show up, Oracle automatically wins the suit by default, and a judgement is entered against the defendant. Then Oracle has a court order, valid in EVERY other county in the USA, demanding that the defendant pay the judgement.

      And Buttfuck, IL will enforce the order.

      (If it were THAT easy to get out of a contract clause, wouldn't

    75. Re:Another question by Jaime2 · · Score: 1

      I don't get it. I say that in THIS list, the money comes from hardware manufacturers and not database vendors and you ask me where the money comes from.

      If HP could get a better ranking by switching to MySQL, they would in a heartbeat. No one would have to give them a dime. They'd even pay MySQL AB tens of thousands to set it up as best as possible.

      BTW, MySQL is developed by an actual company with a sales force and a marketing team. They'll either give it to you under a GPL license or sell it to you under a far less restrictive license.

    76. Re:Another question by DJ-Dodger · · Score: 1

      SQL Server 2005 adds the ROW_NUMBER() function which makes it easy to do paging.

      Example:

      SELECT ROW_NUMBER() as RowNumber, Name
      FROM Person
      WHERE RowNumber BETWEEN 10 and 20

      More information:
      http://sqljunkies.com/weblog/amachanic/archive/200 4/11/03/4945.aspx

    77. Re:Another question by Desert+Raven · · Score: 1

      I hate stored procedures, they may be useful when the DB designer has borked the design, but just redesign the damn thing already! There is no other sane use for them.

      Which only shows that you don't work with very large projects, or ones where performance is an issue.

      Fact: Stored procedures, being pre-compiled, perform significantly faster than ad-hoc queries.

      Also fact, when you have several different applications performing the similar functions (trust me, happens a lot in large projects), it's a sure-fire way of making sure all apps are doing the same thing. Likewise, if something needs changing/optimizing, it can be changed in one place, instead of hunting down every place the functionality is performed.

      The company I'm working for now is in the process of instituting *more* stored procedures, not fewer. Seems the previous developers weren't talented enough to figure out what they were good for or how to write them.

    78. Re:Another question by Anonymous Coward · · Score: 0

      they have this clause because in the mid 1980's companies used to run "competitive" benchmarks against each other. Oracle would run an Oracle vs. DB2 benchmark and publish the result. IBM would complain that it wasn't properly tuned. That's why we ended up with the TPC and the TPC rules that said a benchmark couldn't be published without the database company's permission, that's why we ended up with a license agreement that prevents you from publishing a benchmark without their permission.

    79. Re:Another question by Stinking+Pig · · Score: 1

      Of course I realize what DBAs are for, and of course I realize that the query could be optimized to run like a greased pig on Oracle.

      It could also be made more beautiful if it was engraved on a solid gold plate and hung on the board room wall... but why would anyone do that? If the query works fine as is on a very popular, moderately expensive solution that is easy to install, the only thing driving Oracle/PG optimization is customers that use Oracle or Postgres, and since there were a lot fewer of those than there were of MS-SQL...

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    80. Re:Another question by dcam · · Score: 1

      Thanks. I haven't has time to install and mess around with the pre-release versions. It would have been pretty braindead if they hadn't included a feature of this sort.

      --
      meh
    81. Re:Another question by einhverfr · · Score: 4, Insightful

      Admittedly, this has a lot ot do with my style - I'm old school enough that I write my logic in C, C++ or Perl and use the database purely for storing and retrieving data. DBMS vendors (and some database researchers, to be fair) would like coders to do program purely with database packages. I've always though this a supremely boneheaded idea - I trust database designers to design databases, but not progamming langauges thank you. However, if that approach appeals, then you probably need a lot more features than I do.

      The best approach IMO is somewhere in the middle. I think both extremes are boneheaded.

      Your RDBMS is there to do three things:
      1) Store data
      2) Maintain data (i.e. triggers, check constraints, etc)
      3) Present your data (views, possible some stored procedures, etc).

      I generally try to avoid programming directly against stored procedures. If necessary, I will write a view and update rules/triggers (depending on the RDBMS) to make this appear like a table.

      In general your data model logic should be entirely contained within and enforced by the database (Date's Central Rule). This does not mean that application function should be a stored procedure. Far from it. Instead, by doing things this way, you can do a fair bit of heavy lifting in the RDBMS where appropriate, and have your application logic in the application where it belongs.

      For example, sending email from the database backend is not really the best solution to any problem I am aware of in large part because this would happen outside of transactional control. Instead, use a trigger to place an item in a queue that an external program can use to send it. This way if your transaction rolls back after the email is sent.... ;-)

      People on both extremes simply don't understand the features and limitations of the transactional and relational models.

      --

      LedgerSMB: Open source Accounting/ERP
    82. Re:Another question by NickFortune · · Score: 1
      Fact: Stored procedures, being pre-compiled, perform significantly faster than ad-hoc queries.

      Fair enough. But you can pre-compile queries using embedded SQL as well.

      Also fact, when you have several different applications performing the similar functions (trust me, happens a lot in large projects), it's a sure-fire way of making sure all apps are doing the same thing. Likewise, if something needs changing/optimizing, it can be changed in one place, instead of hunting down every place the functionality is performed.

      That's a good argument for procedures, but it doesn't require the stored part. I'd do that with a shared library full of C functions, a C++ class or a perl module.

      There are sensible uses for stored procedures, but there are other ways of centralising your business logic.

      --
      Don't let THEM immanentize the Eschaton!
    83. Re:Another question by NickFortune · · Score: 1
      AFAIK, neither MySQL nor PostgreSQL let me alter a live database without pausing write operations to that database. If Oracle can do that, then that's a feature where it wins.

      Wow. Oracle let's you change a table schema without a full table lock? It must be in there someplace or there would be data integrity errors, surely?

      Not disagreeing, just a bit gobsmacked.

      --
      Don't let THEM immanentize the Eschaton!
    84. Re:Another question by Jorgensen · · Score: 1

      It's not a bonehead question. Rather it is a trade-off. You gain some performance and in return you make yourself dependent on the database vendor since you've just increased your migration cost...

      You could argue that it is easier to manage dependencies if you use e.g. stored procedures, but architecture-wise they are no different from any other layer of application design...

    85. Re:Another question by johnjaydk · · Score: 1
      There are good reasons to pay someone for support, if the people you're paying know their stuff. If you're building enterprise level, mission critical data warehouses, you'll want immediate access to expert help when things go horribly wrong.

      GP metioned Oracle. IMHE Oracle support and Metalink hell is something you wouldn't wish upon your worst enemy.

      --
      TCAP-Abort
    86. Re:Another question by NickFortune · · Score: 1
      A bit of both, really. I do things like load static data into memory based tables to save on the overhead of joining against them. (I hate de-normalised data - it defats the point).

      Otherwise, I use SQL for selects, updates, deletes and inserts, transaction handling, and a few other things like say dropping and recreating indices if I have to load a large table using insert.

      I don't do much in the way of integrity consraints and cascades in SQL, and I really should make better use of such features.

      Apart from that, I like to do as much as I can in C or similar.

      When you say client-side... are you thinking of networked applications, or just refering to the DBMS as a server and any apps using it as clients. If it's the former case, I'd write the server to run on the database platform and keep the client apps fairly thin.

      --
      Don't let THEM immanentize the Eschaton!
    87. Re:Another question by archeopterix · · Score: 1
      Seems that the bonehead is not where one thinks. By putting the transaction logic in the database, you put it where it will interact the most efficiently possible with the data, inside the database server itself.
      Valid point, however a client residing on the same machine as the database is usually efficient enough - at least has always been for me.
      This also has the advantage of centralizing that logic at one place, so the clients do not have to worry about it while accessing the database. This means that the clients can be varied and need less ressources to run.
      Enter application server. Centralized logic, database independence (if you want it) and a bunch of other nice features, the ability to choose the programming language being one of them.
    88. Re:Another question by Anonymous Coward · · Score: 0

      Stupid question : but what if the sale was made by the Oracle CountryXXX company to a CountryXXX national and that the local law specify that national juridiction must apply ?

    89. Re:Another question by megalomaniacs4u · · Score: 1
      Fact: Stored procedures, being pre-compiled, perform significantly faster than ad-hoc queries.

      Also fact, when you have several different applications performing the similar functions (trust me, happens a lot in large projects), it's a sure-fire way of making sure all apps are doing the same thing. Likewise, if something needs changing/optimizing, it can be changed in one place, instead of hunting down every place the functionality is performed.

      Um, no need for procedures - I just use views for 99% of what most bonehead DBA use stored procedures, of course using a proper DB is a requirement...
    90. Re:Another question by MemoryDragon · · Score: 1

      Actually no, SQL server in its old incarnation still is Sybase rebranded, the newer one Yukon will be a complete rewrite. (And probably break the TDS protocol)

    91. Re:Another question by NickFortune · · Score: 2, Insightful
      Your RDBMS is there to do three things: 1) Store data 2) Maintain data (i.e. triggers, check constraints, etc) 3) Present your data (views, possible some stored procedures, etc).

      I've never been entirely convinced by item three. Views are occasionally useful, but if you have a user interface that allows ad-hoc queries, they may be the only way to enforce data security. But if you're writing apps you may as well code the query directly. You'll need to change the code if the view changes, but apart from a few ultra-generic table based apps, that is always going to be true.

      Far from it. Instead, by doing things this way, you can do a fair bit of heavy lifting in the RDBMS where appropriate, and have your application logic in the application where it belongs.

      I'd agree with that. I'll occasionally break the rule for pragmatic reasons and I don't always make best use of constraints and their ilk, but I have to agree with the sentiment.

      Instead, use a trigger to place an item in a queue that an external program can use to send it. This way if your transaction rolls back after the email is sent.... ;-)

      Unless I'm misunderstading you, that cannot happen. Assuming your emailer is a little app that sits on top of the mail queue table and periodically issues "select * from...", then it never sees the queued message, because it doesn't de-cloak until the transaction commits. I think that was your point.

      The best approach IMO is somewhere in the middle. I think both extremes are boneheaded.

      The boneheadedness I meant lies in using programmng languages developed by database vendors. They're almost always awful.

      For one thing, they tend to hold the database as being more important than the language, so you get languages where the only iteration is using cursor selects for example.

      Then there is the "everything has to look like SQL and/or PL/I" syndrome, which sees table definition syntax being reused to specify parameter passing.

      Finally there is the "SQL is a static, descriptive language, therefore our coding langauge must work the same way" disease, which gives us langauges with all the frustrations of coding in lisp or prolog, but without the cool stuff which makes those languages fun.

      Anyway, enough with the rant. Bit of a hobbyhorse of mine, as you may have guessed :)

      --
      Don't let THEM immanentize the Eschaton!
    92. Re:Another question by Dogers · · Score: 1

      So all you need to do is never go to USA.. Big deal :)

      --
      I am a viral sig. Please copy me and help me spread. Thank you.
    93. Re:Another question by Anonymous Coward · · Score: 0

      MS SQL ain't bad - the client tools (enterprise manager, query analyser) are pretty good.

      it does suffer from the usual MS problems of over-complication (check out backups and the transaction log issues) and T-SQL is nowhere near as good as PLSQL which comes with Postgreqsl.

      its main problem is the OS which it is tied to.

      we work with a client who insists on staying MS only even though their databases are in the range on 20/30 GB.

      what happens is that the (very expensive quad processor/SCSI/GB's of RAM) servers are constantly going wrong. they go on go slow's, crash etc. and they have a small team of very expensive MSCE's trying to sort them out - but they never get fixed properly.

      also, MS SQL server suffers from the usual MS problem of overcompli

    94. Re:Another question by jwhitener · · Score: 1

      I concur with your comments about MS SQL server handling large queries quickly. I've used Oracle since its inception, MySQL, Post, and more, and I have to hand it to MS: they build a very fine product in MSSQL.

      I *can* get the same performance from MySQL, Oracle, and Post, but I have to be very careful about how I form queries and stored procedures. Each has their own little "gotchas" that can make even a simple query run for hours.

      MSSQL seems to handle a much larger variety of query types at a performance level that is hard to beat. Now, I'm by no means a guru, and I'm sure there is someone out there that can point to some huge cluster of DB X, and say, MSSQL can't touch this... but for the lay person DB admin, MSSQL "just works" and seems to work much faster and with far fewer problems that any other database.

      I recently moved from a health care corp that ran huge MSSQL servers, to a college that runs MySQL and Post and Oracle.. gah, I'm pulling my hair out trying to work with them hehe. Eventually, I do make things work, but it seems like I have to look up every single thing I try and find the "quirk" for that database. With MSSQL, it does what you expect it to do. Type a query, get results, and fast.

    95. Re:Another question by joshsnow · · Score: 1

      Oracle is a pig, and it requires a professional, certified swineherd. If you spend an amazing amount of money on licenses, gear, and certified DBAs you will presumably get good performance;

      Nonsense. Oracle won't be any good for people who like plug and play DBMSs, but its power lies in its configurability. The only money you need to spend is on a cheap book which will show you how to get the best from it. Or get the info free on the web.

      I however was never able to get it past 60% of the performance of MS-SQL or Postgres

      That says more about you than about Oracle.

    96. Re:Another question by Dogtanian · · Score: 1

      You could have someone in Venezuala, or on Mars, perform the benchmarking, and you'd STILL get sued in a California court

      Note the word "you".

      "You" don't use Oracle, so there's no contract between you and Oracle at all, and in particular no agreement to bullshit clauses.

      "You" get someone else to do the benchmarking.

      No, this isn't legalistic jiggery-pokery. "You" DO NOT USE ORACLE either directly or indirectly; you're simply getting someone else to test its performance.

      Of course, IANAL, and since I'm pretty intolerant of the wank-fest of ignorant Slashdotters judging law on the way they think it is or (worse) the way it should be, the above statements may be equally self-indulgent deluded bullshit. But quite frankly, if Oracle were able to say something along the lines of "this guy was inducing the other guys to break their contract" (that was not legally enforcable in another country, and is pretty obviously an unreasonable and anti-comptetitive clause), it reflects really badly on American justice, though it wouldn't surprise me.

      If I thought there was a danger of a costly court case there, I'd just arrange to have some overseas company do the study without disclosing I'd paid them, and have them display it prominently on the web, along with the reasons the study was being hosted outside the US and the sponsors were anonymous ("Oracle are abusing the law system in an anti-competitive manner to suppress fair analysis and criticism of their product; the US law system upholds such unreasonable actions. So, we're hosting our study in a country that supports fair analysis of a company's products and not exposing our sponsors to Oracle's legal war of attrition.")

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
    97. Re:Another question by Anonymous Coward · · Score: 0

      Why on earth would you want your RDBMS vendor cramming their lousy procedural programming language down your throat?

      Think handheld devices, different OS', different needs. There are many reasons to have different client systems connecting to the same datastore and putting the logic on the data vastly simplifies all of the clients.

      Connecting a new device or creating a new physical interface to the DB can be as simple as giving them a basic SQL client if the data is protected by logic on the DB.

      Plus you can do stored procs/triggers/etc in postgres and most of the other RDBMS so it's not like you're stuck with Oracle if you decide to go down this route.

    98. Re:Another question by ajs · · Score: 3, Interesting

      "He got it right the first time. Why on earth would you want your RDBMS vendor cramming their lousy procedural programming language down your throat?"

      Let's just stop right here. The answer to this question was settled sometime around the introduction of the electric lightbulb, and it has little to do with programming paradigm.

      Logic in the database is almost always a bad idea. It introduces complexity in source code management, release engineering, application de-centralization, etc. The database's code optimization is also rarely on-par with external langauges. It's also essential at times. There is a fine line to be drawn between performance needs and software engineering needs. As a very, very rough metric, based only on personal experience, I would say that you should place code into the database only when that code reduces the amount of data that must be moved to the application by at least and order of magnitude. This goes for everything from the most complex stored procedure to the simplest sort (though be careful to be aware of when sorts are free because of storage implementation, and don't be afraid to put conditional logic into code based on storage engine).

    99. Re:Another question by Aceticon · · Score: 5, Insightful

      I've worked for several years both creating programs inside the database and on a server layer outside it (and also just about every other layer).

      I have to agree with grassbeetle above.

      Software architecture-wise:
      - You can't make a scalable architecture if you put everything in one single place (in this case the database).
      - You will be hard-pressed to create a failure tolerant architecture if you stuff everything in a single point of failure.
      - Databases are NOT application servers. They are designed with data storage and retrieval in mind, not reliable execution of complex business logic. Amongst other things databases do not make available in an easy and/or reliable way some of the standard application server functionality.
      - All external components of the application (for example UIs) have to connect to the database. You're now stuck to using the connection protocols from the chosen database. This might cause all sort of problems with security, firewalls, use of asychronous messaging, availability of adaptors in the platform you are deploying your applications to, etc...
      - Spliting your application accross several servers or in a multi-tiered geographical distribution is much harder.
      - All coders have to have a good knowledge on how to work with the specific database you are using.
      - Programing inside databases is not standartized. Different databases and indeed different versions of the same database have sometimes different versions of the same language or different libraries available. The language/libraries have not been so throughly used/tested/examined by a big user comunity (while for example standard C/Java/etc libraries have been thouroughly debugged in billions of man-hours of use). This means more library bugs and a lack of third party tools for software design and development inside the database.
      - Facilities such as version control, source control, etc are either not available or difficult to use in a reliable manner.
      - Availability of compatible 3rd party libraries or application modules is very, very restricted by comparison to NOT having your server side logic all inside the database.
      - Forget about moving databases in the future. Also, simple migrating to a newer version of the database can be a nightmare.

      Software design-wise, the design of the software will be strongly constrained by the internal structure of the database:
      - Information flows will mostly have to be database-like information flows
      - A true object oriented structure is pretty much impossible. At the most you can do weakly connected islands with an objecte oriented structure. If the database language you have to use is procedural forget about OO design.
      - Server-side initiated connections to outside entities, thread control, ditributed transactions and other more advanced functionalities are pretty much impossible.
      - Usage/integration with 3rd party libraries or application modules is very hard or even impossible.

      Software programming-wise, and from my experience (mostly Oracle):
      - The language sucks.
      - The application libraries (not the DBA ones) suck big time.

      Simply put, a software architect that puts all server-side logic inside the database is with this single choice removing almost all his other architecture options and creating/fortifying vendor lock-in of the application to the database itself and 3rd party tools and also of the development team itself by means of the knowledge experience they have/will gain with said database and said 3rd party tools.

      Such a person should IMHO either be demoted to a place were he/she can't cause any damage or fired outright.

    100. Re:Another question by hey! · · Score: 1

      Well, nothing is perfect. I always say you don't know a system until you hate it.

      That said, a system doesn't have to be perfect, it just should have what marketers call a "position" -- a role in the software ecosystem that it fills uniquely well.

      Oracle is clearly the winner when it comes to scaling and up-time. You do virtually any maintenance on an Oracle database while it's running. You can do things like move older rows in a table to a slower tablespace while transactions are being run against it. Oracle's biggest drawback is that it is easy to screw up in. So -- when you need Oracle, you need a professional DBA: a good one.

      Of course, according to long standing Oracle tradition, you are encouraged to shoot yourself in the foot for the amusement of the experienced DBAs. Oracle's corporate motto might as well be "it's your fault idiot."

      MS-SQL is a high quality database that is ridiculously easy to set up, tune, and maintain.

      Not really. I'd characterize it more as mediocre. It's no easier than any other database to get running in vanilla mode. Even oracle, with its famously bad installers, is a snap to install these days. MS SQL is easy to tune only because your options for doing so are so rudimentary. That's not a put down -- why introduce complexity if your customers don't need it? But you have to compare apples to apples. SQL server is easier to manage than Oracle in the same sense that a clay brick is easier to manage than a modern fighter plane. If you have to get your ass from ten thousand feet onto a carrier deck at night during a gale, a brick is as good as a plane because either way your ass is history without the training you need to do it.

      With respect to quality, it is true that SQL Server performs reasonably well and reliably on the one platform it runs on, but it has a crummy SQL implementation. For one thing it's very buggy. Try using bound parameters in a subquery for example. The stored procedure language is the most non-orthagonal trigger language I've ever worked with. If you move back and forth between different SQL implementations (as I do) you have to remember that this semantic construct cannot be used in that context.

      The natural position of SQL Server is integration with MS tools, and it does this well. For an MS only shop, which is commited to MS only deployments using IIS, Windows servers, VB and so forth, it is a natural choice and a reasonably good one, provided scalability and availability 7x24x365.25 aren't a life or death matter.

      But if you aren't doing everything based on MS products, there is no reason to select SQL server over, say, a recent version of MySQL. If you need ironclad uptime, you realy ought to go to Oracle.

      By the way Oracle I think would like to play the lock-in game too, they just aren't as well positioned to do it. I think this has changed recently, but you used to not be able to handle BLOBS in Oracle JDBC without infecting your code with Oracle type signatures.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    101. Re:Another question by aftermath09 · · Score: 1

      All I'm asking is what the query looked like. You seem to make query optimization some sort of arcane science, when in fact all it could be is that you needed to index a table, structure the query differently, etc. ok, so maybe you've done all that. Did you try running an explain plan? You see none of this is that hard, or requires multiple doctorates to actually understand (or even beautifully engraved plaques for that matter - because so many dbas make one every time they write a query ;)

      btw, what do you base your customer numbers on? ie. why do you think there are more sql server users than Oracle or Postgres? Remember, access doesn't count!

    102. Re:Another question by Herschel+Cohen · · Score: 1

      RE: "Yay. Ad hominem"

      Reread your previous messages to see such attacks.

      By necessity I will keep this simple, your point: " Holy shit. You're so smart your computer runs alpha versions more stable than mere mortals ...". Once again you completely missed the point. It's not that I am so great (I did not write the application) it's a comparison to the software you depend upon that in full release does not match the quality of an alpha created by other groups.

      Next you seem quite pleased to state: "[rebuts point that was never made, re DBA]", and what do you think the major functionality of the "SQL Server Enterprise Manager" is? One might conclude that you are unaware of the implicit content of your arguments and more so in the points I was trying to make initially.

      One more: "Apologies for the British spelling ...", why, it was not an attack only part of an observation on a technical U.S. Constitutional issue. You are much too defensive, it was mostly intended to be humorous, since I ceased to argue. Rereading it, however, it can be interpreted as being nasty - for that alone I apologize.

      Finally: I associate the word dork with an common aspersion cast at high school intellectual types. The people I had in mind held management positions in technical fields (mostly) that were my model for these dangerous types. We are not talking rank stupidity per se (note George W. Bush is NOT stupid! - my contention, his performance is), but people so full of their infallibility they cannot conceive of the possibility of their being in error.

    103. Re:Another question by dcam · · Score: 1

      When you say client-side... are you thinking of networked applications, or just refering to the DBMS as a server and any apps using it as clients.

      I mean that the DBMS is the server and the C/C++/$favourite_language is the client. I mean in the sense than anything that connects to the database is a client to the database.

      I don't do much in the way of integrity consraints and cascades in SQL, and I really should make better use of such features. ...

      Apart from that, I like to do as much as I can in C or similar.


      This is a problem IMHO. The database does a better job of ensuring Referential Integrity (Foreign Keys, Primary Keys, etc), than we can do client side. This is not to say that we don't do client side checking, but integrity of your data is that important that you want to hand it off to something that does a specialises in this.

      Equally, SQL is better for manipulating sets of data than procedural code. It is faster, and more flexible. I prefer to have the DBMS return the single dataset I want, rather than a collection that I stitch together.

      I know that those features haven't always been available, but they are now. Databases have changed.

      --
      meh
    104. Re:Another question by jwocky · · Score: 1

      I bitch about MS as much as anyone, but I do have to hand it to them when it comes to sql server. I haven't had a chance to play with 2005 yet, but 2000 on a dedicated win2000 machine is about a stable server as you can get in the price range. i also appreciate the the ability to use access to link tables to it, so that i can quickly write front ends using access/vba. vbasic and c# are nice, but when i need something NOW, you can't beat access projects.

    105. Re:Another question by Nexx · · Score: 1

      Here, have a clarification :)

      Instead, use a trigger to place an item in a queue that an external program can use to send it. This way if your transaction rolls back after the email is sent.... ;-)

      Unless I'm misunderstading you, that cannot happen. Assuming your emailer is a little app that sits on top of the mail queue table and periodically issues "select * from...", then it never sees the queued message, because it doesn't de-cloak until the transaction commits. I think that was your point.

      You are misunderstanding the grandparent. Some RDBMS (like MS SQL Server) let you send email directly from the database. Unfortunately, that "feature" isn't within the transactional control; when you tell the DB to send email, the email gets sent immediately, but later when your app rolls back that transaction, your email's still sent. By putting the email logic in an external program that does a e.g. select * from emailqueue..., the grandparent is saying you can control that.

    106. Re:Another question by archen · · Score: 1

      Access can link tables for ANYTHING that has an odbc connector (Pretty much everything). Access is one of those programs that doesn't get enough credit in my opinion. Great for bridging gaps like mailmerge directly from a server, and doing reports. I use Access to write reports from my postgres servers and am quite happy with it. I think OO.org is supposed to be able to do this as well, but if it works, why fix it?

    107. Re:Another question by Tupper · · Score: 1

      Oracle does use a full table lock for modifications to table structure.

    108. Re:Another question by Decibel · · Score: 1

      I think you might be over-reacting a bit here. It obviously doesn't make sense to try and turn your database server into an application server (which is what your points seem to be arguing against). Even as much as I tend to have hammer-nail (when the only tool you have is a hammer, every problem starts to look like a nail) mentality when it comes to databases, I still would never suggest using your database server as an application server. It just doesn't make any sense.

      On the flip-side, it does make sense for you database to ensure data integrity and correctness. For example, if you have a business rule that says 'no orders will be accepted if any item is out of stock', the database is the best place to enforce that because it's the only place that can truely enforce it. If you try and enforce it in your app server, you're screwed if anything else even has to talk to the database. And it's not like doing that kind of a check is going to put any real additional load on the database; most of the load will be in running the query to check stock levels.

    109. Re:Another question by Decibel · · Score: 1

      That's a good argument for procedures, but it doesn't require the stored part. I'd do that with a shared library full of C functions, a C++ class or a perl module.

      That ass-u-me's that everything will always go through your app server, which is not always a given. IMO it limits you even more than putting code in the database, because now you can't ever use software that you can't make to work with your application layer.

    110. Re:Another question by HavokDevNull · · Score: 1

      Did you mean Sarbanes-Oxley Act and not Sorbannes/Oxley?

      --
      Sig
    111. Re:Another question by grassbeetle · · Score: 1
      No. I disagree. You ask the *application* to process the order. The application logic knows what the rules are and is the only component entitled to change the database.

      If you have other processes connecting straight to the database and changing data directly, you have serious issues. Maybe barricading yourself in FortressDB is the right approach for you if you live among marauding barbarians pillaging your relational store at every turn. This is not, however, a world you should accept without stiff resistance.

    112. Re:Another question by minus_273 · · Score: 1

      great article. it shows just how aful/non standard mysql really is.

      --
      The war with islam is a war on the beast
      The war on terror is a war for peace
    113. Re:Another question by coldtalon · · Score: 1
      Using PostgreSQL reduces the number of access licenses required for Oracle, or doesn't waste existing connections.
      That would be great except that Oracle allows unlimited development licenses for all oracle database products at Oracle Downloads on OTN. Unless you happen to live in "Cuba, Iran, Sudan, Libya, North Korea, Syria, nor any other country to which the United States has prohibited export." (from the EULA for 10g) But then again, you probably couldn't get a licensed copy anyway if you lived/worked there.
      --
      The nine most terrifying words in the English language are: I'm from the government and I'm here to help. -Ronald Reagan
    114. Re:Another question by Thundersnatch · · Score: 1

      the jurisdiction of Buttfuck, Illinois

      Why are "Buttfuck" and "Podunk" always reported as being in in Illinois or Indiana? I've lived in both of those states, and they're fairly cosmopolitan these days. I actually think "Buttfuck" is in upstate New York, and "Podunk" is just northwest of Sacramento, CA.

    115. Re:Another question by kiwimate · · Score: 1

      it does suffer from the usual MS problems of over-complication (check out backups and the transaction log issues)

      I'll bite -- what is so complicated about backups, and to which transaction log issues are you referring?

      If you want to do it by hand, then you have to know a bit of T-SQL, but compared to Oracle this is trivial (and you can do your dumps online!). But even easier is to set up a maintenance plan or two, and let the maintenance plan take care of retention, naming, etc.

      T-SQL is nowhere near as good as PLSQL which comes with Postgreqsl

      SQL Server 2005.

      we work with a client who insists on staying MS only even though their databases are in the range on 20/30 GB.

      what happens is that the (very expensive quad processor/SCSI/GB's of RAM) servers are constantly going wrong. they go on go slow's, crash etc. and they have a small team of very expensive MSCE's trying to sort them out - but they never get fixed properly.


      Why oh why oh why? This should be trivial. Tell your client to get rid of these MCSEs as they obviously can't cut it, and spend the resultant savings on getting a Microsoft consultant on site for three days. You may not like MS, but their front-line tech people know their stuff inside and out.

    116. Re:Another question by NickFortune · · Score: 1
      Here, have a clarification :)

      Thank you, that helps a lot :)

      Actually that's a perfect example of what I mean by one man's feature being another man's bloat. More marketing led design from Redmond, I can only assume.

      --
      Don't let THEM immanentize the Eschaton!
    117. Re:Another question by NickFortune · · Score: 1
      That ass-u-me's that everything will always go through your app server, which is not always a given

      Ah, but we were talking about apps. And sometimes you will want database access to be mediated by your own software. It adds an extra layer of security for one thing

      IMO it limits you even more than putting code in the database, because now you can't ever use software that you can't make to work with your application layer.

      More accurate to say that allowing that software access will entail some overhead. Of course, there's no reason not to allow some access via shared procedures, and thereby allow other software to access some functionality. Stored procedures are a useful part of the toolkit. I just don't believe in using screwdrivers as hammers.

      --
      Don't let THEM immanentize the Eschaton!
    118. Re:Another question by NickFortune · · Score: 1
      Ah, Referential Integrity! I thought the RI was a typo for DI meaning Data Integrity. It's not a term I'm used to seeing abbreviated.

      Yeah, for referential integrity I'd always use the database constraints where possible.

      Equally, SQL is better for manipulating sets of data than procedural code. It is faster, and more flexible. I prefer to have the DBMS return the single dataset I want, rather than a collection that I stitch together.

      Now if you said relational algebra, I'd agree. Sadly there are fairly few proper relational DBMS around - Dataphor looks interesting, and I wrote my own solution for the poblem for my dissertation a few years back. SQL on the other hand...

      SQL is broken in a lot of ways. The biggest problem is that it handles bags rather than sets. There are others, such as the use of NULLs. It's not a universally held opinion, but Chris Date and Hugh Darwen have voiced such views, so I'm not really going out on a limb here.

      Practically, large joins can be ferociously expensive, and denormalising is not a sensible solution (now, this is IMHO). I've generally found I can get a lot better performance by reading some tables into memory and doing sorting and filtering programatically. It's a while since I had a big enough query to make it worth while chopping up, so maybe DBMSs have improved of late. Even so there are still some queries that can't be sanely done in SQL, if only because SQL expressions don't nest properly.

      --
      Don't let THEM immanentize the Eschaton!
    119. Re:Another question by jadavis · · Score: 1

      PLSQL which comes with Postgreqsl

      The native procedural language that comes with PostgreSQL is called PL/pgSQL.

      Also, PostgreSQL comes with several other server-side languages, and the mechanism is extensible (so anyone can add additional procedural languages at run time). Popular procedural languages include PL/perl, PL/java, and C.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    120. Re:Another question by jadavis · · Score: 1

      I hate stored procedures

      If you give up stored procedures/functions, you ALSO give up:
      - user-defined types (isn't this important?)
      - triggers
      - functional indexes (how can you do without?!)
      - functions that return a relation
      - user-defined aggregates
      - many types of data constraints

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    121. Re:Another question by jadavis · · Score: 1

      Why on earth would you want your RDBMS vendor cramming their lousy procedural programming language down your throat?

      If you have 10 applications accessing the same set of data, you may want the database to enforce constraints using procedural code.

      If you try to do it client-side, than a bug in one application can cause failures in other applications. Unless, of course, you try to do huge amounts of data validation each and every time before you retrieve data.

      If you do it client-side, it will most likely put more load on the database server, since a few stored procedures might be negligible compared with the application pulling in more data for processing, and possibly performaing extra joins. And the difference in the size of the client code will be huge.

      Also, it's great to be able to separate physical layout from the view the applications have. Procedures are an important part of building the views, &c., that make that happen.

      I agree in the sense that you don't want the database server running the application logic. But when it's closely tied to the data model, a few lines of well-placed code can make a huge difference.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    122. Re:Another question by dotgain · · Score: 1
      At last I find you somewhat agreeable.

      But let me have this: Furthermore, the graphical browser it's an alpha version that on my machine is more stable than the current stable release. Hint and it's not IE. Check your grammar, how can I interpret this sentence otherwise. It seems you are saying you're running an Alpha version more stable than others are running the "Stable" version. You also seem to have assumed I choose to run Explorer. This certainly isn't the case, at home I can't run it, at work I choose not to. But I also choose not to run an alpha release, whatever browser we may be talking about.

      I did find your point about not being a DBA, speaking of the masses you've met that couldn't comprehend their own stupidity to be a bit stuck-up, maybe I overreacted, see below.

      You probably cannot even top the current one [president] for stupidity, but I have been proven wrong so many times ... then: (note George W. Bush is NOT stupid! - my contention, his performance is)

      I think a lot of our disagreement has risen out of misunderstanding. The points I argued were with what you wrote, not what you might have meant, and I do believe some of your writing invited misinterpretation at least. In my case I saw little in the way of a substantial defence and more ad hominem, which I don't, by the way, think I'm guilty of. While "get over yourself" may have been a bit borderline, I never attacked your character, I threw your words back at you. You've encouraged me to run for president, among other things.

      I'm sure you do have valid points, and that you are as skilled and qualified as you say. I chose to disagree with you on one point and personally felt you gave that little attention. Thanks for your apology, I in turn regret the misunderstandings and that we've decended to insults. Likewise, I apologise.

    123. Re:Another question by Nexx · · Score: 1

      The email feature is meant to be used when a critical business or system event needs to be communicated immediately to Those In Charge. For that reason, I can see it being a Good Thing. However, you can do the same in most commercial RDBMSs by invoking an external script. I think a lot of Microsoft Features are there because for a long time, they lacked coherent scripting and such, and these features/bloat are a legacy of this symptom.

    124. Re:Another question by einhverfr · · Score: 2, Interesting

      I've never been entirely convinced by item three. Views are occasionally useful, but if you have a user interface that allows ad-hoc queries, they may be the only way to enforce data security. But if you're writing apps you may as well code the query directly. You'll need to change the code if the view changes, but apart from a few ultra-generic table based apps, that is always going to be true.

      Never done any data warehousing, have you?

      With updateable views, you can separate the physical data storage mechanism from the way it is presented to the application. Some cool things you can do here include:

      1) Normalize your data storage, and denormalize your API.

      2) Have several different applications see the database as if it were conforming to their own expectations.

      (i..e I can run several different application off the same database even if I don;t have the source code to the app and they require different database schemas).

      --

      LedgerSMB: Open source Accounting/ERP
    125. Re:Another question by NickFortune · · Score: 2, Informative
      Never done any data warehousing, have you?

      You got me. Nothing serious, anyway.

      With updateable views, you can separate the physical data storage mechanism from the way it is presented to the application.

      mmm... but updatable views are problematic on a number of levels. For one thing, they don't work reliably, since you can't update a derived value, for instance. And theroretically they're a mess, since you should be updating a transient derived relation that strictly speaking ceases to exist before you even issue the update.

      I'm not sure I'd want users inputting data into a data warehouse via the same view that they use to access the data anyway. There's too much derived and summarised data kicking around for my liking.

      It does sound a cool way to present a read-only interface though.

      --
      Don't let THEM immanentize the Eschaton!
    126. Re:Another question by einhverfr · · Score: 1

      mmm... but updatable views are problematic on a number of levels. For one thing, they don't work reliably, since you can't update a derived value, for instance. And theroretically they're a mess, since you should be updating a transient derived relation that strictly speaking ceases to exist before you even issue the update.

      In some cases they are not easy to work with but you should be able to get around all these issues.

      For example in PostgreSQL, you have to define update/insert/delete rules. Sometimes these can be tricky (especially when there are joins involved) and sometimes you need to use stored procedures to prevent odd behavior (wrapped behind the rule of course so the app doesn't see the SP).

      But lets take a fews examples:

      first_name || ' ' || last_name AS name might be a column definition. If you allow update to this, you have to split it into first_name and last_name before you do the update. Sort of "underiving" the values. You can actually drop the summarized data out of the update if that is acceptable and/or make sure your interface allows for updating all necessary fields. Obviously updating a sum(amount) is probably not going to be feasible.*

      * Yes, you could enter a record designed to change the sum. But why? At what cost? If you have to do this, look for other ways to change it.

      --

      LedgerSMB: Open source Accounting/ERP
    127. Re:Another question by NickFortune · · Score: 2, Insightful
      In some cases they are not easy to work with but you should be able to get around all these issues.

      For example in PostgreSQL, you have to define update/insert/delete rules. Sometimes these can be tricky ...

      mmm... that's what I mean. If the views get too complex then maintaining them may become more expensive than writing a comparatively simple interface app. Views appear to offer a generic plug-in solution, but as you say, it isn't always that simple.

      I think the problem is that updatable views are a kludge. They don't work in terms of the relational model, and that's why they throw up such problems. I think they are fundamentally the wrong approach, but I'm realist enough to use them if they save me a lot of work. But it'd have to be a fairly specialised set of circumstances...

      --
      Don't let THEM immanentize the Eschaton!
    128. Re:Another question by maraist · · Score: 1

      If you have other processes connecting straight to the database and changing data directly, you have serious issues.

      Forget separate processes.. Think multiple threads.. e.g. concurrency. While it is the "job" of the application to test-first, update-later, and synchronize all along the way, the fact of life is that bugs live inside our code, and when we miss a concurrency test somewhere, and then one day you're happily making a purchase order and wamo, a race-condition has corrupted your data....

      While I agree with the general thread that applications should be responsible for work-flow and should enforce business-rules, the particular example was a bad one because it represents a trivial constraint. Moreover, if it is a fundamental business rule, the data can be structured in such a way as to re-inforce it.

      e.g.

      instead of:

      item (id int pk, name varchar, num_in_stock int)
      purchase_order (id int pk, item_id int references item(id))

      you could have:

      item_type (id int pk, name varchar)

      item (id int pk, item_type_id int references item_type(id))
      purchase_request (id int pk, item_id int references item(id) unique)

      Or even better

      item_type ...
      purchase_request (id int pk, sale_date datetime)
      item(id int pk, item_type_id int refs item_type(id), purchase_request_id int refs p_r(id))

      I often structure my data to represent their associativity. It isn't difficult to migrate the data if that business rule changes (1:1 v.s. 1:n v.s. m:n).

      Now if you have a more complex example (must have entity A only when there are at least 5 entity B's AND and an entity C), then it's up to you whether that lives in semi-custom "constraint" logic or in the application-layer.

      --
      -Michael
    129. Re:Another question by maraist · · Score: 1

      You forgot to mention security boundaries between tiers. I hate dealing with these moron dev who try to implement all their data logic in the business logic layer.

      I worked in database-design around the transition from thick-client to web-based design. The most interesting thing for me was the futility of the "db-login-user". Previously there were advanced heirarchies of access permissions. DBA's monitored who was logged in to the DB, how much CPU time they were consuming, how much memory etc.. Then all of a sudden, we were designing monolothic sign-on users called "webguy". There'd be dozens of simultaneous connections performing roughly the same tasks. We had to scratch our heads to determine how our "50 licenses" would work with this single login user fullfulling the needs of 150 employees.

      Classicly, you only give the read or write access to the tables that the application needs.. That's all fine and good. But a given application-tier performs 95% of what a user could require do.

      SQL injection is going to affect everything that makes the application functional. The only thing DB-ACL provides is isolation between applications.. And if you're sys-admin has a common login for all your applications, you have other problems.

      --
      -Michael
    130. Re:Another question by maraist · · Score: 1

      I think that's a bit disengenuous.

      "stored procedures" implies a user-defined/custom. What we're discussing are deviations from standards-based SQL features.. Things that can be abstracted by middle-tier systems such as ruby, java's hibernate, etc. The standardized SQL is layered with a standardized middle-tier (which builds apon the standard and accounts for minor variations by different vendors). Then you have a layer of pure logic, independent of performance or mangled by the particulars of a language... You can choose the language that best suites the problem-space; beit mathmatical, logical (prolog, or forward-chained), heirarchical (XML-based constructed logic), etc.

      The key is to have as little an impeedence mismatch between the problem and the solution as possible.. The DB is used here as a tool, no more or less impressive than the "prolog" language.

      When them problem is solved elegantly, you then revisit performance issues, weighing the cost of higher-end equipment to that of maintainance time spent optimizing the hell out of some piece of code.

      A system designed to scale to a billion rows of data often will not perform quickly on only a couple thousand rows.

      With the above system-engineering philosophy in mind, the "triggers" are hidden mechanisms to apply the standards. The "indexes" are hidden mechnaims to performance tune. The "user-defined" types are necessarly hidden from the problem space (in OR-mapping tools, literally indistinguishable from simple rectangles from primitives), the constrants are hidden situations which become occasional SQL-error-condition until the system is fully debugged, never-again thereafter to be actuated.

      So while these mechanisms are important from a theoretical and a layer-of-protection stand-point, they are irrelevant from the black-box tool stand-point.

      --
      -Michael
    131. Re:Another question by jadavis · · Score: 1

      I may have misunderstood your point, but it seems you are looking at an RDBMS as merely a storage layer.

      I look at an RDBMS as a system that is an integral part of the development process. Errors, constraints, warnings, user-defined types, procedures, and sometimes triggers are all there to aid in the development process. An RDBMS can abstract the data access by using views to separate logical representation and physical storage.

      All the applications that access the same data set are able to use these facilities to develop rapidly without interfering with the other applications. The other applications may even be older versions of the same application.

      The fact that a constraint isn't used after the application is "complete" is irrelevent if the application is never "complete".

      If the entire system is perfectly specified from the beginning, and the code is well planned out, then you can engineer the storage layer as you describe. An RDBMS is for the people whose requirements are constantly evolving, and who make use of the development aid that an RDBMS provides.

      If you're testing a new version of an application, and you get a constraint violation, or a type input error, or an RI violation, that is a godsend for debugging. You're happy it didn't corrupt the main data set, and you know exactly which application is causing the error, and when.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    132. Re:Another question by CaptainZapp · · Score: 1
      You could also use the server-side cursor and scroll forward without sending that info to the client.

      [Disclaimer: I worked for 10 years with Sybase SQL Server and - ASE, which have the same origin as MS SQL Server. Things may be very different now, so apologies if I talk out of my arse]

      If cursor handling is still such a performance hog on MS SQL Server as it is in Sybase ASE I would prefer to avoid this. Granted, it's certainly faster then trying to hack something via temporary tables or "SET ROWCOUNT" and delete. Nevertheless Cursors are a bad idea one Sybase ASE and I suspect on MS SQL Server too.

      As are two phase commits by the way (or where at least until DTM), but I'm digressing here.

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

    133. Re:Another question by CaptainZapp · · Score: 1
      There are very, very good reasons why you would not want to use GUIs to manage databases in an enterprise environment.

      Even discounting the CliqueClique risk (Are you sure you want to drop the ExtremelyCriticalCompanyGoesBustWhenWeLoseItDb database? [YES] [NO]) only scripts and a serious approach to version controlling them can give you the necessary tools to rebuild your databases in a reasonable amount of time when a desaster kicks in.

      Yeah I know, there is the "reverse engineering" option in a lot of GUIs. Using this as your desaster prevention measure, is about as reliable as a backup concept, which mandates the storage of unlabeled floppy disks in shoe boxes somewhere in the attic.

      There is certainly a place for GUIs within a database context. For example they can be very useful to look up stuff. For schema changes however - and we're talking of an enterprise environment here - I would very strongly discourage their use.

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

    134. Re:Another question by CaptainZapp · · Score: 1
      I would say that you should place code into the database only when that code reduces the amount of data that must be moved to the application by at least and order of magnitude

      I'd wager that anything regarding data consistency should be part of the database and not the application. This usually doesn't require a big deal of programming logic in the database and can be handled just fine implicitely (data type, unique indexes), by triggers, or via declarative constraints.

      I don't dispute your reasoning and in fact think you're quite right, but have seen instances where it really mad a whole lot of sense to export big chunks of the application logic to the database (stored procedures) or to connected Open Servers, which feed the databases (ok, this could be the order of magnitudes :).

      The specific application I have in mind (and worked for) cranks out 15'000'000 bookings (that's not row mofifications) on an average day and the folks who designed it are some of the smartest I ever met in the industry.

      They are aware of the costs however. Essentially this application is very, very hard to port to another database if it's not outright impossible.

      In addition this is certainly not an approach you want to take as an ISV.

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

    135. Re:Another question by CaptainZapp · · Score: 1
      The boneheadedness I meant lies in using programmng languages developed by database vendors. They're almost always awful.

      For one thing, they tend to hold the database as being more important than the language, so you get languages where the only iteration is using cursor selects for example.

      Jeeeez, there are so many comments that provoke a me too comment in this thread, but I so wholeheartedly agree and I'm a TDP (total database person).

      SQL was never designed to produce procedural code. The whole idea of the damn language is that you work in sets. You provide the information what you want, from where you want it and how to get it and then you can go to the pub for a couple o' pints of lager, while your query cranks away for the next 16 hours or so. It was never intended to loop through 3 million customer rows in order to set a flag if said customers should be annoyed by your newest marketing campaign or not.

      Thus came the cursor and you know instandly that the application sucks shit and that the programmers had no fucking clue about dealing with databases if you find an excess of them in an application (yes! this includes some of those fine and very expensive ERP applications, at least from a DB perspective). I have seen really awful and dreadful shit out there.

      Mind you. I don't think that stuff like stored procedures, triggers and even cursors are a bad thing. Being a dogmatist is never good and all of those objects have their use (yes, even cursors :). But what a lot of people seem not to understand is that a database is not your complete , integrated application environment. As a matter of fact all design tools, which are too database centric (Uniface, anyone?) I have ever seen are just gawddamnawful.

      So yeah: Me too I guess...

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

    136. Re:Another question by Anonymous Coward · · Score: 0

      Nope. The rewrite happened with version 7. Version 6.5 was old Sybase code. Version 7 was when it really started to get good.

    137. Re:Another question by gbjbaanb · · Score: 1

      $2000 per developer is cheap. Its the runtime costs that matter - consider buy me $2000, but roll out to 500 seat userbase for anything less than $4 a user and you've made your saving. And got soem pretty damn hot development tools too.

      As for big, big applications - its all in the coding. I work for a company that struggles to get 500 users out of its current oracle based product, whereas my previous company (did many things right) got 12000 users out of its SQL-Server based product. (roughly equivalent transaction costs and queries). Besides, MS is remarkably ready to drop the price, especially if the DB is going to be sold on to customers. We get it for next to nothing so it adds to our profit when we sell our systems, and MS gets market share.. everyone's a winner there, if only Oracle would do the same (and I don't mean to only the massively huge companies - remember Larry's 'single price' concept?)

      Today we're looking at incredibly resilient and redundant public-safety apps, and oracle still isn't giving us what HP/Tandem DB would give us.

      So, really, in today's world - Oracle doesn't give us enough good stuff to warrant the extra expense.

    138. Re:Another question by stlhawkeye · · Score: 1
      The only folks with a worse appreciation of programming languages and application design than sysadms are DBAs.

      I can back this up with a sample size of = 1.

      We had a project that analyzed some data. It was written in a procedural DB language (I don't even konw which - PL/SQL or something?). It took approximately 38 hours to run, start to finish.

      The project was then turned over to me and another programmer to improve. They wanted the time down to under 12 hours, and they wanted us to tweak the PL/SQL to do it. We both looked at this hopeless plate of spaghetti code and shrugged. The other guy said, "I don't know where to even begin. We'd be better off re-building the thing from the ground up."

      No. Impossible. The schema is fixed, other applications already depend on it. Ok, fine, then, can we throw out this PL/SQL and re-write it in Perl or C?

      No. Impossible. There's no time.

      We did it anyway, and got the thing to run in 45 minutes. They were overjoyed at the efficiency improvement. We also included on-the-fly decompression of the data as the C binary slurped it, so that uncompressed versions of these files (calling records from a telecom, on the order of 4-6 GB apiece, and we had one file per month per billing system and the client had a half dozen billing systems) needn't be kept.

      The Oracle DBAs were a non-stop obstacle, refusing to let us do ANYTHING with the database except load data into tables and pull it out. We had to kiss their asses just to get index added or removed. One of the efficiencies was to remove indeces, load data, and then re-apply them. This ended up being much faster than inserting data into indexed columns. They wouldn't hear of it. We wrote sanity checks into the C code to ensure unique data and it was STILL faster they STILL didn't like it.

      I've been working with Oracle DBAs for about 6 years, and so far, I've yet to figure out what exactly they DO. They never help me with schema design, sniff at query optimization as if such drudgery were beneath their vast expertise, and dart their eyes sideways at me while huffing and puffing when I ask them to fix locked tables as if I'm interrupting some serious work. But unlocking busted tables is basically the ONLY THING I've ever seen them do. Sometimes they bounce the oracle server. But as far as I could tell their job was to know the Oracle dba login password, unlock tables (in TOAD), smoke cigarettes, and treat everybody else like shit.

      Maybe it's been the corporate cultures, but I've worked with them in three industries (medical, financial services, telecommunications) at four companies and experienced this monotony of behavior all around.

      Maybe I'm just a dickhead and I have it coming. :)

      --
      "I have never won a debate with an ignorant person." -Ali ibn Abi Talib
  6. Helllooo?? Editors?? by wfberg · · Score: 4, Informative

    Not only is this article just 2 links to some other slashdot articles, but the "comparison" of mysql and postgres article from 6 years ago.. Doesn't compare them! It's an article, like this one, asking for some comments.. So not only does this article add no news for nerds, it even misrepresents links to this very site, which the editors, again, are too lazy to even follow? Come on, people!

    This sort of whoring-for-comments article should be a poll.

    --
    SCO employee? Check out the bounty
    1. Re:Helllooo?? Editors?? by geoffspear · · Score: 1, Flamebait
      You haven't heard of Ask Slashdot?

      You must be new here. How'd you get a user ID in the 24000s? Are they recycling old ones now?

      --
      Don't blame me; I'm never given mod points.
    2. Re:Helllooo?? Editors?? by Dot.Com.CEO · · Score: 1

      This is an ask slashdot template: "I have a problem, can the slashdot collective help me?". This is stupidity: "Is Gnome better than KDE? What's your opinion?"

      --
      Mother is the best bet and don't let Satan draw you too fast.
    3. Re:Helllooo?? Editors?? by Tablizer · · Score: 1

      If you don't like slashdot, than cancel your subscription.

    4. Re:Helllooo?? Editors?? by rez_rat · · Score: 1

      I think they ARE recycling old ones!! :-P

      S-

    5. Re:Helllooo?? Editors?? by Cainam · · Score: 1

      This is an Ask Slashdot. The poster is asking a question. He is referring to an older Ask Slashdot article and wondering if things have changed in the six years since it was posted.

      What's the problem?

  7. popularity by ignorant_newbie · · Score: 1

    I met david axmark on a Linux Lunacy cruise, where he was talking about how great mysql was. When pressed about things like transaction support ( this was a couple of years ago ) and stored procedures he responded "yes, well, it's the most popular database on the planet".

    He didn't seem to be at all bothered that this the main argument people give for using windows.

  8. My point of view by TruthSeeker · · Score: 2, Informative

    I'm using both, but mainly Postgres. From what I can tell:

    Postgres 7.5
    Pros:
    - Supports stored procedures
    - Supports triggers
    - Supports schemas
    Cons:
    - Heavy on resources

    MySQL 4.0
    Pros:
    - Fast
    - Easier to find PHP scripts that use it
    Cons:
    - Bad relational support (and yes, I know about InnoDB, but even then, it's a bit ... well, bad)
    - No stored procedures/triggers
    - Easily corrupted by crashes.

    --
    I sense much beer in you. Beer leads to intoxication, intoxication leads to hangover. Hangover leads to sobering.
    1. Re:My point of view by einhe1t · · Score: 4, Informative

      Parent is comparing non-current versions, and making up false "cons" for mysql, out of thin air...

      Mysql 4.1 is the current stable version, and 5.0 is nearing release.

      4,1 has excellent relational support, it is damn near impossible to corrupt if db design is correct, and innodb is great. IIRC ./ has been running on mysql + innodb for years. It also support clustering "out of the box".

      5.0 has views, triggers, stored procedures etc, and it's still amazingly fast.

      Note: I base my mysql 4.1 comments on the linux version. I have heard that there is a version of mysql for windoze, but I can't vouch for it, and for all I know, it could be a disaster, but I don't really have anything definitive to say about it. Who knows, maybe original poster is talking about mysql on windoze (shrug)

    2. Re:My point of view by scrutty · · Score: 4, Informative

      There is no postgresql release 7.5. The last 7.x release was 7.4 , the current stable is 8.0 with 8.1 in beta.

      --
      -- Oh Well
    3. Re:My point of view by sbenj · · Score: 1
      I've also used both, and agree with you with a few caveats.

      -I haven't had crash issues, everything's pretty much worked as advertised.
      -I'd read that the biggest issues) for me with MySQL, the limitations in using subqueries, were in the process of being fixed. That'd make the 2 basically equivalent for me, at least in functional terms (coming from a developer's perspective here, not a DBA)

      I'd like to see benchmarks, but other than that both systems are fabulous, I really appreciate the work that's gone into them. And they're much easier to work with than oracle (where you often get the impression that they intentionally obfuscate things to justify the cost).

    4. Re:My point of view by TruthSeeker · · Score: 1

      True, must be something specific to the Debian package ... Don't know why they did that tho.

      --
      I sense much beer in you. Beer leads to intoxication, intoxication leads to hangover. Hangover leads to sobering.
    5. Re:My point of view by Anonymous Coward · · Score: 0

      MySql is the Windows 95 of the DBMS world.

      Once the 5.x branch is regarded as production quality and the issues raised at http://sql-info.de/mysql/gotchas.html have been addressed then I'll consider it as something more than a toy. Until then, I'll stick with Postgresql.

    6. Re:My point of view by Anonymous Coward · · Score: 0

      Postgres isn't a speed slouch either, if you're judging by the "butt dyno" with terms like "amazingly fast."

      I like to use PostgreSQL because it adheres to the standards better. Plus, I don't have to deal with this list (infamous, for certain)

      http://sql-info.de/mysql/gotchas.html

      There's also a quote out there about one of the primary devs not knowing the difference between a PRIMARY KEY and a UNIQUE field. That is not the kind of leadership I want in a database.

    7. Re:My point of view by Tablizer · · Score: 2, Insightful

      And they're much easier to work with than oracle (where you often get the impression that they intentionally obfuscate things to justify the cost).

      To be fair, Oracle targets the really high-end apps or performance where hiring a dedicated Oracle expert(s) is worth it.

      I doubt even Postgre can match the performance, reliability, and scalability of Oracle. Only IBM DB2 can come close so far. Postre may compete with Sybase and SQL-Server's level.

      Thus, you are comparing apples to oranges.

      Although for read-only speed, some RDBMS do seem faster than Oracle. Oracle seems optimized for a fairly even mix of reads and writes and reliability. Thus, if you sacrafice one of these, you perhaps may find something a bit faster (or at least easier to tune for such.)

      (And please find a better name for Postgre. I keep thinking "post nasal green drip" when I see the name.)

    8. Re:My point of view by typical · · Score: 1

      Also, the Postgres people don't try to trick you into buying a non-GPL license when you have no reason to do so.

      --
      Any program relying on (nontrivial) preemptive multithreading will be buggy.
    9. Re:My point of view by Herschel+Cohen · · Score: 1

      RE: "... much easier to work with than oracle (where you often get the impression that they intentionally obfuscate things to justify the cost)"

      Not necessarily, compared to Sybase Oracle is carrying a lot of excess baggage from older versions. Moreover, until quite recently it has lacked some of the best features in Sybase. However, not ever having used Oracle take on temporary tables it too might like (SQL Server) MS use of the Sybase base language and model where they threw away the advantages by being just a bit too cute. My impression was that Oracle honed the cursor functionality (and perhaps its performance characteristics that are horrible on Sybase).

      My major impression comparing Oracle's PL/SQL to Sybase's Transact-SQL was how relatively straight forward and elegant the latter was.

    10. Re:My point of view by zufar · · Score: 1

      * MySQL: o Native Windows version o Large base of compatible applications and software o Easy to get running * PostgreSQL: o Fast yet with an incredible feature set o Excellent data integrity (vital for serious database work!) o Very, very stable and reliable from http://sql-info.de/mysql/vs/mysql-versus-postgresq l.html

    11. Re:My point of view by cortana · · Score: 0, Flamebait

      postgresql (7.5.0) experimental; urgency=low

          * Initial release of transition package to new multicluster/multiversion
              architecture.

        -- Martin Pitt Tue, 15 Feb 2005 22:58:37 +0100

      Silly wabbit, using Unstable on a production machine. ;)

    12. Re:My point of view by asdfghjklqwertyuiop · · Score: 2, Interesting

      4,1 has excellent relational support, it is damn near impossible to corrupt if db design is correct, and innodb is great. IIRC ./ has been running on mysql + innodb for years. It also support clustering "out of the box".


      Excellent relational support? Please. Does 5.0 fix the issue where an insert of an invlalid date into a date field will instead insert '00-00-0000' into the field instead of aborting, like real databases do? And what the fuck is the 00-00-0000 default anyway? That isn't even a valid date unless mysql is running on a 13 month calendar! How about SQL standard comments? How about when you have a NOT NULL column and insert default values, does 5.0 abort or just totally ignore the constraint and insert a 0 or NULL?

      Enterprise ready... excellent relational support... sure. They don't even have the relational database 101 stuff working yet.

    13. Re:My point of view by nxtw · · Score: 1
      4.1 has excellent relational support

      I must disagree. I was running 4.1 and trying to do a multiple JOIN query using inline views. There were about 50,000 rows in each table. I first tried the query in Access using ODBC connecting to MySQL, and MySQL used up so much CPU that it nearly locked up the server. I figured it could be an ODBC issue, so I installed MySQL locally and tried the query in the command line client (after making some slight changes), and the same thing happened.

      I copied the tables into Access and the same query executed in less than 5 seconds. Since that moment, I have vowed never to use MySQL again.

    14. Re:My point of view by einhe1t · · Score: 1

      That is not at all in line with my experience of mysql - just out of curiosity, was this mysql on ms windoze?

    15. Re:My point of view by nogginthenog · · Score: 1

      No stored procedures

      You're kidding, right? I mean, seriously, no SPs? Erm, no thanks!!

    16. Re:My point of view by nxtw · · Score: 1
      o Native Windows version

      As of 8.0 PostgreSQL also has a native Windows version.

    17. Re:My point of view by lphuberdeau · · Score: 1

      Did you try indexing a few fields? Using EXPLAIN on your query? I saw MySQL performing complex queries on thousands (even millions a few times) in fraction of seconds. I just can't believe Access can be faster than MySQL.

      --
      Qui ne va pas à la chasse n'a pas de gibier
      PHP Queb
    18. Re:My point of view by nxtw · · Score: 1

      I don't think that's significant at all, as MySQL seems equally poor on any platform, but I was using Linux at first & and after the second time it went out of control, I used Windows MySQL on the local machine I was using.

    19. Re:My point of view by nxtw · · Score: 1
      Did you try indexing a few fields? Using EXPLAIN on your query? I saw MySQL performing complex queries on thousands (even millions a few times) in fraction of seconds. I just can't believe Access can be faster than MySQL.

      I was joining on indexed fields. The WHERE clauses were on various fields that I did not take any time trying to figure out *why* it was going slow, as I was moving away from MySQL. The same fields that were indexed in MySQL were indexed in Access. I ended up copying the tables into Access and I got much better results.

      I just can't believe Access can be faster than MySQL.

      Well, try turning off the anti-MS reality distortion field...

    20. Re:My point of view by dedazo · · Score: 1
      The "Windoze" (haw, haw!) version of MySQL 4.1 is an excellent product. Assuming one can get over MySQL's inherent problems, if you don't need niceties like SPs, UDFs, triggers and the like MySQL is perfect for those small departamental apps that were saddled by badly-designed Access databases.

      The admin interface is great, though the other tools are not that hot. But since you can get to MySQL via ODBC, you can actually use any ODBC-compliant query/management tool to work with the data.

      So don't worry about the "Windoze" version of MySQL, it's doing fine. We've replaced a few Access and MSDE setups with it, and I'm happy. We're also running a few applications internally (blogs and portals) that use it, and it also shines. No need to retrain devs/admins on Linux (though that's the ultimate objective, to move a lot of stuff over to it). It's not going to replace out MSSQL or Oracle databases, but then that's not the point.

      "Windoze"? Haw, haw!

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    21. Re:My point of view by Anonymous Coward · · Score: 0
      Postre [sic] may compete with Sybase

      I truly hope you're joking. An empty can of Coke with a dead bee in it is more useful than Sybase. Even SQLite is more useful than Sybase, and far less ghey.

    22. Re:My point of view by TruthSeeker · · Score: 1

      Well, actually it's a testing with some remains of an unstable ... on a development machine. I should have checked the servers instead.

      --
      I sense much beer in you. Beer leads to intoxication, intoxication leads to hangover. Hangover leads to sobering.
    23. Re:My point of view by Anonymous Coward · · Score: 0

      But yet the issues raised at http://sql-info.de/postgresql/postgres-gotchas.htm l are irrelevant to your usage of Postgresql, right?

    24. Re:My point of view by Anonymous Coward · · Score: 0

      Oh no. You did not just expect your remark to be taken seriously (not that you gave any supporting evidence) with the use of the 'word' 'ghey'.

    25. Re:My point of view by tangledweb · · Score: 5, Funny

      So this is what passes for "Score 5: Informative" now?

      Invent an imaginary version of postgres to compare to a real version of MySQL, then spout some fictional cons. In that case:

      I'm using both, but mainly Postgres. From what I can tell:

      Postgres 7.841
      Pros:
      - Supports african dialects such as Kaliharinese
      - Adds extra features when it detects that the user is a Womble
      - Compatible with IP/feline
      Cons:
      - Runs slowly if you try to quieten your hard drives with banana peels

      MySQL 4.841
      Pros:
      - Written entirely by Ooompa Loompas
      - Discourages the use of Perl
      Cons:
      - Supports animal testing. Drips of MySQL are places in the eyes of penguins to check for irritation.
      - Shows signs of money contamination, which brings hippies out in a rash
      - Does not support transactions.

    26. Re:My point of view by huiac · · Score: 1

      I suspect that your query used no JOIN, subquery or complex conditions; my general experience is that MySQL can pull rows out of a single table based on column value(s) pretty fast, but the more complex your query is the more MySQL sucks.

      huiac at internode.on.net

    27. Re:My point of view by einhe1t · · Score: 1

      Assuming one can get over MySQL's inherent problems, if you don't need niceties like SPs, UDFs, triggers and the like MySQL is perfect for those small departamental apps that were saddled by badly-designed Access databases.

      Actually starting with version 5, mysql has SPs, triggers, UDFs and the like. Any other complaints?

      It's good to hear that you're able to work mysql into your "small departmental apps" - being so lightweight and easy to work with, it's a natural. But it's also great for millions-of-hits-a-day sql driven websites (you have heard of slashdot, no?) and I can report that mysql is performing admirably in some demanding, mission critical roles. It's not oracle, but then again, not every database has to be oracle.

    28. Re:My point of view by Anonymous Coward · · Score: 0

      There's PgSQL 7.4 and PgSQL 8.0. There have been a couple of betas of 8.1 so it looks like it's just around the corner... but... no 7.5. Dunno what you're using, but I believe you're supposed to pass the dutchie on the left hand side...

      Oh yeah, and the whole thing about MySQL being fast is a history. Pg is pretty close in speed for most stuff and slaughters MySQL for anything at all complicated..

    29. Re:My point of view by dedazo · · Score: 1
      Any other complaints?

      Well yes.. um, that for the past six years it hasn't while all other 'real' databases had? Maybe?

      I like MySQL, and I think 5 will be even better. Just don't give me that 'tude, please. Right now it's a toy database good for running blogs and the like.

      you have heard of slashdot, no?

      Yes, and given the amount of time the site spends spewing 503's I'd say that's not a great endorsement. But yes, MySQL scales very well.

      not every database has to be oracle

      No, just the one that requires SPs, triggers, referential integrity, UDFs, replication, row-level locking... you know. Things like that.

      For everything else, MySQL is fine.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    30. Re:My point of view by Moosbert · · Score: 1
      (And please find a better name for Postgre. I keep thinking "post nasal green drip" when I see the name.)


      Well, the name is not "Postgre" in the first place, just as much as the name of that other product is not "My".

    31. Re:My point of view by fferreres · · Score: 1

      NOT NULL means the field can't be empty. If you CHOSE a default value, you meant you wanted the default value.

      Example: prefered meal? (default=0)

      0 = Did not answer
      1 = Pasta
      2 = Pizza
      3 = Soup

      If you don't want that, you just don't use a default value and mysql will complain (warning, or error if you choose so). If you are doing trnsactions (not single inserts) you will be using innoDB or similar, and you can tell the databse to produce and roll back the transaction.

      --
      unfinished: (adj.)
    32. Re:My point of view by ajs318 · · Score: 1

      I haven't found MySQL to be too sensitive to crashes -- except once, in the case of a table with c.28M records and indices on several fields. This is used in a read-only application, being rebuilt from sources every quarter. One day, the server lost power when someone {I won't say which telephone company they were working for, lest someone misread it and think I am saying nasty things about BitTorrent} pulled the wrong plug.

      It was taking forever to repair the table {and breaking the bootup process}; but fortunately, I had bzip2'ed copies of the .MYD and .MYI files from just a week earlier when I had copied the database to another server. Once I had got the affected box into single-user mode and chmod -x'ed the mysql initscript, I just had to go multiuser, copy the bz2 files from the CDs and bunzip2 them. And when I mended the initscript, mysql started up like nothing had happened.

      For this one particular application, which is straight lookups, MySQL really does rock. Every query is a SELECT * and uses an indexed field in the WHERE clause, and it's lightning fast. We don't need transactions, stored procedures or triggers. Beside which, all the calls to the database are being made from a scripting language, so it'd be a bit like giving Edward Scissorhands a penknife.

      But there's a postscript. The source data comes as flat text files on CDs, which are records containing fixed-width fields which are keys to other files. Proper old-school database stuff {it's also available on various types of tape cartridges and probably even on punched cards}. So building the database in the format we needed involved building intermediate databases {or massive arrays}. Now, the guy who used to deal with the building of the big database left the company for pastures new, and I couldn't make head or tail of the scripts he had written to do the job -- so I rewrote the whole lot from scratch and documented everything properly this time. He had used MySQL for the intermediate databases, and the build took weeks. I used Perl's dbmopen function, which basically treats a GDBM file as an associative array -- and got it done in days, including building a new GDBM file from an old MySQL database {which won't need to be done ever again now, touch wood}. So MySQL is not always the fastest .....

      --
      Je fume. Tu fumes. Nous fûmes!
    33. Re:My point of view by Bloke+down+the+pub · · Score: 1
      Does not support transactions.
      Really?. Your other points were bang on the mark, though.
      --
      It's true I tell you, feller at work's next door neighbour read it in the paper.
    34. Re:My point of view by ostrich2 · · Score: 1
      ...it is damn near impossible to corrupt if db design is correct...


      Seriously, not corrupting data is the first task of a database. Having a correct design is not a requirement. No matter how bad my design is, the database should never corrupt itself. If it does, it's a bug. End of story.

    35. Re:My point of view by jadavis · · Score: 1

      I haven't found MySQL to be too sensitive to crashes -- except once, in the case of a table with c.28M records and indices on several fields. This is used in a read-only application, being rebuilt from sources every quarter.

      I think once counts as "too many" when talking about database crashes. I have never had an issue with PostgreSQL's reliability (however, Linux of course has issues, so sometimes the database server might have a problem with that).

      I also wonder how MySQL would manage to corrupt itself when it's a read-only database.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    36. Re:My point of view by einhe1t · · Score: 1

      Seriously, not corrupting data is the first task of a database. Having a correct design is not a requirement. No matter how bad my design is, the database should never corrupt itself. If it does, it's a bug. End of story.

      Well, to be a bit clearer here, I'm not talking about corrupting the actual data in the tables, I'm talking about creating an inconsistent database. There are all sorts of ways to do this with a naive database design, even though the actual contents of the tables, viewed in isolation, are sound.

      I've never had any data in a mysql db be corrupted, but then again, I'm basing that on my experience running mysql on linux. I have no idea if there are data corruption problems with mysql on other platforms.

    37. Re:My point of view by einhe1t · · Score: 1

      Well yes.. um, that for the past six years it hasn't while all other 'real' databases had? Maybe?

      Maybe you need to quit living in the past - get over it man, mysql in 2005 isn't what it was in 1998.

      I like MySQL, and I think 5 will be even better. Just don't give me that 'tude, please. Right now it's a toy database good for running blogs and the like.

      Look who's got the 'tude here. does calling mysql a "toy" make you feel like a guru or something? It works for me, and quite well, thank you - and not for "blogs", but some pretty intense production apps - so it's way more than a toy. IMHO ms access is the toy, if you want to put things in perspective.

      SPs, triggers, referential integrity, UDFs, replication, row-level locking... you know. Things like that.

      For everything else, MySQL is fine.


      There you go with that smart ass 'tude again. Just to give you a gentle heads-up, mysql has had row-level locking, referential integrity and replication for awhile now, and at this point, it also had SPs, triggers and views. I guess that pretty much puts your arguments to bed.

      Feel free to go study up on the subject, then come back and we can talk some more.

    38. Re:My point of view by Tablizer · · Score: 1

      Well, the name is not "Postgre" in the first place, just as much as the name of that other product is not "My".

      Point taken. However, even the full name sounds like "post nasal grease", which is not an improvement IMO. I feel funny trying to sell a PHB on the software with such a name.

    39. Re:My point of view by dedazo · · Score: 1
      get over it man, mysql in 2005 isn't what it was in 1998

      Really. That's interesting, because I distinctly remember people (as in the religious advocates) telling me in no uncertain terms that MySQL was "better" in some nebulous way than Oracle and MSSQL. In 1999. And 2000. And 2001. And 2002. You get my drift, eh?

      does calling mysql a "toy" make you feel like a guru or something?

      No... nope. Just the facts ma'am.

      IMHO ms access is the toy

      Never said it wasn't. And yet Access has supported SPs (nee 'queries') since version 1. Referential integrity since version 2. And so on. Weird, huh? That doesn't make it less of a toy, of course.

      There you go with that smart ass 'tude again

      Well, I have a sort of fondness for SPs and triggers and UDFs and built-in diagramming and transformation services and meaningful metadata support and built-in scheduling and push/pull replication subscription systems and force-commit transaction recoverable stable storage and the like. I'm just weird that way.

      I guess that pretty much puts your arguments to bed

      I guess it does. I mean, ON UPDATE CASCADE was added to version 4.0.8. You only get row-level locking with InnoDB, which carries other problems if you wanted to use MyISAM to begin with. Come to think of it, Neither Oracle nor Sybase nor MSSQL asks me what 'type' of table I want to use... WTF? But anyway, these typical "OMFG MYSQL IS TEH BOMBZ" semi-sentient rants have been par for the course for many years. Why should I expect that to change? Sure, your database is the best in the world. Nothing even comes close to it. Happy?

      Feel free to go study up on the subject

      Sure thing.

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
    40. Re:My point of view by einhe1t · · Score: 1

      I distinctly remember people (as in the religious advocates) telling me in no uncertain terms that MySQL was "better" in some nebulous way than Oracle and MSSQL. In 1999. And 2000. And 2001. And 2002. You get my drift, eh?

      Well, in some areas, not nebulous by any means, mysql has been superior to a number of big name databases - for instance there's the matter of speed. mysql was designed out of frustration with the sluggishness of existing databases, when tasked with driving web apps. it's also extremely easy to deploy, and the resource requirements are remarkably modest. In a lot of secnarios, that's worth more than some of the extra special wowsers options you can get with oracle.

      Well, I have a sort of fondness for SPs and triggers and UDFs and built-in diagramming and transformation services and meaningful metadata support and built-in scheduling and push/pull replication subscription systems and force-commit transaction recoverable stable storage and the like. I'm just weird that way.

      Nothing wrong with that - you should use the databases that come with all that cool stuff, if that's what you require - but keep in mind that not everybody has the same requirements as you. Your ilk tends to denigrate as "toys" anything that doesn't meet your rather esoteric (come on and admit it) requirements.

      But anyway, these typical "OMFG MYSQL IS TEH BOMBZ" semi-sentient rants have been par for the course for many years. Why should I expect that to change? Sure, your database is the best in the world. Nothing even comes close to it. Happy?

      I think you may be confused here - it certainly sounds like it. you go from one extreme "mysql is a toy" to the opposite extreme "mysql is the best in the world", but a more sane assessment puts the truth somewhere between the two extremes you managed to touch on.

      BTW what's with the "your database" routine? I didn't invent mysql. It just happens to be one of many tools that I find useful quite often. I also find other tools useful - e.g. berkeley db, apache, bind, java, oracle or firefox. I am certain that for each of the tools I mentioned, there is a crank somewhere out there who will rant about how bad it is.

    41. Re:My point of view by Anonymous Coward · · Score: 0

      Fork it and rename it.

  9. Comment removed by account_deleted · · Score: 1, Redundant

    Comment removed based on user account deletion

  10. Also by TheRaven64 · · Score: 4, Funny

    I have been wondering, which is better, vi or emacs?

    --
    I am TheRaven on Soylent News
    1. Re:Also by Anonymous Coward · · Score: 0

      I am so sad that I wasted my mod points on things other than modding this +1 funny.

    2. Re:Also by DataPath · · Score: 1

      Neither. Use ed!

      --
      Inconceivable!
    3. Re:Also by McGiraf · · Score: 1

      that is an easy one:

      joe

    4. Re:Also by BoomerSooner · · Score: 1

      I like Textpad or in a worse case scenario VIM but that is worse case only.

    5. Re:Also by Anonymous Coward · · Score: 0

      vi, of course!

      Don't listen to those emacs/joe/M$ Word _l_users.

    6. Re:Also by cnettel · · Score: 4, Funny

      Regarding potential for being a RDBMS, I would vote for emacs. I'll leave it to you to decide if that's a good thing...

    7. Re:Also by Tablizer · · Score: 1

      I have been wondering, which is better, vi or emacs?

      Neither supports subqueries, so we dumped them both :-)

    8. Re:Also by Tumbleweed · · Score: 1

      Nano.

    9. Re:Also by amcdiarmid · · Score: 1

      well then, how about: |more or |less?

    10. Re:Also by Anonymous Coward · · Score: 0

      I have been wondering, which is better, vi or emacs?

      I don't think its anything like vi vs emacs, because I don't actually see anyone seriously saying MySQL is better than Postgres. I did see one person explain why ISP's prefer it, but even he was not saying it was a better database. Instead I see "MySQL has data corruption issues" and "I switched from MySQL to PostgreSQL"..

      Me? I also switched from MySQL to Postgres for development projects. But I don't mind that my website (Drupal-powered blog) runs on MySQL.

    11. Re:Also by Anonymous Coward · · Score: 0

      As regular XEmacs users, we are well aware which is better. The answer is to use viper-mode. All the joys of Vim, with none of the difficult RSI inducing keystrokes.

    12. Re:Also by mnemonic_ · · Score: 1

      Technically, vi is better.

      Why? Just because.

    13. Re:Also by shywolf9982 · · Score: 1

      My sister, at the age of 14, used vi to write a school paper in latex (writing commands and such). Vi owns.

      --
      nbody2002:If you can read this you may be addicted to the internet
    14. Re:Also by fm6 · · Score: 1
      If you're making a joke, ha ha. If you're making a point -- that it's all about the personality of the developer, then you're way off base. There are some really serious issues here. Is MySQL really faster for simple queries? Does PostgreSQL's more complete RDBMS feature set matter to web developers?

      Until recently, most Slashdot stories have assumed that MySQL was it as far as free database engines were concerned. Lately, we've been a little better informed, but I still haven't seen a good comparison of MySQL versus the PostgreSQL or Firebird. I browsed this discussion hoping for some useful comments, but all we have so far is a long and pointless flame war about the SCO connection, and of course the usual lame jokes.

    15. Re:Also by ElektroHolunder · · Score: 1

      Wouldn't that be a RMSRDBMS?

    16. Re:Also by Anonymous Coward · · Score: 0

      And it was written by R[DB]MS.. (sorry)

    17. Re:Also by ignavus · · Score: 0, Offtopic

      Let's nip this one in the bud:

      vi is better than emacs, but mcedit is better than either.

      debian is better than the other distros.

      PostgreSQL is better than MySQL (which makes puppies want to cry).

      WindowMaker is simply elegant, and better than than either Gnome or KDE, but Gnome is better than KDE.

      Right. Can I offend anyone else?

      Ah, yes, I can. Perl is better than Python, because it simply is. Syntactic whitespace is spawn of the devil, while we all know that Larry Wall is a Nice Guy(TM).

      But, he whispers, PHP is better than Perl (sorry, Larry).

      And JavaScript is not as bad as people make out - quite a nice little language in my opining. It's only silly flaw was allowing newlines to terminate statements (see evil whitespace comment above).

      Commandline is faster than GUI, but mc is faster than command line (otherwise why do you use vi or emacs instead of ed, hmmm?????)

      Which brings me back to the original question. Er, what was it again?

      --
      I am anarch of all I survey.
    18. Re:Also by laffer1 · · Score: 1

      Funny.. but lets get even more specific.. versions of vi..

      vi
      nvi
      vim ...

      I vote for nvi since i don't need syntax hilighting in the CLI.

      As for emacs, some people roll that way.. i don't.

      Back to database land... does anyone know of any resource on migrating between mysql and postgres? I've been thinking about porting my blogging software to postgres from mysql. It has terrible mysql specific sql in it at the moment and tons of data to convert. Any thoughts?

    19. Re:Also by sco08y · · Score: 1

      Regarding potential for being a RDBMS, I would vote for emacs.

      Come to think of it, I wrote an implementation of Chris Date's A language in Scheme. Never tried running it under emacs, but that would, techinically, be a *true* RDBMS...

  11. Been using MySQL, but... by imbaczek · · Score: 1, Interesting

    ...I'm starting to feel more and more drawn to check Postgres out. I've been mostly happy with MySQL though; I just want to see what I'm missing (VACUUM scares the shit out of me - but is it still there?)

    1. Re:Been using MySQL, but... by MemoryDragon · · Score: 1

      I would be more scared by having corrupted data on mysql (which happens more often than you can think) thank having a task trigger from time to time which does vacuum on the db repo without damaging anything. Yes vacuum still is there, almost any db has it, it helps to keep the db fast and yes there are facilities which let you do the task automatically.

    2. Re:Been using MySQL, but... by Anonymous Coward · · Score: 3, Informative

      In recent versions of PostgreSQL, VACUUM still exists but is non-locking (i.e. it will not block concurrent database activity). There are tools available to run VACUUMs automatically as the database is in use, and recent versions of Postgres have been tuned so that the I/O performed by VACUUM should have less of an effect on the rest of the system.

    3. Re:Been using MySQL, but... by kanazir · · Score: 1

      Put /usr/local/pgsql/bin/vacuumdb -U pgsql -a -z in your crontab and forget about it...

    4. Re:Been using MySQL, but... by Anonymous Coward · · Score: 0

      Can somebody please offer an abbreviated description of VACUUM and why it has a bad reputation? Thanks.

    5. Re:Been using MySQL, but... by TheSunborn · · Score: 1

      To do a VACUUM in postgresql mean that all deleted rows are really freed. When dooing VACUMM it also collect sample data(if you do a VACUMM full) about your data distribution, so it better can predict when to use an index. It used to have a bad repitation, because en early versions of postgresql, it required a write lock on the entire table, thus blocking all update/insert. But it does not block anymore, and thus is not really a problem.

    6. Re:Been using MySQL, but... by WindBourne · · Score: 1

      To the best of my knowledge, it does not have a bad reputation. It is simply a process that needs to run every so often. Some ppl would prefer to not to do that. IOW, they want the clean to occur during run time. Me, I will take the cleaner faster approach, even though it takes more disk and memory resources.

      --
      I prefer the "u" in honour as it seems to be missing these days.
    7. Re:Been using MySQL, but... by quantum+bit · · Score: 1

      and for any FreeBSD users out there, when you install PostgreSQL from the ports collection, it automatically sets up a cron job that will vacuum all databases nightly (at the same time the daily periodic script runs, 3:01).

      You can disable it easily if you want to use a different schedule or the autovacuum daemon, but "out-of-the-box" simple databases don't need to worry about it.

    8. Re:Been using MySQL, but... by jadavis · · Score: 1

      PostgreSQL is great, and I encourage you to at least give it a try. Certainly write to the mailing lists with your experiences, particularly if you are having difficulty with something (see the pgsql-general list).

      VACUUM is nothing to be scared of. In the upcoming 8.1 (currently in beta) you don't even need to think about it. It's basically just a command that tells PostgreSQL "Now's a good time to do some cleanup and maintenance work". Now, in 8.1, it automatically uses statistics to determine the best time to do that work, and how often.

      Also, for the past few years, VACUUM is non-locking. That means that if PostgreSQL chooses to VACUUM just before a lot of activity starts, the VACUUM won't interfere with that activity.

      In practice, VACUUM usually only causes a problem if you go a long time without VACUUMing. After a while, the planner can start to make bad choices, and the tables can get cluttered with dead tuples.

      But, like I said, you don't need to know about this stuff because it's all automatic in 8.1.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  12. Yawn indeed by Anonymous Coward · · Score: 0

    There'll be under 400 posts. It's a boring subject except for a selected few. Plus it is a vacation day as you correctly pointed out.

    1. Re:Yawn indeed by truckaxle · · Score: 1

      Plus it is a vacation day as you correctly pointed out

      Are you suggesting the average slashdot reader is enjoying this long weekend like normal folk do?

      Right now the majority of denizens of slash are peering into monitors in the mothers basement, studio apartments, wifi in the coffee shop, upstairs in the overheated spare bedroom, or dorm rooms. Sitting motionless except for the sporaidic deft fingers clicking on the keyboard of slow arc movement of the mouse. Sad but true. Wait my mom is yelling for me upstairs I gotta go....

  13. Re:The most interesting part of the old article... by adamwood · · Score: 2, Funny

    You are such a noob :-)

  14. Found one! :) by Spy+der+Mann · · Score: 2, Informative
    1. Re:Found one! :) by llefler · · Score: 2, Informative

      Ok, that's a silly review. For MySQL they claim to be comparing the features of 4.1.x, and yet under features: views, schemas, subselects, stored procedures, triggers - yes (>=5.0)

      If they're going to compare releases, compare apples to apples. Either pick stable releases or development releases. And FWIW, nobody that I know personally has been able to get MySQL 5.0 to run reliably, if they can even get it to launch. If we use MySQL for a project, it's 4.1.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    2. Re:Found one! :) by Anonymous Coward · · Score: 0

      Small potatoes I know - but I've got MySQL 5.0.12 running a ThumbsPlus database on Windows with a few gig of image data, reliably.

  15. Spatial databases by MostlyHarmless · · Score: 4, Informative

    I don't have any thoughts about the more general question, but PostgreSQL is much better at storing spatial data than MySQL. MySQL has spatial functions built in, but it only supports a subset of the OpenGIS functions (basically anything that can be done entirely with bounding boxes). PostgreSQL uses an external modulem PostGIS, which supports the full OpenGIS specification and a bunch of other extension functions besides. I've used MySQL by default simply because it is more familiar to me, but I've switched to PostgreSQL for my current project simply because of the spatial data module.

    --
    Friends don't let friends misuse the subjunctive.
    1. Re:Spatial databases by Anonymous Coward · · Score: 0

      I had a professor laugh me out of his office once for talking about PostGIS. Supposedly it uses some bounding box implementation to fit spatial data into tables rather than extending the db to build an actual spatial datastructure. I'm not sure how much the guy really knew, but it seemed plausible enough. I've remained suspect of PostGIS ever since.

      Spatial extensions are only useful if the're implemented spatially.

    2. Re:Spatial databases by Anonymous Coward · · Score: 1, Informative

      At least Postgres had the nice type system already to be extended. As for the spatial indexes PostGIS has GiST-based R-Tree spatial indexes.

      Note this is not ideal and the PostGIS community is trying to scare up funds for a couple of mad finns (Oleg and Teodor) to fix up Postgres with the required concurancy support for GiST and row level locking.

      http://www.directionsmag.com/article.php?article_i d=891
      http://archives.postgresql.org/pgsql-hackers/2005- 06/msg00294.php

      Actually if you wanted to actually speed things up implementing row level locking would help everyone .

      Potgres knows where it needs to improve, support the mad hackers.

    3. Re:Spatial databases by MostlyHarmless · · Score: 1

      What your professor probably was referring to is the fact that geometry objects are indexed by their bounding box. The index is still certainly a spatial data structure (an R-Tree variant). I'm sure you can construct a case where indexing based on the bounding box fails terribly (for instance, an operation you use for further selection may have little correlation to the relative positions of bounding boxes). I think most people wouldn't run into that, however. Bounding boxes also have the advantage that the index can be implemented the same way no matter what type of geometry is stored in a column, or even if the column is heterogeneous.

      --
      Friends don't let friends misuse the subjunctive.
    4. Re:Spatial databases by MBraynard · · Score: 1

      As you seem to have some expertise in this area, what kind of GIS data capabilities does MS SQL Server have?

  16. PostgreSQL is supreme A LOT by michalf · · Score: 4, Interesting

    there is a short (decent) comparison at this url.
    From my point of view (web application developer, Ozone framework author and the author of a few rich-content websites I can say for sure: I am more than happy to discover PostgreSQL. Why? More Oracle-like, transactions, nested transactions, views, sql-schema... I doubt MySQL 5.0 will come even close to the standard of PosgtreSQL.
    Some can say MySQL is fast. No, it is not. When you run more than 100 users at once PostgreSQL is faster. MySQL has stupid table-locking mechanism that decreases performance significantly under high load.
    I would say: PostgreSQL seems to be slower, is not perfectly optimized, but much better goals in its design were used. And one of the goals ic SQL conformance. MySQL is FAR from the SQL standard.
    If you want to migrate from MySQL to e.g. Oracle - it is a pain. But PG is much closer to it.
    IMHO PostgreSQL is an industry-standard database and we use it for almost every project now. We have used MySQL some time ago and believe me - the difference is huuuuuge. PG is a real database. MySQL seems like a table-managing-application ;-)

    best regards - michal

    1. Re:PostgreSQL is supreme A LOT by ashpool7 · · Score: 1

      Postgres DOES NOT do nested transactions. I like Postgres, but that's simply not true. 8.0 has something called "savepoints" in transactions where you can abort part of a transaction, but it doesn't do nested transactions.

    2. Re:PostgreSQL is supreme A LOT by mikaelhg · · Score: 1

      http://monstera.man.poznan.pl/wiki/index.php/Mysql _vs_postgres

      CREATE TABLE a ( id INT PRIMARY KEY, number INT NOT NULL, category VARCHAR(10), description VARCHAR(255) );
      INSERT INTO a VALUES ( . . . );
      SELECT * FROM a;
      SELECT * FROM a ORDER BY 4;
      DELETE FROM a;

      For that kind of a uber-simple benchmark, I'd say that a plaintext file would have clearly won.

      At least do some JOINs, they exist in every database using application I've ever seen, bar those created for MySQL which doesn't really support JOINs very efficiently.

    3. Re:PostgreSQL is supreme A LOT by jamie · · Score: 2, Informative

      Do you know MySQL has had transactions for years now? And SAVEPOINT transactions (like Postgres, I believe). And views in 5.0. The table-locking engine you're thinking of (MyISAM) hasn't been current for maybe 4 years. If you can't handle 100 users at once blame your design, not MySQL -- MySQL powers Slashdot :)

    4. Re:PostgreSQL is supreme A LOT by michalf · · Score: 1

      I agree. But I am not the author of this comparison. The true powet of PostgreSQL comes out in the real-world aplications, not in simple benchmarks with one client ;-)

      michal

    5. Re:PostgreSQL is supreme A LOT by ttfkam · · Score: 3, Funny
      MySQL 5.0 is still in development. 4.1 is still the most up-to-date production branch.

      You're right that InnoDB has supported row-level locking for some time now. PostgreSQL uses MVCC so that you don't need a lock at all most of the time.
      MySQL powers Slashdot
      Considering how often Slashdot goes down when they have a cluster of MySQL boxes for redundancy, that's hardly an endorsement of quality.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    6. Re:PostgreSQL is supreme A LOT by Anonymous Coward · · Score: 0

      Considering how often Slashdot goes down

      Can you be more specific? How often does slashdot go down? Now you're just making stuff up.
      http://toolbar.netcraft.com/site_report?url=http:/ /slashdot.org

      Wikimedia Foundation also runs on a small cluster of MySQL servers that are nothing more than dual opterons, and that runs Wikipedia, Wikimedia, Wiktionary, Wikinews, Wikibooks, Wikiquotes, etc. etc. etc.- all languages, worldwide. They average about a thousand web requests per second (roughly 25% of that traffic hits the MySQL servers).

    7. Re:PostgreSQL is supreme A LOT by pHDNgell · · Score: 4, Informative

      Can you be more specific? How often does slashdot go down?

      Slashdot has a subtle ``down'' state where they only serve static pages. It causes neat things to break like the RSS feed that I get for my home page (any request returns a static page).

      Wikimedia Foundation also runs on a small cluster of MySQL servers

      Perhaps you don't remember their recent outtage that took the entire thing off the internet for a day or two while they had to completely rebuild their database from backups. All of the mySQL apologists were quick to point out that databases should be expected to be all corrupt and stuff when they lose power. Users of real databases were amazed that anyone would think that.

      --
      -- The world is watching America, and America is watching TV.
    8. Re:PostgreSQL is supreme A LOT by Anonymous Coward · · Score: 0

      For the love of god - MYSQL SUPPORTS MVCC TOO!

      Just quit using MyISAM tables, switch them to InnoDB. If I have a table thats 90% reads, I'll use MyISAM, InnoDB if it is a combination of reads/writes. Thats one beautiful thing about MySQL versus other DBMS's, like say, MS SQL (which I still prefer over any of the open source offerings) - the ability to mix and match table types to suit your needs.

    9. Re:PostgreSQL is supreme A LOT by ttfkam · · Score: 1

      Well, except for one difference. InnoDB will allow you refer to tables not controlled by the InnoDB table handler, whereas we don't have that problem with PostgreSQL's MVCC. So under MVCC with PostgreSQL, by definition, you can't have partial transaction failures. (Or, more precisely, any such
      partial failure is a bug in PostgreSQL, but in MySQL it might be a feature.)

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    10. Re:PostgreSQL is supreme A LOT by Sxooter · · Score: 1

      Actually, sir, the two are in fact the same thing. Save points are the SQL spec way of doing nested transactions.

      And if you don't believe me, please, feel free to post the DIFFERENCE between them. Hint: the differences are syntactical sugar.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    11. Re:PostgreSQL is supreme A LOT by Anonymous Coward · · Score: 2, Informative

      Well, I hate MySQL as much as the next poor slob who had an old version eat a lot of his data... but you're dead wrong on the Wikipedia point.

      Wikipedia has never had a substantial mysql related failure. The outage you're talking about was due to the upgrade to mediawiki 1.5, it was a planed and announced outage that took about as long as we announced it would take, although we'd been hoping for about half the time. MySQL performed flawlessly during this process which involved churning around more than 80gb of data and hundreds of millions of rows.

      The only MySQL related issue that was had in the whole thing was a MySQL quirk triggered bug in mediawiki 1.5 that wasn't discovered until we went live with the new code. A race condition due to table level locking was causing hard cpu pegging and timeouts as every session tried to process the expired blocked user list at once. This wasn't directly a MySQL bug but wouldn't have been an issue with PgSQL (due to MVCC) or if our software wasn't coded with a very MySQL mindset (treat the database like a dumb object store) with 99.99% of the smart stuff in the same PHP that serves every page up.

    12. Re:PostgreSQL is supreme A LOT by anthony_dipierro · · Score: 1

      Perhaps you don't remember their recent outtage that took the entire thing off the internet for a day or two while they had to completely rebuild their database from backups.

      Believe it or not, they actually did that on purpose. They wanted to modify their database schema, and if you do that on a live database in MySQL you're going to block everyone else from using the database for a long time (I think with MyISAM you still have read access but with InnoDB you have nothing). Anyway, Postgres has the same problem (I doubt Oracle does, because this is just something that comes up way too often with really large and long running databases).

      Anyway, they could have come up with a solution to keep the database live during the transition (transfer the db a row at a time while it's running, mark each row completed when it's completed, keep a list of anything that gets deleted, and maybe take the db down for 5 minutes when you're done instead of 2 days). But instead they figured "hey, we're not paid, so don't expect competence."

    13. Re:PostgreSQL is supreme A LOT by pHDNgell · · Score: 2, Informative

      Wikipedia has never had a substantial mysql related failure. The outage you're talking about was due to the upgrade to mediawiki 1.5, it was a planed and announced outage that took about as long as we announced it would take, although we'd been hoping for about half the time.

      No, the outtage I'm talking about was described on the wikipedia site as having been caused by a power outtage that caused database corruption.

      Here's the slashdot article to jog your memory.

      --
      -- The world is watching America, and America is watching TV.
    14. Re:PostgreSQL is supreme A LOT by Anonymous Coward · · Score: 0

      Postgres allows you to alter table structures w/o penalty. Only VACUUM would block ALTER. And it happens immediately in a blink of an eye. (And has so since forever.)

    15. Re:PostgreSQL is supreme A LOT by pHDNgell · · Score: 1

      (this is the second response I got with this informaiton, so I'm going to paste my response again):

      Believe it or not, they actually did that on purpose. They wanted to modify their database schema, and if you do that on a live database in MySQL you're going to block everyone else from using the database for a long time

      No, the outtage I'm talking about was described on the wikipedia site as having been caused by a power outtage that caused database corruption.

      Here's the slashdot article to jog your memory.

      Postgres has the same problem

      I don't know the details of the schema change you're describing, but I don't know why you'd expect downtime in general. I've certainly done schema changes on large tables in active databases in the past. I've done the same with downtime, though.

      More recently, we've done it at work with multiple hundred million row tables by creating a new table and renaming the old one, then placing a view where the old table was and having all of the inserts start going against the view (all in a transaction).

      --
      -- The world is watching America, and America is watching TV.
    16. Re:PostgreSQL is supreme A LOT by Sxooter · · Score: 1

      No, postgresql does NOT have the same problem. The issue with MySQL is that when you alter a table, by adding an index or a column or dropping a column, it locks the table with an exclusive lock and then proceeds to copy the entire thing. So, if you've got a 2 gigabyte table you want to alter you need at least 2 gigs free to make the change.

      PostgreSQL adds columns, drops columns, and adds indexes without copying the whole table. Now, it DOES take an exclusive lock, for all of about a millisecond or two, while it makes the change, but then it's right back in use.

      Seriously, try it. Build a table with 10,000,000 rows in each database, then alter the table and look at the speed difference in those changes.

      The same is true for adding fk references and such on a live database for postgresql.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    17. Re:PostgreSQL is supreme A LOT by Sxooter · · Score: 1

      Oh, and plus, you can make those changes to a postgresql table IN A TRANSACTION (however, this may extend the time the lock is held, so don't do it and sit there staring at the screen drinking a diet coke and contemplating the sunset) so that should something not go quite right with your schema change script, you can roll the whole thing back and no change to the schema or data therein.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    18. Re:PostgreSQL is supreme A LOT by anthony_dipierro · · Score: 1

      Here's the slashdot article to jog your memory.

      Oh, *that* outage. I thought you were talking about the more recent one. IIRC, that one in February was a matter of the log files taking so long to replay, and no data was actually lost.

      I don't know the details of the schema change you're describing, but I don't know why you'd expect downtime in general.

      *I* wouldn't expect it, because *I* would do it right. But if you just go in there and alter the table, then all your writes are going to stall, and I believe in Postgres (and MySQL with InnoDB, but not MySQL with MyISAM) your reads will stall too. Thus why I'm saying it was an incompetancy that cause the latest Wikipedia downtime (which wasn't the one in February).

      More recently, we've done it at work with multiple hundred million row tables by creating a new table and renaming the old one, then placing a view where the old table was and having all of the inserts start going against the view (all in a transaction).

      That's a nice solution. I'll have to remember that one.

    19. Re:PostgreSQL is supreme A LOT by anthony_dipierro · · Score: 1

      Seriously, try it. Build a table with 10,000,000 rows in each database, then alter the table and look at the speed difference in those changes.

      I certainly will. I swear I tried this before and it didn't work, but maybe it's fixed, or I'm wrong.

    20. Re:PostgreSQL is supreme A LOT by anthony_dipierro · · Score: 1

      Oh, and plus, you can make those changes to a postgresql table IN A TRANSACTION (however, this may extend the time the lock is held, so don't do it and sit there staring at the screen drinking a diet coke and contemplating the sunset)

      I thought everything was done in a transaction. Maybe that's why this didn't work before, I should have turned transactions off or something. I'll have to look into that. (I know you can turn autocommits on and off but that's not the same as turning transactions on and off).

    21. Re:PostgreSQL is supreme A LOT by Sxooter · · Score: 1

      No, I didn't mean it like that. If you just typed in three DDL statements one after they other, they'd each be in their own individual transaction, and if the third one failed, you'd have no way to rollback the other two.

      BUT, if you do them all in one transaction, ie:

      begin;
      alter table...
      create index...
      alter table...
      commit; OR rollback;

      Then they'd all be 100% or 0%. Any error on any statement would mean that they would all be rolled back as well.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    22. Re:PostgreSQL is supreme A LOT by jamie · · Score: 1
      You've posted several times that the Wikimedia MySQL data was corrupted when they lost power. I don't think you understand that it wasn't MySQL's fault. The servers had been configured such that "data writes are not fully committed when the database thinks they are".

      Configure your database software to think that data is written when it's not, and corruption is not the software's fault, it's yours. Or, in this case, arguably the IDE drives' fault for lying to their controllers. In any case, stop blaming MySQL.

      See LiveJournal's post-mortem (scroll to "Disk cache issues") and Slashdot's story for more on this. If you administer databases, you should be aware of the problems with IDE drives, because if you misunderstand how they work, you can misconfigure any RDBMS to corrupt your data.

  17. I used to like MySQL by caluml · · Score: 5, Insightful

    The DBAs I worked with always told me "Postgres is better". But I tried it a good few years ago, couldn't install it, it didn't "just work", and I was not that good with Linux at the time, so I just moved on to the next thing - MySQL.
    MySQL was good enough, and all the stuff that hardened DBAs said to me - "It doesn't do transactions", or "It handles NULLs wierdly", etc, just didn't apply.

    But when I tried to do a query like this: SELECT * FROM foo where bar NOT IN (SELECT blib from wheee) - MySQL advised me that it "didn't do" "NOT IN" queries. I tried to work around it, but after trying all the JOINs I could, it just didn't seem like something that I could get round. (I wasted quite a long time trying to work around this, and although I'm sure that some really top DBAs out there can do it, I couldn't.)

    So, mysqldump > mysql.dump, and then restore into Postgres. :%s/mysql_/pg_/g in all my PHP files. Change mysql_error to pg_last_error, and fiddle with pg_num_rows, and it all worked. Moreover, one huge query that took 25 seconds to complete in MySQL (lots of JOINS and nastiness) took about 1 second in Postgres.
    I've never looked back. MySQL is now just coming to fill in all the gaps it's missing - but just go with Postgres. It's rather good.
    No mention of SQL servers can go without the Gotchas: Mysql and Postgres. The worst MySQL is probably that it modifies data as you insert it without throwing an error. Yuk.

    1. Re:I used to like MySQL by croddy · · Score: 2, Informative

      mysql> select count(*) from users where id not in (1, 2, 3, 4, 5);
      +----------+
      | count(*) |
      +----------+
      |       93 |
      +----------+
      1 row in set (0.12 sec)

      mysql> create table strings (stuff varchar(8));
      Query OK, 0 rows affected (0.03 sec)

      mysql> insert into strings values ('abcdefghijk');
      ERROR 1406 (22001): Data too long for column 'stuff' at row 1

      mysql>

    2. Re:I used to like MySQL by Anonymous Coward · · Score: 0

      Indeed.

      SELECT *
              FROM foo
              LEFT OUTER JOIN wheee
                      ON foo.bar = wheee.blib
              WHERE wheee.blib IS NULL

      NOT IN is evil.

      AJO

    3. Re:I used to like MySQL by DrXym · · Score: 2, Informative
      Besides these days, Postgres is very easy to setup. I use in Windows XP and it even comes with an installer, ODBC drivers, help and pgAdminIII. It works wonderfully. I even had it hooked up to the new OpenOffice 2.0 database application.


      I'm certainly no power user but Postgres strikes me as an extremely well featured DB. I use MSDE / MS SQL server at work for an app with transactions, stored procedures, triggers and views and expect it would be straightforward (not trivial but straightforward) to port it to Postgres.


      Sadly though, there's no incentive since MSDE is "free". Basically MSDE is a cut down SQL server which is no bad thing. But I'd love to see Postgres bundled in a similar form on XP - just the engine but nothing else. I reckon lots of apps need a database engine and Postgres fits the bill quite nicely. It would even be a smaller redistributable than MSDE too.

    4. Re:I used to like MySQL by fishbot · · Score: 1

      But when I tried to do a query like this: SELECT * FROM foo where bar NOT IN (SELECT blib from wheee) - MySQL advised me that it "didn't do" "NOT IN" queries. I tried to work around it, but after trying all the JOINs I could, it just didn't seem like something that I could get round.

      select foo.* from foo left join wheee on foo.bar = wheee.blib where wheee.blib is null

      That's one left join, in case you were wondering, not 'all the joins I can think of'.

      My point? You're hardly in a position to make statements about the relative benefits of RDBMSs if you don't know how a left join works!

    5. Re:I used to like MySQL by Anonymous Coward · · Score: 0
      I used my mod points to mod this insightful. I am extremely glad you included those links at the bottom.

      I always had suspicions about problems I've had with MySQL, but I always blamed myself (default values supplied for NOT NULL fields for example). A LOT of those issues just became apparent to me and I must sincerely thank you. I will now include MySQL on my do-not-use list, which only included MSDE (but I do like MS SQL Server) before.

    6. Re:I used to like MySQL by Tablizer · · Score: 1

      Sadly though, there's no incentive since MSDE is "free". Basically MSDE is a cut down SQL server which is no bad thing.

      Doesn't it hard-wire in an upper limit of rows or table size? Say you reach 50 million rows and suddenly get an upgrade suggestion error message. Hopefully with Postgre you won't get that.

    7. Re:I used to like MySQL by allanw · · Score: 1

      He probably meant "mysql doesnt do NOT IN (subquery)". (at least before 4.1)

    8. Re:I used to like MySQL by croddy · · Score: 4, Informative

      mysql> select count(*) from users where id not in (select id from users where id%2 != 0);
      +----------+
      | count(*) |
      +----------+
      |       48 |
      +----------+
      1 row in set (0.01 sec)

      mysql>

    9. Re:I used to like MySQL by TobiasSodergren · · Score: 1

      Why is this modded as troll? Please educate me.

    10. Re:I used to like MySQL by PickyH3D · · Score: 1
      Someone is a huge fan of MySQL. I didn't realize posting anonymously removed mod points too (did it always?).

      I had modded it insightful.

    11. Re:I used to like MySQL by caluml · · Score: 1

      Uhuh. Yep, **now** it has it.

    12. Re:I used to like MySQL by Anonymous Coward · · Score: 0

      Cool, and readable as heck. Especially when you have are multiple blibs on several wheees and few joins that are actual joins, not just workarounds.

    13. Re:I used to like MySQL by dotgain · · Score: 1
      So, what. Did you want to whinge forever about MySQL not supporting subqueries?

      I'm sure at some stage PostGreSQL was missing a few features you need, that doesn't mean we can bring them up and use them against your argument.

    14. Re:I used to like MySQL by paulschreiber · · Score: 1

      MySQL 4.1 supports subqueries. Just upgrade. :)

    15. Re:I used to like MySQL by dotgain · · Score: 1
      Doesn't it hard-wire in an upper limit of rows or table size?

      Well, yeah. It's a "free" version. I remember when SyBase released a free version of their own database, limited to so many gigs of ram, such and such a max database size, and it only supported one processor.

      Hordes of people were crying "why would I use a database limited to 4GB!?! One CPU, Gah!"

      It's a demo! Boo-hoo you can't run your enterprise off it! If you try to use a "free" database, and then get in the shit when you reach one of its limits, good job!

    16. Re:I used to like MySQL by DrXym · · Score: 1
      If you've got 50 million rows I suggest you need a full blown DB, not what is a replacement for the ancient jet / MS Access database :)


      Seriously though I think MSDE has a 2GB database limit and some other restrictions on replication and tools. It works extremely well though for what it is.


      Developers like it because it's a full blown SQL engine and has virtually identical behaviour to its big brother. Microsoft like it because it's a foot in the door when companies consider upgrading to a proper DB (since application changes required are virtually zero).


      I reckon it would be nice to see Postgres bundled in the same way for the same reasons. People could start off with a baby "PGDE" engine, but easily migrate their code up to a full blown Postgres, or to a network running somewhere else on Linux or something else. Obviously this PGDE would not be crippled but the settings might be tweaked for its most likely use - that might mean locking down network access to localhost, limiting the number of threads and other small changes. The installer would also have to be able to install multiple copies on the same box and multiple ports in case there were multiple apps but nothing too serious.

    17. Re:I used to like MySQL by ttfkam · · Score: 1

      What's the advantage? PostgreSQL for Windows must be downloaded? So does MSDE; it's not shipped with Windows.

      And MSDE has that pesky 2GB database limit. That's the hard limit. The fun usually starts around 1.6 gigabytes.

      The real advantage of MSDE is that it has exactly the same API that full MS SQL Server has. If you plan on migrating to MS SQL Server, MSDE is a no-brainer. If MS SQL Server is not a clear target--

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    18. Re:I used to like MySQL by Anonymous Coward · · Score: 0

      All joins are left joins, by default, unless otherwise specified. You want a LEFT OUTER join.

      Pot, kettle, black, etc.

    19. Re:I used to like MySQL by DrXym · · Score: 1
      The advantage of MSDE over Postgres is at present the fact that it ships in a neat redistributable. Postgres doesn't. It has also been available for several years.


      If Postgres also shipped as a neat little redistributal without artificial limitations or licence agreements I think a lot of people would use. The advantage to PostgreSQL would be the same as MSDE is to Microsoft - the database engine would be shared with the full-blown database making it very easy to move over when the time is right.


      I reckon that Mono would be a good crowd to pitch this to. They probably hate MSDE and I think that Postgres would make a very good fit for luring .NET developers onto their platform, or at least not slamming the door shut.

    20. Re:I used to like MySQL by Tablizer · · Score: 1

      It's a demo! Boo-hoo you can't run your enterprise off it! If you try to use a "free" database, and then get in the shit when you reach one of its limits, good job!

      Some companies are cheapskates and make one run the world off of wimpy software. They would sometimes rather you bend over backward to make stuff fit rather than upgrade.

    21. Re:I used to like MySQL by ttfkam · · Score: 1

      Oh yeah, and it comes with a .NET driver too.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    22. Re:I used to like MySQL by bani · · Score: 1

      you got pwned buddy. deal with it.

    23. Re:I used to like MySQL by Sxooter · · Score: 1

      Uh, no. Regular joins are neither left nor right. If some field means a row in either side has no match on the other, then the rows are not in the output. A left join is the SAME THING as a left outer join, the outer is syntactic sugar.

      If you're gonna correct people, try to actually have the right answer, k?

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    24. Re:I used to like MySQL by Anonymous Coward · · Score: 0

      Oh yes, I suppose this is a query you did years ago, like the poster before you?

    25. Re:I used to like MySQL by Anonymous Coward · · Score: 0

      He was talking about his experience with MySQL. He wasn't commenting on the current failure. You just look like a dick.

    26. Re:I used to like MySQL by Dahan · · Score: 0
      Pot, kettle, black, etc.

      Idiot, moron, imbecile, completely clueless about SQL, etc.

    27. Re:I used to like MySQL by caluml · · Score: 1
      And as if to prove my point:
      gk etc # myisamchk /var/lib/mysql/apachelogs/access_www.foo.com.MYI
      Checking MyISAM file: /var/lib/mysql/apachelogs/access_www.foo.com.MYI
      Data records: 361086 Deleted blocks: 341998
      myisamchk: warning: Table is marked as crashed
      - check file-size
      - check record delete-chain

      myisamchk: warning: Found 110043532 deleted space in delete link chain. Should be 110043308
      myisamchk: error: Found more than the expected 341998 deleted rows in delete link chain
      myisamchk: error: record delete-link-chain corrupted
      - check key delete-chain
      - check index reference
      - check record links
      myisamchk: warning: Found 110048856 deleted space. Should be 110043308
      myisamchk: warning: Found 342010 deleted blocks Should be: 341998
      MyISAM-table '/var/lib/mysql/apachelogs/access_www.foo.com.MYI' is corrupted
      Fix it using switch "-r" or "-o"
    28. Re:I used to like MySQL by tzot · · Score: 1
      Uh, no. Regular joins are neither left nor right. If some field means a row in either side has no match on the other, then the rows are not in the output. A left join is the SAME THING as a left outer join, the outer is syntactic sugar.

      Regular joins are INNER joins, and they are indeed nor left nor right.
      If LEFT JOIN is the same thing as LEFT OUTER JOIN, then you are wrong and fishbot is right; did you actually run his query, and if yes, on what RDBMS?
      --
      I speak England very best
    29. Re:I used to like MySQL by Sxooter · · Score: 1

      No. Reread what he wrote. He said that ALL joins are left joins by default. The SQL 1992 spec is quite clear that the defaul join is an inner join.

      Further, the spec is quite clear that in an outer join (i.e. a left or right join) the outer is syntactic sugar.

      It's in section 7.5 of the sql92 spec by the way, if you wanna look it up.

      And I don't need to run a query to know that a left join and a left outer join are the same thing.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    30. Re:I used to like MySQL by sootman · · Score: 1

      The DBAs I worked with always told me "Postgres is better". But I tried it a good few years ago, couldn't install it, it didn't "just work", and I was not that good with Linux at the time, so I just moved on to the next thing - MySQL

      Funny, I had the exact opposite experience. Postgres was the *only* database included with RH7 and all I had to do was check the box marked 'database server' during installation and it was there. A complete install included apache and php that would talk to it so that's what I used to start learning database-backed web apps a few years ago. No problems at all. A friend wrote a great tutorial on getting started--first with using PG at the command line, then going into PHP--and along with some SQL writings from Phil Greenspun I was all set.

      It took many many tries, though, to get MySQL up and running, in that environment and many others. Usually some package didn't want to work because it wasn't quite 'free-as-in-free' enough. And that continues today: I just discovered that to get PHP with MySQL support with 'apt-get' on Ubuntu, you have to change where you get your packages from. I didn't start using MySQL until I started installing it on Windows (where PG, at the time, wouldn't run without Cygwin, and who the hell wants to do all that) and OS X (where Marc L. maintains a click-and-it-works package.)

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    31. Re:I used to like MySQL by tzot · · Score: 1
      Let me summarize, with my comments interspersed; perhaps I wasn't clear enough.

      Fishbot: select foo.* from foo left join wheee on foo.bar = wheee.blib where wheee.blib is null
      This is correct and functioning and produces what the OP wanted.

      Fishbot: That's one left join, in case you were wondering, not 'all the joins I can think of'.
      He's clear.

      Sxooter: Uh, no. Regular joins are neither left nor right.
      He never said that regular joins are left.

      Sxooter: If some field means a row in either side has no match on the other, then the rows are not in the output.
      This is correct for inner joins; note that Fishbot's query had no inner joins.

      Sxooter: A left join is the SAME THING as a left outer join, the outer is syntactic sugar.
      This is absolutely correct, and justifies Fishbot's LEFT JOIN.

      Sxooter: If you're gonna correct people, try to actually have the right answer, k?
      He was correct and he had the right answer.

      tzot: If LEFT JOIN is the same thing as LEFT OUTER JOIN, then you are wrong and fishbot is right;
      That "if" of mine was rhetorical, because I, like you, know very well that LEFT JOIN == LEFT OUTER JOIN, and also know that Fishbot's query was correct. Since I couldn't find anything wrong with Fishbot's post to explain your reply, I assumed that you mistakenly thought that Fishbot's query was an INNER JOIN.

      Sxooter: No. Reread what he wrote. He said that ALL joins are left joins by default.
      I reread what he, you and I wrote. I still don't see what you claim he wrote.

      Perhaps I misunderstood your post, because you started it with a "Uh, no.", and it is a direct reply to Fishbot's post (unless my Firefox is borken). Fishbot's query is correct, and he never said that regular joins are left. You advised Fishbot to have a right answer before correcting people, in spite of Fishbot's providing a correct answer."

      So what exactly was that "Uh, no" for?

      --
      I speak England very best
    32. Re:I used to like MySQL by Sxooter · · Score: 1

      Ummmm. No. I wasn't replying to the GP, I was replying to THIS post:

        All joins are left joins, by default, unless otherwise specified. You want a LEFT OUTER join.

      Pot, kettle, black, etc.

      Not the parent to that one.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    33. Re:I used to like MySQL by Sxooter · · Score: 1

      I bet you're reading at a level where comments rated 0 don't show up. I was replying to an anon coward with a post rated 0, and I bet you missed the double indentation between the GP and my post where the anon coward post would have been...

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    34. Re:I used to like MySQL by tzot · · Score: 1

      Yes, you are absolutely right. I thought that all comments below my threshold showed up as single headers, but I was obviously mistaken. I'll check my settings, thanks a lot :)

      --
      I speak England very best
    35. Re:I used to like MySQL by Sxooter · · Score: 1

      Odd, the "free" version of postgresql has no such limitations. Your original post made it seem like the two databases were somewhat equivalent. I'd hardly consider SQL Server an equal with PostgreSQL, having used both quite a bit in production environments.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    36. Re:I used to like MySQL by Sxooter · · Score: 1

      Oh, and sorry, I got you confused with a different OP. Didn't mean to do that. But my point still applies, I'd rather use a free database with no artificial limits in it than a "demo" version of a commercial db.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    37. Re:I used to like MySQL by Anonymous Coward · · Score: 0
      well, we could sit around and reminisce about how featureless mysql used to be, or how brittle postgresql used to be, but that would be ... Offtopic.

      the article's asking for a comparison of the current offerings, not some graybeard's faint memory of the 3.0 beta series.

    38. Re:I used to like MySQL by dotgain · · Score: 1

      No worries, I was a bit confused for a minute there. And I agree, I'd rather, and do, use a free database that's fine with me. For the record, it's MySQL at the moment and I'll look at something different when I need to. At work, they want to pay for SQLServer, that's fine. It's actually a really good database, and hasn't given me any stability problems on good machines. Sure, it's expensive. For some people it's worth every cent. My home database requirement are very simple, error checking is done in code, not in the DB engine. I don't need foreign key support for what I'm doing. I can remember most of the MySQL "gotchas" and they're not a problem for me. If I'm going to try and put NULL in a place that shouldn't take it, I should know about it long before my DB engine does.

  18. Re:The most interesting part of the old article... by DAldredge · · Score: 3, Funny

    So are you :)

  19. Still the same, but less so by m50d · · Score: 1

    MySQL still seems to get an unreasonable amount of attention. Like firefox or OOo, it's not that much better than the alternatives but has become something of a mascot of the open source movement (or rather the dual-licensing variant therof). However, it has caught up a lot in terms of functionality, just as PG has in speed, and generally the two have grown much closer together as their respective shortcomings are sorted. There is far less to choose between them than there once was.

    --
    I am trolling
    1. Re:Still the same, but less so by jedrek · · Score: 0, Troll

      Like firefox [...] it's not that much better than the alternatives

      Excuse me? Please point me to the alternative browser that exceeds the functionality of Firefox with its extensions. I'd love to try it out.

    2. Re:Still the same, but less so by mccoma · · Score: 1

      oh great first mysql vs postgresql then vi vs emacs and now (in the same thread) we are going to get firefox vs everyone. great..... :)

    3. Re:Still the same, but less so by Jerry · · Score: 1
      MySQL still seems to get an unreasonable amount of attention.


      It's a matter of ingrained habit. When MySQL first came out it was a very light and very fast database. Light because it lacked a lot of key features a real database included. Fast because, lacking those features and necessary checks, it read and wrote very quickly what are essentially flat files. This made it the darling of websites everywhere. Light, fast and easy to install and run. Keep your tables and data simple and the number of rows small and your website would really snap!

      After a few months you felt you knew MySQL and as it added features you applied them to other areas. It didn't have foreign keys, it didn't have ... It crashes frequently. It give strange results on some inserts or queries. So what? It's light, fast and easy, and you 'know' it. Why change?

      mmmm... isn't that the same reason why some folks stay with Windows ... and PAY for the 'priviledge'?

      --

      Running with Linux for over 20 years!

    4. Re:Still the same, but less so by m50d · · Score: 1

      If extensions count then IE is superior, there's a huge number of plugins available for it to do absolutely anything. If not then Opera is superior. On the open source side firefox has nothing to favour it over the other gecko skins (epiphany and galeon, or equivalents on other platforms) other than the attention it gets, and personally I find konqueror a superior alternative. (though that's a matter of personal preference)

      --
      I am trolling
  20. OT: Re:popularity by caluml · · Score: 1
    legos are

    Is that a typo? Cos I would always have said "lego is".
    Where are you from.... Just wondering....

    1. Re:OT: Re:popularity by Anonymous Coward · · Score: 0

      in the U.S., "legos" is the plural of "lego", where "lego" is a noun referring to an individual lego brick.

    2. Re:OT: Re:popularity by caluml · · Score: 1

      Thanks for that.
      I wonder if it's to do with the way the UK and the US talk about companies.
      UK: The BBC is (as though it were an entire entity)
      US: The BBC are

    3. Re:OT: Re:popularity by Wereon · · Score: 1

      Wrong way round. Although the BBC itself does say "The BBC is".

    4. Re:OT: Re:popularity by Anonymous Coward · · Score: 0

      > US: The BBC are

      Not in educated portions of the U.S.

      "Company" is singular.

  21. And is Windows really better than Linux? by Anonymous Coward · · Score: 0

    My mother's friend's son says it is.

    1. Re:And is Windows really better than Linux? by Anonymous Coward · · Score: 0

      Yeah, but other than Bill Gates and Balmer, only a few other think that.

  22. Re:The most interesting part of the old article... by FiReaNGeL · · Score: 1

    The signal / noise ratio was also MUCH, MUCH higher.

  23. What a terrible question? by Billly+Gates · · Score: 1

    It would be a great question if newer benchmarks were out and linked in the article.

    Who cares about something 6 years old? How about now?

    The question can not have an answer if all the data linked is 6 years old.

  24. ford chevy by joeldg · · Score: 1

    why not just ask the frod chevy question while you are at it and then link to microsoft and linux for good measure..
    how did this make it to the front page and why are people still talking about mysql as if they were purchased by SCO, from what I read SCO bought a license to use MYSQL..

    -anyone: "hey guys, SCO bought some acme widget"
    -slashdot: "acme is evil!!! we will boycott acme!! death to SCO"

    see how the above is not helping out anything..

    1. Re:ford chevy by burnin1965 · · Score: 1

      More like debating Ford versus Mack.

      http://www.fordvehicles.com/

      http://www.macktrucks.com/

      Oh, and you may want to go read MySQL-AB's partner news page to get a better understanding of what SCO "bought".

      http://www.mysql.com/news-and-events/news/article_ 948.html

      burnin

    2. Re:ford chevy by god · · Score: 1

      god speaks thus: acme is not evil, for he likes the One True Colour: orange ;-)

  25. I have a small problem... by Anonymous Coward · · Score: 1, Informative

    because I started buidling a proprietary project for my company and without really looking into the MySQL licensing decided to go with MySQL (I know I am stupid). Anyways, I also purchased SQLyog (A GUI for working with MySQL) to speed up development.

    Now I am stuck. I have to either a) switch to postgres, which does not seem too bad an option, or b) pay for MySQL (and prices are not even listed online *shudder*). What is the learning curve for postgres? Are there any good books? What about tools like SQLyog?

    GPL - Got punk'd lately?

    1. Re:I have a small problem... by RPoet · · Score: 1

      You can use MySQL as a database engine in proprietary projects. However, if you want to make a derivate database engine from MySQL, you have to release that part under the GPL. There is a huge difference.

      --
      "Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
    2. Re:I have a small problem... by Anonymous Coward · · Score: 0
      because I started buidling a proprietary project for my company and without really looking into the MySQL licensing decided to go with MySQL (I know I am stupid).

      This is a problem... why?

    3. Re:I have a small problem... by Anonymous Coward · · Score: 1, Interesting
      From my understanding of the below statement...
      If you include one or more of the MySQL drivers in your non-GPL application (so that your application can run with MySQL), you need a commercial license for the driver(s) in question. The MySQL drivers currently include an ODBC driver, a JDBC driver and the C language library.

      The simple fact that I access MySQL via OBDC requires me to obtain a license before I may provide a commercial service.

      Like before, It seems that I am still stuck.
    4. Re:I have a small problem... by freqmod · · Score: 1

      I think you may use MySql if you GPL your app, and then does not distribute it. The gpl states explicivly that it does not cover the output of a program: html, which means that as long as the source code is on the server it is ok, but if someone who has access to the server wants to copy it they may do it. That means that you may run it on the server and not distrebute it as long as you trust in those who control the servers. (and if someone cracks the server then they may use the code as they want). (PS! IANAL- I am not a lawyer, IANAAOSS I am not an american or swedish citizen)

    5. Re:I have a small problem... by FooAtWFU · · Score: 2, Informative

      Have you recompiled MySQL? If so, have you changed anything in the source, and are you going to sell this modified version? If so, you must include the source of your modified version with any sales, under the terms of the GPL. If not, you're probably okay without switching at all. This is probably the case if you can ship MySQL separately from whatever application that you're developing, and if you can use an existing MySQL database without installing a new one yourself. (obligatory IANAL bit here)

      --
      The World Wide Web is dying. Soon, we shall have only the Internet.
    6. Re:I have a small problem... by Richard_J_N · · Score: 1

      I suspect that it is easy to go from MySQL -> Postgres and rather hard to go the other way.
      It depends how complex your project is.

      In PHP, it would basically be a matter of

      0)Migrate the database itself. Hopefully, just dump to SQL, then re-import. [Then fix any complicated stuff!]

      1)replace all function calls of mysql_foo() by
      pg_foo().

      2)re-write any really complex SQL that fails.

      3)Test it.

      There is a gui (pg_access), but the psql command-line tool is so good that you are unlikely to need it.

    7. Re:I have a small problem... by Anonymous Coward · · Score: 1, Informative
      I have a great deal of experience with this.

      The MOST IMPORTANT THING you need to know about running postgresql is how to set the shared_buffers setting correctly.

      Look at this page and follow how to tune it for your particular memory size. This will save you a LOT of heartache. You'll see speed increases from that one setting alone of ten or twenty times. Good luck -- this is critical:

      http://www.varlena.com/varlena/GeneralBits/Tidbits /perf.html

    8. Re:I have a small problem... by Anonymous Coward · · Score: 0

      There's always c) release the project under the GPL.

    9. Re:I have a small problem... by jadavis · · Score: 1

      The MySQL client libraries are GPL, meaning that he can't link those libraries with his commercial application.

      Normally client libraries are LGPL for a GPL product, but MySQL used GPL to be more restrictive.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  26. Re:The most interesting part of the old article... by Anonymous Coward · · Score: 0

    I have a zero digit ID, I win!

  27. Re:The most interesting part of the old article... by alba · · Score: 1

    What's a 4 digit ID again?

  28. Not exactly ... by khasim · · Score: 4, Insightful

    If I go to the store and buy a copy of MSOffice, that's one thing.

    If I get a site license from Microsoft, that's something else.

    If Bill Gates and I do a press release about our new partnership, that's an entirely different thing.

    SCO and MySQL AB did the press release thing. That's not the same as SCO buying a license to distribute.

    1. Re:Not exactly ... by Quarters · · Score: 4, Insightful
      Press releases have no bearing whatsoever on the level of business relationships. Press releases happen if someone (or some-company) has enough money (~$300US) to do a wire release and has something to say. They're just an advertising medium. Nothing more, nothing less.

      I could do a press release about how I just bought a tube of toothpaste at the local Kroger. The wire service(s) would happily take my money and put the story on their distribution network(s). Big whoop.

    2. Re:Not exactly ... by Anonymous Coward · · Score: 0

      SCO issued a press release. There isn't one from MySQL AB. They are a private company and they don't have a need to spew PR over every sale they make.

    3. Re:Not exactly ... by Anonymous Coward · · Score: 0

      So why did MySQL AB think it was a good thing to say? The press release is on their site as well, so it's not just a SC thing.

    4. Re:Not exactly ... by SnowZero · · Score: 2, Funny

      This is important though. MySQL can only redeem itself now by issuing another press release which says that partnering with SCO "made them feel dirty."

    5. Re:Not exactly ... by DarthTaco · · Score: 1

      "I could do a press release about how I just bought a tube of toothpaste at the local Kroger."

      It almost seems worth it, doesn't it? L

    6. Re:Not exactly ... by b17bmbr · · Score: 1

      If Bill Gates and I do a press release about our new partnership, that's an entirely different thing.

      wouldn't mrs. gates have something to say about that one. of course, with those funny glasses, you just never know!!

      --
      My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
    7. Re:Not exactly ... by dubl-u · · Score: 1

      Press releases happen if someone [...] has enough money (~$300US) [...] I could do a press release about how I just bought a tube of toothpaste at the local Kroger.

      I'm in for $20. Write up a page explaining how you did it and then get the whole thing covered here, and I'll Paypal you the Jackson. I'm sure you can cover your expenses.

  29. MySQL vs. Oracle by solman · · Score: 2, Informative

    Except for big iron (where DB2 dominates) and Micorosft environments (where SQL server dominates), Oracle is the dominant player.

    I recently moved my deployments from Oracle to MySQL because:

    1. MySQL supports all of the Oracle features you need to build and operate an enterprise software system.

    2. MySQL's new administration tools are significantly better than Oracle's out of the box tools (This is why a year ago I refused to use MySQL for production, and now I've switched everything).

    3. MySQL is much easier to manage. I don't know anybody who runs a heavily loaded Oracle server in production without spending significant $$$ on DBAs and commercial tools. I feel quite comfortable doing this with MySQL.

    4. MySQL performs pretty much the same as Oracle out of the box (and I think it is easier to tune).

    5. MySQL's supposed gotchas pale in to comparison to Oracle's. When I first used MySQL BLOBs it simply worked. I opened up the administration programs and I could actually see the images in the database. It was so beautiful I wanted to cry. I can't count the number of times I went through Oracle BLOB/CLOB hell with different platforms. (Not just getting them in there, but actually getting them to work with third party applications which is the real pain.)

    I think that anybody deploying Oracle for non-Oracle applications is going to have to very seriously consider MySQL if for no other reason than all the DBA salaries you can get rid of.

    If you want to buld a $1M cluser, stick with Oracle (for now). If you want to run application specifically designed by (or for) Oracle, stick with Oracle. Otherwise, switch at the first opportunity.

    1. Re:MySQL vs. Oracle by Atzanteol · · Score: 1

      Oracle's tools have always sucked. Look at the disgrace that is SQL*Plus! Terrible...

      What admin tools are you using for MySQL? Aside from just the mysqladmin and mysql command line clients?

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    2. Re:MySQL vs. Oracle by Just+Some+Guy · · Score: 4, Informative
      MySQL supports all of the Oracle features you need to build and operate an enterprise software system.

      As of today, MySQL 4.1 is the current release. 5.0, the current development snapshot, is the first to support stored procedures. Since the choice today is between a tested system and stored procedures, it most certainly does not "support all the Oracle procedures [I] need to build and operate an enterprice software system".

      Next year? Maybe. Right now? No way, according to mysql.com.

      --
      Dewey, what part of this looks like authorities should be involved?
    3. Re:MySQL vs. Oracle by oGMo · · Score: 4, Informative
      MySQL supports all of the Oracle features you need to build and operate an enterprise software system.

      HAHA. Right. Tablespaces? Failover? High availability? Row-level locking? Stored procedures? Triggers? Multimaster replication? SQL conformity? I could go on, and on...

      MySQL's new administration tools are significantly better than Oracle's out of the box tools (This is why a year ago I refused to use MySQL for production, and now I've switched everything).

      MySQL is much easier to manage. I don't know anybody who runs a heavily loaded Oracle server in production without spending significant $$$ on DBAs and commercial tools. I feel quite comfortable doing this with MySQL.

      Yes, Oracle's builtin tools suck. However, others are available. This is basically "I'm not an Oracle DBA, but MySQL was easy for me, so it's better than Oracle!"

      MySQL performs pretty much the same as Oracle out of the box (and I think it is easier to tune).

      Yes, and anyone who's using a db tuned out of the box isn't doing significant work.

      [snip whining about blobs]

      Blah, blah, Oracle is hard. Get a DBA and a real developer. This is what they're paid for.

      I think that anybody deploying Oracle for non-Oracle applications is going to have to very seriously consider MySQL if for no other reason than all the DBA salaries you can get rid of.

      Oh, that's right, you want us to get rid of the people with a clue, because you have to pay them. Brilliant! So I guess we'll call you at 3am on Sunday morning when our servers crashed, we have to restore from rollback segments on our failover cluster... oh wait. MySQL can't do that.

      If you want to buld a $1M cluser, stick with Oracle (for now). If you want to run application specifically designed by (or for) Oracle, stick with Oracle. Otherwise, switch at the first opportunity.

      If you're building a big expensive app, you might look and see if PgSQL can support you. If you're building a crappy little webapp, you might check out PgSQL, because it's fun and you'll get some experience with a real database.

      Given PgSQL is free and not all that hard to manage, I can't think of a single reason for switching to MySQL.

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

    4. Re:MySQL vs. Oracle by uits · · Score: 1

      "1. MySQL supports all of the Oracle features you need to build and operate an enterprise software system."

      This is patently absurd, the 5.0 series isn't production yet, and even with the new features it doesn't come close to Oracle, Sql Server, or DB2

      2. MySQL's new administration tools are significantly better than Oracle's out of the box tools.

      Try using the Enterprise Manager that comes standard, very easy to use web application that lets you perform most functions with point-and-click ease.

      5. MySQL's supposed gotchas pale in to comparison to Oracle's.

      You can't be serious.

    5. Re:MySQL vs. Oracle by ttfkam · · Score: 5, Informative
      1. MySQL supports all of the Oracle features you need to build and operate an enterprise software system.
      Ummm... no. MySQL does not have user-defined data types, object-relational extensions, full support for the CHECK constraint (a big one IMHO), views in a stable release, updatable views, rules, stored procedures in a stable release, synonyms, support for more than one autoincrement column per table, automatic conversion of code pages between client and server, nested transactions, complete trigger support, access privilege grouping, access to multiple databases in one session, multi-master replication, gateways to other DBMSs, XML data and transformation tools, and better tools for recovery from failures.

      You can use MySQL for your enterprise apps, but it is not Oracle. MySQL, while boasting impressive database sizes, is not even close to competing with Oracle (or DB2 or Sybase) on the largest deployed database sizes.
      2. MySQL's new administration tools are significantly better than Oracle's out of the box tools (This is why a year ago I refused to use MySQL for production, and now I've switched everything).
      The enterprise is not as price-sensitive as the SOHO market. Very few that buy an enterprise Oracle license use the out-of-the-box tools.
      3. MySQL is much easier to manage. I don't know anybody who runs a heavily loaded Oracle server in production without spending significant $$$ on DBAs and commercial tools. I feel quite comfortable doing this with MySQL.
      See my answer to number 2.
      4. MySQL performs pretty much the same as Oracle out of the box (and I think it is easier to tune).
      Only in environments that MySQL can handle. Oracle can handle scenarios where MySQL cannot run at all let alone run fast.
      5. MySQL's supposed gotchas pale in to comparison to Oracle's. When I first used MySQL BLOBs it simply worked. I opened up the administration programs and I could actually see the images in the database. It was so beautiful I wanted to cry. I can't count the number of times I went through Oracle BLOB/CLOB hell with different platforms. (Not just getting them in there, but actually getting them to work with third party applications which is the real pain.)
      Agreed. Oracle definitely has its warts.

      That said, migration to and from Oracle is easier with PostgreSQL or Firebird -- especially if you start on the lower end. MySQL has been so far from SQL standard compliance, you may not know when you're doing something really weird. MySQL 5.0's strict mode has helped tremendously with this. Too bad it's not ready for production yet.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    6. Re:MySQL vs. Oracle by pushf+popf · · Score: 1

      This is all facinating, but the reason PHBs buy Oracle is BECAUSE it's expensive, not in spite of it. If you're a PHB and have a half million $ worth of Oracle products running on another half million dollars worth of managed server, tended to by 3 shifts of DBAs and *nix admins, you're IMPORTANT. If you have a $500 DB running on $10,000 worth of low end servers, tended to by the company geek, you're expendable. It doesn't matter at all whether one is more capable than the other.

    7. Re:MySQL vs. Oracle by Anonymous Coward · · Score: 0

      Try using the Enterprise Manager that comes standard, very easy to use web application that lets you perform most functions with point-and-click ease.

      Odd. At first I was about to render an english transliteration of some sort of manic laughter and post that, but now all I got is this feeling of words failing me.

    8. Re:MySQL vs. Oracle by Dr_Barnowl · · Score: 1

      There is some debate as to whether SPs are even worth it.

      On the one hand, lots of people use them. On the other hand, any RDBMS engine worth it's salt caches execution plans. Once you assume that, if you use parameterised queries, you get all the performance benefits of SPs with none of the headaches of maintainence in a place other than your code. If you really must re-configure SQL in the fly without compiles, keep them in text files, or a table, or another resource. Even a consistent query generation code will reap the performance benefits of execution plan caching after the first execution.

      When next I build a DB app, I won't be using SPs.

    9. Re:MySQL vs. Oracle by Hiro+Antagonist · · Score: 2, Interesting

      Other people have made similar comments, but I just feel the need to chime in.

      Mind telling me how you're going to move ten terabytes of data around on a $10K server? With full replication (so you're going to need another server at a remote location), tens of millions of transactions every hour, with complete integrity checking and automatic failover to secondary and tertiary systems?

      Because that's what McKesson does. I don't work there, just got a tour of the datacenter when I was looking for a job a few years ago, and the amount of data they push and prod is amazing. A 10K server, even with an assload of IDE disks in one huge raid, can't even come close to what you can do with a Sun Enterprise server tied to Fibrechannel disk arrays.

      MySQL is for SOHO and small-business use, and depending on it for larger things is a recipe for trouble; where's the transaction and constraint checking in the current stable version? What about stored procedures (again, those are in beta)?

      What's worse is that MySQL includes datatypes (like sets) that are, from the perspective of a relational model, completely incorrect, and this makes transitioning to a larger database much harder.

      I use MySQL for simple jobs, and PostgreSQL when Real Work needs to be done.

      --

      --
      I Hit the Karma Cap, and All I Got Was This Lousy .sig.
    10. Re:MySQL vs. Oracle by MyHair · · Score: 2, Insightful

      Given PgSQL is free and not all that hard to manage, I can't think of a single reason for switching to MySQL.

      Because a project you download is hard-coded to it. (Mambo, some BBSes, eCommerce sites, etc.) I like PgSQL better than MySQL, but I keep having to use MySQL for the PHP projects I play with.

    11. Re:MySQL vs. Oracle by einhverfr · · Score: 2, Interesting

      3. MySQL is much easier to manage. I don't know anybody who runs a heavily loaded Oracle server in production without spending significant $$$ on DBAs and commercial tools. I feel quite comfortable doing this with MySQL.

      Sure. This is one of Oracle's big downsides. But this hardly means that MySQL is the right tool for the job....

      4. MySQL performs pretty much the same as Oracle out of the box (and I think it is easier to tune).

      Under what kind of load? How many are complex queries, and how many are read-only? MySQL performs well with simple read-only queries, but does not do well under serious load with a mixture of complex queries and writes.

      This makes MySQL perfect for content management and pretty piss poor for anything else.

      5. MySQL's supposed gotchas pale in to comparison to Oracle's.

      Hardly. Any "rdbms" that truncates your data silently and does not enforce CHECK constraints is not suitable for enterprise applications almost by definition. If you don't know why, I think you should read up on relational theory.

        When I first used MySQL BLOBs it simply worked. I opened up the administration programs and I could actually see the images in the database. It was so beautiful I wanted to cry. I can't count the number of times I went through Oracle BLOB/CLOB hell with different platforms. (Not just getting them in there, but actually getting them to work with third party applications which is the real pain.)

      Again, if Oracle is too much of a PITA, look at EnterpriseDB. It is basically PostgreSQL with some additional features to make it work with Oracle-only applications. This means your Oracle apps just work, and your PostgreSQL apps just work. And you save a bundle or two of money.

      --

      LedgerSMB: Open source Accounting/ERP
    12. Re:MySQL vs. Oracle by nettdata · · Score: 0

      Bang on.

      --



      $0.02 (CDN)
    13. Re:MySQL vs. Oracle by salesgeek · · Score: 1

      Blah, blah, Oracle is hard. Get a DBA and a real developer. This is what they're paid for.

      I think this point is precisely what the MySQL crowd is not articulating: MySQL has enabled countless businesses to do things thy could not have done without an expensive RDBMS. That is why my hat is off to MySQL and Postgress. When you get big enough you need someone you can sue or show a support agreement to shareholders, then Oracle has you back.

      Regardless, we all spend too much time sniping about how one thing is better than the other and a lot of times lose site of what makes Open Source special versus the Oracles of the world: freedom to pursue your dreams (even if you are low on cash).

      --
      -- $G
    14. Re:MySQL vs. Oracle by bani · · Score: 1

      elitism is teh r0x0r, d00d.

    15. Re:MySQL vs. Oracle by Cylix · · Score: 2, Informative

      Depends on hwo they were coded.

      Some things are not that bad to port to psql and some well... are.

      I've seen more then one project using a multi-vendor db API. Didn't work 100% last time I used something like this, but it wasn't horrible to make a few adjustments to get searches working correctly. (The outstanding one was all searches in mysql were case insensitive and for postgres I had to change a parameter for case insensitive operation)

      --
      "You should always go to other people's funerals; otherwise, they won't come to yours." -- Yogi Berra
    16. Re:MySQL vs. Oracle by Dom2 · · Score: 1
      Ditto. It bugs me no end that we have to keep MySQL around just so a few people can run wordpress.

      -Dom

    17. Re:MySQL vs. Oracle by pushf+popf · · Score: 2, Interesting

      Systems this large typically don't need a general purpose database, they need custom software designed specifically for the required tasks.

      This is another fallacy that's been foisted on the business community: that if you have data, you need a database.

      I actually designed a system similar to the one you mentioned. The initial specs called for called for importing, merging sorting and outputting 50 - 75 Gb of data each day.

      Even with a 16 processor boxe and a SAN, Oracle took 22 hours to process 24 hours worth of data.

      I finally convinced the company that just because they had a hammer, the problem wasn't necessarily a nail, rewrote the required functionality in a C application with NO DATABASE, and the sort/merge/output ran in less than 2 hours on an old leftover dual 500 Mhz Sun box we had laying around.

      No staff of DBAs, no huge Oracle licence fees.

      Although they never shared the savings information with me, it had to be over a million $/year.

    18. Re:MySQL vs. Oracle by bmalia · · Score: 2, Insightful

      1. MySQL supports all of the Oracle features you need to build and operate an enterprise software system.

      Thanks for the laugh!

      --
      There's no place like ~/
    19. Re:MySQL vs. Oracle by Zwack · · Score: 1

      Using McKesson as an example of good ANYTHING is not a great idea in my opinion.

      Some of their software is just incredibly badly written. For example, a data warehouse where they recommend that we shutdown the database every night (we're a 24/7 operation) and reboot the server every two weeks. The software is only available on Alpha processors (not a sensible choice as they are already end-of-life) or PA-Risc (almost end-of-life). The only reason PA-Risc is a choice is because they can run their Alpha code under an emulator.

      So, I personally wouldn't use McKesson as an example of anything good.

      Z.

      --
      -- Under/Overrated is meta-moderation, and therefore is Redundant.
  30. MySQL will still be.. by dotdan · · Score: 0

    MySQL will still be popular until most standard (cPanel/Ensim/Plesk/DirectAdmin/etc) hosts start supporting PgSQL by default. Most of them only support MySQL, and if someone is going to write a script, chances are it will be written for the majority. I mean, it's no excuse not to write a decent database abstraction layer, but regardless.

    1. Re:MySQL will still be.. by mattyrobinson69 · · Score: 1
  31. Don't forget Interbase/Firebird by ThinkThis · · Score: 3, Informative

    Our company has developed an app used at several hundred sites on the Interbase/Firebird platform. (Firebird is now the only open source version). It is stable, quick, low maintenance with support for transactions, triggers, row level lockinge, etc. I would consider MySQL for web development because it comes preinstalled on many hosts and because of the number of tools available.

  32. Web Tools by mikeboone · · Score: 2, Insightful

    So far I've stuck with MySQL for most of my projects since phpMyAdmin is so much better than phpPgAdmin. I can almost always get a web-based database tool running on the platform I'm developing for.

    If there's a better web interface for Postgres than phpPgAdmin, let me know so I can try it.

    1. Re:Web Tools by gorilla_au · · Score: 1
      phpMyAdmin has had more than its fair share of vulnerabilities and attacks.

      A better solution is to open the mysql port to the network (rather than local only). then using a ssh like connection, you can use whatever GUI you like. I would recommend MySQL's control centre (mysqlcc).

    2. Re:Web Tools by rycamor · · Score: 1
      Just what is so bad about phpPgAdmin? The fact that it allows you to do just about anything in PostgreSQL? Oh, I suppose it doesn't display as many nice colors as phpMyAdmin, but other than that, what is wrong with it's feature set:

      * Administer multiple servers
      * Support for PostgreSQL 7.0.x, 7.1.x, 7.2.x, 7.3.x, 7.4.x and 8.0.x
      * Manage all aspects of:
          o Users & groups
          o Databases
          o Schemas
          o Tables, indexes, constraints, triggers, rules & privileges
          o Views, sequences & functions
          o Advanced objects
          o Reports
      * Easy data manipulation:
          o Browse tables, views & reports
          o Execute arbitrary SQL
          o Select, insert, update and delete
      * Dump table data in a variety of formats: SQL, COPY, XML, XHTML, CSV, Tabbed, pg_dump
      * Import SQL scripts, COPY data, XML, CSV and Tabbed
      * Excellent language support:
          o Available in 26 languages
          o No encoding conflicts. Edit Russian data using a Japanese interface!
      * Easy to install and configure


      Fact is, phpPgAdmin has to do a *lot* more than phpMyAdmin, since PostgreSQL supports so many more features. I think they've done an outstanding job.
    3. Re:Web Tools by mikeboone · · Score: 1

      You're right, phpPgAdmin has a lot to do. I just find it cumbersome to work with, especially when it comes to browsing and editing data. phpMyAdmin has a really nice interface for this.

  33. Heavy by HadenT · · Score: 5, Informative

    I'm using PostgreSQL and MySQL, from my experience:
    1. I've never encountered corrupted data with mysql (It seems to be urban legend), and I have worked on tables with billions rows for two years.
    2. PostgreSQL has more features and/or is more complete (simple example can be auto_increment vs. sequences)
    3. PostgreSQL is heavier, and I hate statistics collector subprocess via udp (which seems to be eating 1-2% cpu all the time)*
    4. mysql isn't much (if any) faster.

    * - it's unlikely but possible my configs are to blame.

    1. Re:Heavy by RedPhoenix · · Score: 1

      > 1. I've never encountered corrupted data with
      > mysql (It seems to be urban legend)

      It's not, unfortunately. But I suspect that it has a LOT to do with the way you use the database. If you're doing the traditional 'shove lots of data in occasionally, and do plenty of regular queries', I doubt you'll see any corruptions as the number of index updates is pretty small, but if you're doing something like:

      * Insert 2-300 rows per second, constantly
      * Run queries occasionally (batch mode, about 3-5 hours worth, every 24 hours, and maybe a dozen interactive queries throughout the day)
      * Delete around 1/20th of the database every night. .. then you'll see the occasional corruption.

      MySQL 3 was horrible - from a pool of around 10 diverse systems, we'd get a corruption a week on average. (Variety of hardware, so unlikely to be memory/disk problems - and I'm not counting power failures). Mysql 4 seems better though.

      Red.

    2. Re:Heavy by Admiral+Justin · · Score: 1

      Friend of mine runs blogshares.com

      Millions upon Millions of rows, and it gets corrupted just about every month or so.

      Site has to be taken down while table repairs go on for hours.

      --
      You will be baked, and there will be cake.
    3. Re:Heavy by yem · · Score: 1
      I've never encountered corrupted data with mysql (It seems to be urban legend), and I have worked on tables with billions rows for two years.


      SELECT MessageDate FROM Messages WHERE MessageID = 1072047;
      | 0000-00-00 00:00:00 |


      Corruption or just complete lack of validation? I'll let you decide. (This column also has bogus data like month month >12 and day >31 - naturally I can't query for them though!)

      And I'm pretty sure you can turn those statistic processes off in postgresql.conf:

      #
      # Access statistics collection
      #
      stats_start_collector = true
      stats_reset_on_server_start = true
      stats_command_string = false
      stats_row_level = false
      stats_block_level = false
      --
      No, I did not read the f***ing article!
    4. Re:Heavy by pHDNgell · · Score: 1

      1. I've never encountered corrupted data with mysql (It seems to be urban legend), and I have worked on tables with billions rows for two years.

      See wikimedia. It certainly happened there and affected all of us.

      --
      -- The world is watching America, and America is watching TV.
    5. Re:Heavy by suresk · · Score: 1

      What makes this problem worse is that mySQL is usually paired with a loosely typed language such as PHP. When you convert something like this over to Oracle, you nearly die of a heart attack when you realize how unreliable your data is. I personally hate Oracle, but switching to it often greatly improves the integrity and reliability of your data simply because it enforces things like character length, proper date usage, etc...

    6. Re:Heavy by Shub-Internet · · Score: 1

      This (1) urban legend has bit us twice this week. If I may offer a speculation, I'd say that heavy activity is more relevant to this than just having billions of rows.

      --
      fnord(gazonk, foo, bar, baz, bletch, thud, grunt)
    7. Re:Heavy by mcrbids · · Score: 1


      1. I've never encountered corrupted data with mysql (It seems to be urban legend), and I have worked on tables with billions rows for two years.


      I see MySQL hosing itself about every 9 months or so, and usually in a *bad* way. (Where you have to rely on backups bad)

      I've only once seen anything similar for PostgreSQL, and I'd say I hit PG much, much harder than MySQL gets hit...

      Different folks, different strokes.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    8. Re:Heavy by nconway · · Score: 1
      3. PostgreSQL is heavier, and I hate statistics collector subprocess via udp (which seems to be eating 1-2% cpu all the time)


      Note that via configuration settings you can disable the stats collector, or reduce the amount of stats that are collected. I'm a bit surprised that the collector is imposing a noticeable amount of overhead with the default configuration.
    9. Re:Heavy by ajs318 · · Score: 1

      I would guess the corruptability also depends to some greater or lesser extent on the underlying filing system.

      For instance, the mail transport agent exim runs very fast on Linux, but very slowly on Solaris. This is due to different default caching policies: Linux {with ext2} caches every single disk write in RAM and only ever commits them to disk when it begins running out of RAM, or at shutdown; whereas Solaris by default blocks until the disk write is completed. Exim generates many temporary files in the course of its operation; on a Linux box with plenty of RAM, these files may never even see oxide.

      MySQL is of course as vulnerable as anything else to file corruption, and the ext2 way makes it also vulnerable to RAM corruption.

      Questions: What OS were you running to get files corrupted? What was the filing system and what was its caching policy? Did you have any closed-source software running? Have you stress-tested your RAM and HDD?

      If you make backups of the relevant .MYD, .MYI and .frm files just as the MySQL logs are about to drop off the end of the rotation sequence, you should at least be able to rebuild your database semi-automatically .....

      --
      Je fume. Tu fumes. Nous fûmes!
  34. here's a comparision by El_Muerte_TDS · · Score: 0

    mysql has 5 letters
    postgresql has 10 letters

    so clearly, postgresql has twice the letters, a clear victory if you ask me

    1. Re:here's a comparision by Anonymous Coward · · Score: 0

      A clear victory for MySQL! It must have half the bloat as it has half the letters ;-)

  35. What does postgres mean? by Anonymous Coward · · Score: 0

    as bad a name as joomla.

    1. Re:What does postgres mean? by Cmdr+TECO · · Score: 1

      POSTGRES came after INGRES.

      --
      echo 33676832766569823265328479713269.8639857989Pq | dc
    2. Re:What does postgres mean? by HermanAB · · Score: 3, Informative

      Most databases are descended from the Interactive Graphics Retrieval System INGRES. The original coder of Ingres later started a follow on project called Postgres and when SQL was standardised it became PostgreSQL. Basically, there are only about 4 database families: SAP, Ingres, DB2 and Oracle. I prefer using Postgres simply because it is funded by the nice US taxpayers through DARPA. If it is good enough for the military, it should be good enough for me...

      --
      Oh well, what the hell...
    3. Re:What does postgres mean? by hey+hey+hey · · Score: 2, Informative
      Most databases are descended from the Interactive Graphics Retrieval System INGRES.

      Care to name a couple? DB2 comes from System/R. Oracle seems to be home grown. Sybase came indirectly from Britton Lee, but was mostly written from scratch. SQL Server came from Sybase. Certainly RTI's product was based on Ingres.

      The original coder of Ingres later started a follow on project called Postgres and when SQL was standardised it became PostgreSQL.

      Hate to break it to you, but there was a HELL of a lot more than one person coding Ingres, over a very long time.

      Joe Kalash
      Chief Programmer, Ingres Project
      1982-1985
      (I may still have some business cards to prove it)

    4. Re:What does postgres mean? by HermanAB · · Score: 1

      Well, of course there were multiple people working on these projects, but my comment wasn't about the people really. Here are a few of Ingres' bastard children that I can think of, you'll no doubt know more: Sybase, Informix, Microsoft SQL Server, Illustra, NonStop SQL and of course PostgreSQL... So, there are many other database families, as I indicated in my post, but being an open project, Ingres was by far the most influential, since the other projects are all rather secretive. In terms of money, SAP and Oracle seems to be the largest, but goodness knows which DB is the largest in terms of records served.

      --
      Oh well, what the hell...
  36. Mysql is very isp friendly by Billly+Gates · · Score: 4, Insightful

    The one good thing I have to say about mysql is that its multi-user friendly for hundreds of accounts.

    For a mom and pop ISP with only 3 or 4 employees this is significant. Is it feature filled? No

    Its just included in the default user account which is difficult if not impossible with posgresql unless you manually install it for each account.

    Users on the web dont need something heavy unless they are a commercial website. Also there are a ton of php and perl scripts and tools for users to use.

    This is why msql is so popular. Its what ISP's prefer.

    1. Re:Mysql is very isp friendly by WereTiger · · Score: 2, Informative

      Speak for yourself, I'm an IT Manager for a Communications company and we've found MySQL to perform far worse for heavy load usage as compared to Postgres. We've migrated completely to Postgres with no regrets and significant performance increase.

      --
      If you're hearing rhetoric about Linux, open source, or Mac and everyone's bashing Microsoft, you've found Slashdot.
    2. Re:Mysql is very isp friendly by Billly+Gates · · Score: 2, Insightful

      Postgresql is a much better database. No doubt about it. I would prefer it if I were writting an application.

      However if your a small isp with little to no support staff mysql is the easiest to install and configure for average home users and small business on a server farm. That is all I am saying and why mysql is incredibly popular. Its just what the ISP's love using and including by default.

      The same reason Windows and Dos became popular. Its the OS OEM's love to include.

    3. Re:Mysql is very isp friendly by GuyWithLag · · Score: 1

      It depends on you usage. PostgreSQL is way better handling multiple concurrent writes, while MySQL is (usually) better on read-mostly data.

    4. Re:Mysql is very isp friendly by ttfkam · · Score: 3, Informative

      Debian: apt-get install postgresql (or use Synaptic)
      Gentoo: emerge postgresql
      Fedora: rpm -Uvh postgresql-8.0.3.i386.rpm (or select the "Database" package during install)
      Windows: setup.exe

      Easy administration from Windows, OS X, Linux, and BSD with PgAdmin.

      Or were you talking about a manual install? Sure that's harder, but most of us don't do manual installs. Just those crazy Slackware folks and their ilk. ;-)

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    5. Re:Mysql is very isp friendly by schon · · Score: 1

      However if your a small isp with little to no support staff mysql is the easiest to install and configure for average home users and small business on a server farm.

      Umm, no.

      If you belive this, then you're never really used it, because you don't know enough about it.

      ISPs use it because their customers want it. Period.

    6. Re:Mysql is very isp friendly by schon · · Score: 3, Interesting

      Its just included in the default user account which is difficult if not impossible with posgresql unless you manually install it for each account.

      Complete, utter bullshit.

      PostgreSQL does *NOT* need to be "manually installed" for each user any more than MySQL does.

      there are a ton of php and perl scripts and tools for users to use.

      This is the reason why MySQL is more popular for ISPs - because there is a bunch of PHP code that runs only on it.

      Its what ISP's prefer.

      No, it's what ISPs offer. And they offer it because people ask for it.

    7. Re:Mysql is very isp friendly by einhverfr · · Score: 1

      However if your a small isp with little to no support staff mysql is the easiest to install and configure for average home users and small business on a server farm. That is all I am saying and why mysql is incredibly popular. Its just what the ISP's love using and including by default.

      Your ISP helps home users install MySQL?

      If you are an ISP who runs the servers, then you don't have to worry about configuring it for home users. YOu simply have scripts that create the accounts/databases (I think cpanel provides these).

      PostgreSQL is *much* easier to keep running than MySQL.

      The reason why MySQL is still dominant in this area is that there are so many web applications that depend on it. Nothing more nor less.

      --

      LedgerSMB: Open source Accounting/ERP
    8. Re:Mysql is very isp friendly by quanticle · · Score: 2, Interesting

      The thing is that all of the above processes require root access. If you're going with a 3rd party hosting service, that's something you won't have. This is what the grandparent poster was talking about. The reason that MySQL is so popular is that ISPs include it, and that those who need a database on their website are therefore "locked into" MySQL.

      --
      We all know what to do, but we don't know how to get re-elected once we have done it
    9. Re:Mysql is very isp friendly by electroniceric · · Score: 2, Interesting

      The simple reason people get started with MySQL is that it's popular. So there are more tutorials on how to get started, more books, more widgets and wizbangs that work with MySQL, etc. This also means there is a larger network of people to answer questions.

      Contrary to popular opinion however, Postgres is now extremely easy to install and administer, either on Windows or *nix, has excellent resource use (i.e., on my Windows box, it's much more lightweight than MySQL), and it has an GUI admin tool right in the box. And because of its liberal licensing scheme (BSD), you can use it for anything you like. What of that makes it hard for ISPs to run Postgres? The only hard thing I can think of is finding people who know it.

      I'll concede that postgres' user model is rather limited, but this is slated for substantial improvement (conversion to roles) in version 8.1 now in beta.

      Postgres really has a rather extraordinary feature set: what other DBMS (open or closed source) has Perl and Ruby procedural languages (PL/Ruby), or an (admittedly incomplete) statistical procedure language (PL/R), custom aggregrates, Kerberos authentication? And in my experience you have all that stuff there if you need it (which as you correctly point out, most simple database driven pages do not), but it does get in your way when you don't use it, and it's there for you to grow with when you want it.

    10. Re:Mysql is very isp friendly by ahodgson · · Score: 1

      It depends on you usage. PostgreSQL is way better handling multiple concurrent writes, while MySQL is (usually) better on read-mostly data.

      Not that much better. I did some testing last year and MySQL was about 25% faster than PostgreSQL for a dead simple read-only web page. Anything more complicated or involving writes or using trnasaction-safe tables swung the other way.

    11. Re:Mysql is very isp friendly by Ragica · · Score: 1

      Here we go again. I admin at a small ISP. Unfortunately I have to set up a lot of users with mysql because they ask for it. There is something nice to be said for all of the access control being within db tables.

      However...

      1. What mysql gives in more convenient access control setup, it completely takes away in a horrific security record. I may be able to set up users the way I want easier, but I'm constantly having to upgrade and apply security patches... which disrupts everyone.

      2. Most of the awkwardness in our Postgresql setup is due to legacy support. If i was setting up postgresql fresh on an ISP now, it'd be done much differently than our ISPs current method. There's a few different approaches. One interesting one is using postgresql's "namespace" support. See the "db_user_namespace" setting in postgresql.conf (it's turned off by default). It automatically segregates users who log in to the server to their own namespace...

    12. Re:Mysql is very isp friendly by Zandall · · Score: 1

      ISPs install MySQL using root.
      Cpanel just configures it. It doesn't install apache, mysql and so.
      BTW, cPanel didn't forget PostgreSQL

    13. Re:Mysql is very isp friendly by ClayDowling · · Score: 2, Interesting

      PostgreSQL was held back for years by documentation that made the user account and security system seem arcane. I finally decided to bite the bullet and install PostgreSQL. It turns out that the security system isn't any more arcane than MySQL, the documentation just made it seem harder.

      Personally I like the features of PostgreSQL better, probably because I've been working with databases professionally for roughly ten years. For a lot of situations though MySQL is not only adequate, but an ideal choice because you can usually count on people having access to it.

  37. My GOD! by jellomizer · · Score: 1

    MySQL has partnered with SCO MySQL must be evil. OK EVERYONE STOP WHAT YOU ARE DOING RIGHT NOW!! and Re-port all your application into PostgreSQL!!!. Seriously partnerships are not alliances, IBM is Partnered with Microsoft and IBM is one of the largest Linux supporters out there. All that a partner ship does is allow company A to buy company B's product or servies at a bulk price. with the agreement that so many products will be sold or so much will be paid a month.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:My GOD! by iggymanz · · Score: 1

      "As part of the agreement, the companies will work together on a range of joint marketing, sales, training, business development and support programs" Sounds like more than typical product selling partnership to me

  38. In South Korea... by JamesP · · Score: 0, Funny

    only old comparisons matter...

    (had to do it)

    --
    how long until /. fixes commenting on Chrome?
  39. Save me from the VACUUM! by Anonymous Coward · · Score: 0

    With over 3 million rows in the largest table in our database, Posgres is starting to show its weaknesses.

    Anytime that I see a VACUUM VERBOSE ANALYZE in the process list, I know that my queries won't complete for 3 hours or so. But if we don't vacuum the tables, the entire database grinds to a halt (load average of 15 during the busy times).

    darn VACUUM

  40. No. by Anonymous Coward · · Score: 0

    No. You can make a derivate database engine from MySQL, but you aren't forced to release it under the GPL, and are free to release it under a propriety license if you want, and sell it even if you think people will buy it.

    This is why people are protesting dual-licensing schemes that are half GPL, half propriety. They'd rather they be full GPL and the derivate of any GPL software be open-source'd, for anybody to learn and/or improve upon. Sure, dual-licensing can be the best of both worlds, but some people would rather all incarnations of MySQL be open to the public.

  41. But would Kroger co-release it? by khasim · · Score: 2, Interesting

    Would a Kroger executive talk enthusiastically about your new "partnership" with them?

    Usually, companies don't want to be seen publicly supporting nutcases who try to make a news story about buying some toothpaste.

    SCO can have the press conferences it wants and tell everyone whatever they want ... but it changes when another company is quoted as saying anything more than "we sold them a license and we'll sell you one too!"

    1. Re:But would Kroger co-release it? by bitingduck · · Score: 3, Funny

      Would a Kroger executive talk enthusiastically about your new "partnership" with them

      But it would make a great story in the Onion...

      "Kroger DEO David Dillon said that he was 'very pleased to have the opportunity to supply toothpaste and other oral hygiene products to Quarters, who is widely known for is impeccable white teeth and fresh breath.'"

    2. Re:But would Kroger co-release it? by tigersha · · Score: 1

      Who knows, maybe the Onion is for real and they publish the least 100 popular press releases every day...

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  42. Haw haw by Safety+Cap · · Score: 4, Informative

    Parent is comparing non-current versions, and making up false "cons" for mysql, out of thin air...

    5.0 has views, triggers, stored procedures etc, and it's still amazingly fast.

    So, if I try to insert, say, a string of 10 chars into a varchar(9) field, what will it do? Will the magic version 5 reject it, as ever real database does, or will it truncate it silently, just as Toy databases (ala MySql 4.x) are wont to do?

    What about the whole not-null thing? You know, if a field is set to NOT NULL and you don't populate it when you insert a row, a real database will reject it, where as a Toy database will accept it (MySql 4.x again!) and populate it with ... some other value.

    --
    Yeah, right.
    1. Re:Haw haw by Anonymous Coward · · Score: 0

      omfg, get a life, willya?

    2. Re:Haw haw by einhe1t · · Score: 1

      Your error is assuming that only a "real" database would choke and die on input error, while only a "toy" database would discard the excess string length and continue on...

      While I congratulate you on your search for a test case, and your point could be argued, it's far from a given. You can always set constraints if you're concerned about the correctness of the input data you have prepared.

    3. Re:Haw haw by friedmud · · Score: 1

      It all depends on what you're doing...

      For me, I use MySQL mainly for website backends (as do LOTS of other people). In that context the 2 things you cited make more sense...

      Truncating varchars is handy for webforms... you don't want to reject the data... but usually the data isn't important enough (like a slashdot post) to really care if a couple words get chopped off by accident (in case you didn't set the character limit on your textbox to match the database).

      And filling in NOT NULLS is also handy for the same reason.... if you REALLY need the logic to reject things like blank inputs in web forms then you should be doing that in your application logic anyway.... or if you really don't care all that much you probably just want to accept the submission quietly.

      I am by no means sticking up for non-conformity... just trying to relay the idea that in the context that mysql is usually used, these small quirks don't have a large impact.

      If I was going to do a "real" database for storing transactional records for a large company... I would probably use a more full-featured database (like Postgres).... but since that's not my use case MySQL fits the bill well.

      Friedmud

    4. Re:Haw haw by Anonymous Coward · · Score: 0
      You can always set constraints if you're concerned about the correctness of the input data you have prepared.

      ... like having NOT NULL in schema, or defining VARCHAR(9) for a column?

    5. Re:Haw haw by Uber+Banker · · Score: 1

      So, if I try to insert, say, a string of 10 chars into a varchar(9) field, what will it do? Will the magic version 5 reject it, as ever real database does, or will it truncate it silently, just as Toy databases (ala MySql 4.x) are wont to do?

      What sort of toy program passes invalid variables/values? While an OK second check, relying on the database to pick up potential correction is a damn poor first line of defense; what would happen when the user gets your error message "err #123123 wrong thing passed to thing..." (if parsable by the program at all), could be really useful huh?

    6. Re:Haw haw by schon · · Score: 4, Insightful

      Truncating varchars is handy for webforms... you don't want to reject the data..

      Yes, I do. That's why I set the length in the first place. If I wanted to truncate the data, I'd tell the DB to do that.

      if you REALLY need the logic to reject things like blank inputs in web forms then you should be doing that in your application logic anyway

      This is the problem with MySQL's cheerleaders - they believe that the app designer should re-invent the wheel, rather than expecting the DB to do the stuff that it's supposed to do.

      Why on earth should I have to write extra code to check each input field, when I should just be able to send the results to the DB, and return the error message to the client if it fails?

      just trying to relay the idea that in the context that mysql is usually used, these small quirks don't have a large impact.

      The only reason that people believe that they don't have a large impact is because they don't actually understand the *reasons* for the correct behaviour. The attitude is "well, I'm a programmer, so I'll just program around the problems", rather than expecting the DB to handle it (like it's supposed to.)

    7. Re:Haw haw by bahwi · · Score: 1

      I don't believe your lack of ability to verify your field entries makes MySQL a toy database. Data integrity checking should be done on the App, that way if it is invalid, a database call isn't even necessary. If the DB rejects it, what are you going to do with it? You've gotta send it back to where it came from and try to get a valid value.

    8. Re:Haw haw by ttfkam · · Score: 1

      I guess you've never had a hard deadline coming up and programmed at 4:30am. You're right, the database constraints should not be used as a first line of defense. They do however need to be present as a last line of defense.

      Sloppy: Bad data and queries sent to the database

      Screwed: Bad data and queries accepted by the database

      Most of us try to avoid being sloppy. When that fails (we are human after all), I prefer to not be screwed.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    9. Re:Haw haw by the+eric+conspiracy · · Score: 1


      This is the problem with MySQL's cheerleaders - they believe that the app designer should re-invent the wheel, rather than expecting the DB to do the stuff that it's supposed to do.


      That is EXACTLY the main problem with MySQL. It is ALWAYS missing some basic functionality that you have to implement in code. Sorry, but IMHO that just disqualified your product from consideration. I cannot believe that we are in 2005 and there are STILL fundamental pieces of DB functionality that are missing from MySQL.

    10. Re:Haw haw by Wolfkin · · Score: 1

      The character limit on your textbo-- wha?! Um, shouldn't the app logic be checking that before it even makes it to the database? What if someone decides to pass in a few thousand extra characters?

      There's no reason to abuse your database this way, man. :)

      --
      Property law should use #'EQ, not #'EQUAL.
    11. Re:Haw haw by slamb · · Score: 3, Insightful
      but usually the data isn't important enough (like a slashdot post) to really care if a couple words get chopped off by accident

      That is exactly the MySQL attitude. The problem is that my data tend to be important, or I wouldn't be putting them in a RDBMS. I'd rather the database assume the usual, safe thing - data should not silently truncated. If I want to throw away my data, I'll do it explicitly.

      And filling in NOT NULLS is also handy for the same reason.... if you REALLY need the logic to reject things like blank inputs in web forms then you should be doing that in your application logic anyway....

      What I REALLY need is for the database to pay attention to the constraints I specify. If I didn't care if these fields were blank, I wouldn't have said "NOT NULL".

      I am by no means sticking up for non-conformity... just trying to relay the idea that in the context that mysql is usually used, these small quirks don't have a large impact.

      That is not the context in which mysql.com is claiming their database is usually used. They claim they have a real database.

    12. Re:Haw haw by Farce+Pest · · Score: 1
      If you are using MySQL-5.0 and set it to strict mode, column overflows will abort the transaction; see The Server SQL Mode.

      BTW, here's New Features We Don't Plan to Implement:

      We aim toward full compliance with ANSI/ISO SQL. There are no features we plan not to implement.
      --
      This message has been scanned for memes and dangerous content by MindScanner, and is believed to be unclean.
    13. Re:Haw haw by Bloater · · Score: 1

      > if you REALLY need the logic to reject things like blank inputs in web forms then you should be doing that in your application logic anyway....

      Yes, you should often try not to submit data that the database cannot represent since it reduces the overhead, but you should also be allowed to sometimes assume that the data is correct and the database will tell you if it is unable to do what you ask. That is the premise behind exceptions, you act like its going to work, and wait until you are told that it doesn't, then the database can be tuned by extending lengths, accepting 4 dimensional GIS data, etc and the application doesn't have to be changed.

      The database is responsible for the data that can be represented, and there is often a functional specification that the application should export the representational capabilities of the storage backend. That defines a functional boundary at the DB/App and exceptions on invalid data are an absolute *requirement*. There is a whole range of programmes that cannot be written if that is not there (ie those programs where the DB part is supposed to be swappable for a new version with greater domain).

      For the class of applications that need some default to be substituted for invalid data, with the exceptional style the application can just wait for an exception then try the same again with the default substituted.

    14. Re:Haw haw by jrexilius · · Score: 1

      "Why on earth should I have to write extra code to check each input field, when I should just be able to send the results to the DB, and return the error message to the client if it fails?"

      there are these nasty things called sql injection attacks and other nastiness.

      as a developer you should never, never throw data in the DB and see what sticks.

      since the DB is generally nothing more then a persistence layer and the app logic contains your rules and constraints for data and methods, this is also where your validation and error checking should be.

      however, I agree that MySQL does exhibit bad behaviour in certain circumstances.

    15. Re:Haw haw by Morden · · Score: 1

      1. Because exposing your database error message to the client is a Bad Thing To Do(tm). (And the kids using your website don't need to know that your permission-to-spam field is called "spamthesucker" if it triggers an error).

      2. Because your application can verify things that your database cannot (my applications check for MX and DNS records on user-supplied email addresses, does your database?).

      3. Because sending unchecked, unverified data to your database is a Very Bad Thing To Do(tm).

      4. Your application has to pass the data to the database, so why NOT have the application check it before it puts load onto the database?

      Really, why WOULDN'T you verify the data at the application layer? You're talking a few extra lines of pretty simple string comparison code.

    16. Re:Haw haw by Mattintosh · · Score: 1

      No, the problem here is that MySQL is being dealt with on a level it wasn't designed for.

      The major gripe here is that MySQL silently does it's job storing data without letting you know that the data had to be slightly altered to fit. While I can see areas where this would be a problem, allow me to point out to you that the entire WWW is designed to silently fail to a common baseline. If you write <b>blah <i>foo bar</b> in a web page, all current browsers will silently fail to make a big, fat, hairy deal out of that minor error and will silently display it the same way as <b>blah <i>foo bar</i></b>, which would be the correct way of closing those tags. What MySQL does is the exact same thing. It protects sloppy and/or stupid people from their mistakes. And better yet, it speeds up development time on apps made to deal with sloppy and stupid people by silently absorbing their stupidity without complaint.

      There's something to be said for that in some instances. Which is why I have come to the conclusion that if it doesn't suit your needs, plug your pie hole and let it suit someone else's.

    17. Re:Haw haw by jdew · · Score: 1

      It's called "bind variables" perhaps you've heard of it? ^_^

    18. Re:Haw haw by 1110110001 · · Score: 1

      Truncating varchars is handy for webforms... you don't want to reject the data... but usually the data isn't important enough (like a slashdot post) to really care if a couple words get chopped off by accident (in case you didn't set the character limit on your textbox to match the database).

      I guess Slashdot would look very funny if MySQL truncates the text. If you've ever looked below the submit button you'd have seen the allowd tags. If your text limit is in the middle of one of these tags or maybe just the closing tag doesn't fit in the field the whole page is screwed.

      Sure you could check every comment you get from the database - every time you need to display. Or maybe someone should enforce length limits. That's where it really sucks if MySQL thinks it knows better what it should to with my text.

      b4n

    19. Re:Haw haw by JetTredmont · · Score: 1

      And filling in NOT NULLS is also handy for the same reason.... if you REALLY need the logic to reject things like blank inputs in web forms then you should be doing that in your application logic anyway.... or if you really don't care all that much you probably just want to accept the submission quietly.

      Okay, but isn't a user putting no input in an input field a blank string, not an unspecified field on insert? While some DBs equate the two, I'd say they're rather different. And while it's great that MySQL will allow the insert to put a blank value in a not-null text field, it's not great at all that if the bonehead web designer forgets to put the "First Name" field on the page or in his application logic that the database silently "corrects" his oversight.

      The ideal web app is highly forgiving of user input, but thoroughly unforgiving of developer misconduct. See compiler vs runtime errors as a rough analogy.

      Truncating varchars is handy for webforms... you don't want to reject the data... but usually the data isn't important enough (like a slashdot post) to really care if a couple words get chopped off by accident (in case you didn't set the character limit on your textbox to match the database).

      Again, here I'd want an error. I'd rather have one user get an "Unknown error in database; please contact site admin" style message as well as a logged message server-side just in case they don't call it in when they put 1025 chars into a name field and properly fix the error than for a thousand users to come across the fact that anything after 1024 chars is silently truncated. It's thoroughly unprofessional, IMHO.

      Again, I'd want the database to tell the web page designer he's a bonehead rather than whisper it quietly to every user of the site. The fact that the database prefers gossip over direct constructive criticism might be considered rude in some circles.

    20. Re:Haw haw by Styros · · Score: 1

      Truncating varchars is handy for webforms... you don't want to reject the data...

      You don't want to reject the data? Are you kidding me? So if a person submits a comment like: "I want to buy item #[snip]", that's ok?

      And filling in NOT NULLS is also handy for the same reason....

      You've completely lost me on this one. What do you think a NOT NULL is, a suggestion??? Why in the world would you specify a NOT NULL then? Just set the column to default to empty string.

      small quirks don't have a large impact

      You seem to think that these "small" issues won't affect the small company. You couldn't be more wrong! Small companies are the most affected because they have LESS DATA. If you have 1 million records and 10 gets corrupted, nobody will blink an eye. If you only have 100 records, and 10 gets corrupted, somebody's head will roll.

      MySQL for blogs, forums, or photo galleries, sure no problem. It's probably the ideal solution. But, MySQL for eCommerce, CMS, PLM, etc, something that you earn your bread and butter on, you're rolling the dice.

    21. Re:Haw haw by huiac · · Score: 1

      1. Because the language for a production web app shouldn't send error messages to the client (Yes PHP, I'm looking at you);

      2. Because you have no choice but to perform what checks you *must* (e.g., DNS checks) in application code, but you should always enforce what integrity checks (like string length, foreign keys, etc) in the database, as well as in web forms where possible (e.g., MAXLENGTH). Otherwise, you risk a buggy component compromising your entire dataset.

      3. Because whether you check your data or not, you always use placeholders to protect against SQL injection attacks.

      4. You have a database mainly to ensure ACIDity so why the hell not use it, rather than cobbling together a half-assed attempt at it in your application code?

      huiac at internode.on.net

    22. Re:Haw haw by unoengborg · · Score: 1

      Thats good. The problem is that they don't tell you when they plan to have it done.

      In the mean time Postgresql is a good solution.

      In fact it may stay a good solution even after MySQL is done, as the Postgresql licence gives you freedoms not available from MySQL.

      --
      God is REAL! Unless explicitly declared INTEGER
    23. Re:Haw haw by MochaMan · · Score: 1

      I agree. Further, APIs shouldn't bother throwing exceptions or returning error codes either. And browser implementers should feel free to deviate from W3C specs in cases where it's handy. And if users find sites or apps designed for the quirks in one particular browser or database are impossible to migrate to another RDBMS or browser... well tough luck.

      Or... maybe adherance to standards and proper error handling could be useful afterall.

    24. Re:Haw haw by Overly+Critical+Guy · · Score: 1

      if you REALLY need the logic to reject things like blank inputs in web forms then you should be doing that in your application logic anyway....

      This is ridiculous. You want your database to give you warning about your invalid input so you can correct it in your code instead of silently corrupting your data.

      or if you really don't care all that much you probably just want to accept the submission quietly.

      That's the problem, MySQL will always just accept it quietly. Humans are imperfect, and if your code has a bug, who knows how long it would be before you noticed invalid data showing up in the database...or, your database could have warned you so your code could check for it in the first place, and you could fix the input you're feeding the database.

      For me, I use MySQL mainly for website backends (as do LOTS of other people).

      MySQL is pretty much used exclusively in the non-essential, "dynamic homepage" market where data isn't important. I would not use MySQL in cases where data matters. Incidentally, I care about the data on my site and don't use MySQL there, either.

      --
      "Sufferin' succotash."
    25. Re:Haw haw by Overly+Critical+Guy · · Score: 1

      there are these nasty things called sql injection attacks and other nastiness. as a developer you should never, never throw data in the DB and see what sticks.

      Which makes MySQL's liberal acceptance of any data all the more dangerous.

      --
      "Sufferin' succotash."
    26. Re:Haw haw by Overly+Critical+Guy · · Score: 1

      What sort of toy program passes invalid variables/values?

      What sort of toy database silently accepts them?

      Humans are imperfect and don't write perfect code You need the database to throw those warnings so you can know where you're submitting invalid data and fix the problem.

      I will never understand this--MySQL fans continue to argue that it's completely okay for the database to silently accept any data, even truncating it without telling you. This is why MySQL continues to be considered a toy database.

      --
      "Sufferin' succotash."
    27. Re:Haw haw by sco08y · · Score: 1

      Why on earth should I have to write extra code to check each input field, when I should just be able to send the results to the DB, and return the error message to the client if it fails?

      In theory that should work perfectly, but it would require that the DBMS be given enough knowledge of the client that it can formulate an intelligent error message. Oh, and there's the occasional problem of the user speaking a language other than English...

      (It's not, IMHO, an insurmountable problem but it would require some way of fully integrating clients with DBMSs to a level where the DBMS stores information on the forms used by client applications. I seriously doubt SQL DBMSs could ever handle this.)

      In practice, I've never seen a DBMS that returns error messages that are useful to anyone but a DBA. So it makes sense for clients to at least check for the common errors.

    28. Re:Haw haw by fferreres · · Score: 1

      >So, if I try to insert, say, a string of 10 chars into a varchar(9) field, what will it do?

      It will do exactly what the datatype says: use 9 fixed chars and add "extra chars" somewhere else. Varchar is to be used when most of the data is >= 9 chars, but some (few) strings are larger than 9 chars.

      >What about the whole not-null thing?

      This just isn't true. You know, if a field is set to NOT NULL and you don't populate it when you insert a row, MySQL will complain (unless you defined a "default value" for the field.

      --
      unfinished: (adj.)
    29. Re:Haw haw by Overly+Critical+Guy · · Score: 1

      If the DB rejects it, what are you going to do with it?

      Fix the code that's sending the invalid data? This "data integrity should entirely be in the app" argument is ridiculous. No matter how much data validation you do in code, your database should be checking the input sent to it. A database should not silently insert 0000-00-00 if you submit an invalid date, nor should it silently truncate your data. It should throw an error so you'll catch it in code (you should always be checking for an error after every query).

      Data validation in code is the first line of defense, but database input validation is the last, essential line of defense, because if your code screws up (humans aren't perfect) and bad data gets sent to a database like MySQL, it could silently go in without your knowing.

      --
      "Sufferin' succotash."
    30. Re:Haw haw by fferreres · · Score: 1

      >The only reason that people believe that
      > they don't have a large impact is because
      > they don't actually understand the
      > *reasons* for the correct behaviour.

      The reson being neither you nor him knows what theiy are talking about...

      From the mysql online reference manual:

      The length of a CHAR column is fixed to the length that you declare when you create the table. The length can be any value from 0 to 255.

      Values in VARCHAR columns are variable-length strings. In contrast to CHAR, VARCHAR values are stored using only as many characters as are needed, plus one byte to record the length.

      If you assign a value to a CHAR or VARCHAR column that exceeds the column's maximum length, the value is truncated to fit. If the truncated characters are not spaces, a warning is generated. You can cause an error to occur rather than an warning by using "strict" SQL mode.

      --
      unfinished: (adj.)
    31. Re:Haw haw by JakusMinimus · · Score: 1

      You can always set constraints if you're concerned about the correctness of the input data you have prepared.

      NOT NULL is a constraint, semantically and in the RDBMS sense as well. so is the defined maximum number of characters you can store in a field.

      --

      You can be an atheist and still not want to succumb to some weird cross-over sheep disease -- AC
    32. Re:Haw haw by fferreres · · Score: 1

      > ... data should not silently truncated.

      If you assign a value to a CHAR or VARCHAR column that exceeds the column's maximum length, the value is truncated to fit. If the truncated characters are not spaces, a warning is generated. You can cause an error to occur rather than an warning by using "strict" SQL mode.

      You do check the data before insert, and do check for warnings afterwards, right?

      > What I REALLY need is for the database to pay attention to the constraints I specify. If I didn't care if these fields were blank, I wouldn't have said "NOT NULL".

      If you try to store NULL into a column that doesn't take NULL values, an error occurs for single-row INSERT statements. Else, you must be using InnoDB, so that all the changes get rolled back (and one of the latter MySQL versions).

      --
      unfinished: (adj.)
    33. Re:Haw haw by fferreres · · Score: 1

      0000-00-00 is a valid date, it's jesus christ's birthdate. :-P

      --
      unfinished: (adj.)
    34. Re:Haw haw by JakusMinimus · · Score: 1

      If you write <b>blah <i>foo bar</b> in a web page, all current browsers will silently fail to make a big, fat, hairy deal out of that minor error and will silently display it the same way as <b>blah <i>foo bar</i></b>, which would be the correct way of closing those tags. What MySQL does is the exact same thing. It protects sloppy and/or stupid people from their mistakes

      Bold emphasis is mine. And, no, they are not the same damned thing. Presented data is by no means equivalent to persisted data.

      --

      You can be an atheist and still not want to succumb to some weird cross-over sheep disease -- AC
    35. Re:Haw haw by ajs318 · · Score: 1

      Where are you making your call to the database server from? A scripting language perhaps?

      If you really care about losing the end of a ten-character word by putting it into a VARCHAR(9) field, or about a field not being populated which should be populated, then do the check in the scripting language before you call the database server and complain about it there.

      You've got to pick a behaviour for exceptional cases -- either try and do as much as you can with what you have available, or protest loudly and not even bother. Whichever you pick is certain to piss somebody off -- I'll dare bet you there are users of other people's databases complaining that if you try to store a string in a field that's too short it should just lop off the excess characters, not throw up an error.

      If you had a database that sometimes barfed over exceptions and sometimes dealt with them quietly, and gave you no way to know in advance which it was going to do, then you would have a valid cause for complaint. But MySQL always tries its best to store something {and it keeps verbatim logs of queries just in case, so if something goes really tits-up it can be fixed manually}. You should know that's its default behaviour. And if you really don't like it, what's stopping you from changing it?

      --
      Je fume. Tu fumes. Nous fûmes!
    36. Re:Haw haw by Bloke+down+the+pub · · Score: 1
      Why on earth should I have to write extra code to check each input field, when I should just be able to send the results to the DB, and return the error message to the client if it fails?
      Because you want to be the leader in the ERP field?

      SAP builds all its checking in the application layer. It was designed that way so 1) it would be DB independent and 2) so it would run on very primitive DBs.

      --
      It's true I tell you, feller at work's next door neighbour read it in the paper.
    37. Re:Haw haw by archen · · Score: 1

      In practice, I've never seen a DBMS that returns error messages that are useful to anyone but a DBA. So it makes sense for clients to at least check for the common errors.

      Pretty much what I was going to post. If you your data is bad and you send it to the server and get a DB error back, you either have to figure out what to do with the error, or spit it out at the user. And lets face it, what in the hell is a user going to do with an SQL DB error message?

      Basically you should rely on data checking for your user's sanity in your app no matter what. It's your app's job to sheild the user from the DB. It is the DBs job to shield good consistent data from your app's stupidity.

    38. Re:Haw haw by Decibel · · Score: 1

      And what happens if instead of a varchar/char you try storing 300 in a tinyint? Or 10000 in a numeric(4)?

      MySQL's biggest problem is that it's developers always want to try and make things easy at the expense of data integrity. They think it's ok if your data gets a little 'banged up' along the way.

    39. Re:Haw haw by Decibel · · Score: 1

      Better yet, if you really care about your data, use a database that does as well.

      And if you don't care about your data, why are you even bothering to store it?

    40. Re:Haw haw by Anonymous Coward · · Score: 0
      Your error is assuming that only a "real" database would choke and die on input error, while only a "toy" database would discard the excess string length and continue on...

      Reporting bad input is not the same as "choking and dieing". Not even close. It's pointing out either a data or programming error (depending on the application) and staying in the known previous state. That is the correct behavior.

    41. Re:Haw haw by dhahn · · Score: 1

      So, your saying it is better to trade one bad habit for another?

      Why on earth should I have to write extra code to check each input field, when I should just be able to send the results to the DB, and return the error message to the client if it fails?

      So, data validation in an application is meaningless? Frankly, I'd rather have the application validate the information and the DB enforce it. Then, a change either place (app or DB) doesn't result in data problems.

    42. Re:Haw haw by fferreres · · Score: 1

      True, but what's worst may be the people using it, not the database itself (which really has limitations). It's a forgiving last defense for people that really makes thing last longer before collapsing. Truncating or not the problem is a tiny int ever requiring a 300 insert.

      --
      unfinished: (adj.)
  43. Coolest Feature of Postgresql by daperdan · · Score: 2, Interesting

    I've used both databases for years and they both have their place. One thing that is rarely mentioned about Postgresql is the Table inheritance. I have yet to find this feature in another RDMS. Anyone know of a database out there that supports this feature?

    It allows you to create a table that inherits the fields of a parent table. Each time you insert data into the child table the parent also gets a record. You can use regular expressions to select from all child tables. Very cool and useful.

    1. Re:Coolest Feature of Postgresql by Anonymous Coward · · Score: 0

      As I understand it, the data entered into the child table is not also entered into the parent table, but select statements on the parent table will return data in the child table. Important distinction.

    2. Re:Coolest Feature of Postgresql by modulo · · Score: 1

      Intersystems' Caché (while not strictly an RDMS ) projects child classes as tables, with
      the attributes common with the parent also appearing
      as fields in the parent table, see
      http://platinum.intersystems.com/dev/devsqlproject ion.html
      .

      --

      ...but the language is MUMPS, which I will not utter here

  44. Re:Minor Detail by Anonymous Coward · · Score: 0

    why should it matter what the server wants? The client can be as user-friendly as it needs to be, and can silently send '\q' to the server whenever you write 'exit'. In fact, many database servers won't even accept ascii, so you will need a 'smart' client to do things like split your query into batches (e.g. isql splits your script into batches on every line equalling 'go', even though 'go' has no special meaning under the dbms). Don't confuse simple client-side interpretation from server-side query parsing. Oh, and SQL*Plus (Oracle's text-based sql client) will send the appropriate exit instruction on any batch (delimited by '/') containing 'exit' by itself.

  45. MySQL webpage is full of bullshit by typical · · Score: 1, Interesting

    You are correct (IANAL, but you're right). However, this is *not* what the MySQL people claim -- take a look at their commercial license webpage. The existence of this webpage is one major reason why I prefer to avoid MySQL. The people behind MySQL not have a Do No Evil stance. At least the postgres people aren't assholes.

    --
    Any program relying on (nontrivial) preemptive multithreading will be buggy.
    1. Re:MySQL webpage is full of bullshit by nagora · · Score: 1
      The existence of this webpage is one major reason why I prefer to avoid MySQL. The people behind MySQL not have a Do No Evil stance

      I don't understand the problem. That page is for your NON-GPL applications. GPL apps act as normal. It's pretty usual for companies to offer a non-gpl license to anyone that wants to pay for it.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    2. Re:MySQL webpage is full of bullshit by Anonymous Coward · · Score: 0

      I'm also battling with a decision: I'm building up a content management system (NOT open source), which would come in a couple of editions - one of them totally free, and not even very crippled. If I'm gonna have only the free edition available for the first 6 months, I'm in trouble.

      The MySQL page says (indirectly) that I have to pay $500/year in case my CMS uses just one MySQL-specific SQL command - i.e. specifically utilizes MySQL.

      I don't want to include any MySQL drivers in my CMS package. But still, if users _can_ download MySQL drivers and tailor the CMS to work with my CMS, *I*'ll have to buy a commercial license, even if my software is free.

      Should I just leave editable fields in the CMS GUI, so that users may enter any MySQL specific command scripts for certain database operations, copying them from the CMS forum posts? This way the actual product wouldn't support MySQL out-of-the-box.

      Not to mention that all people who download the CMS and use it for free, have to pay $500 a year for MySQL as well. Since _Microsoft_ MSDE2000A / SQL Server 2005 Express Edition and PostgreSQL are totally free, should I just drop any MySQL support from the free version of the software (since I don't know if the commercial version will sell a single copy ever :D ). I'm not bathing in money currently, so this is an important issue.

      -Ari Fernelius,
        Helsinki, Finland

  46. I move all my projects from MySQL to PostgreSQL by wikinerd · · Score: 0

    I am outraged with MySQL AB after I learnt they do business with SCO. As a result, I plan to migrate my website's databases from MySQL 4.1 to PostgreSQL 8.0/8.1, and I concentrate on PostgreSQL support in my software projects. MySQL is wrong if they believe they can have the support of the free/libre open-source software communities and have relations with SCO at the same time. PostgreSQL is an advanced object-relational database management system which offers great programmability through its native programming language PL/PgSQL, as well as through several other language bindings (for PHP, Java, Perl, even sh). PostgreSQL is BSD-licensed and supported by a community of free software developers, while MySQL is supported by a corporation, MySQL AB, which sells proprietary licenses.

    1. Re:I move all my projects from MySQL to PostgreSQL by Anonymous Coward · · Score: 0

      last time i recalled apache was part of SCO's UNIX as well.. Gonna ditch that one too? :) asshole..

    2. Re:I move all my projects from MySQL to PostgreSQL by ToxicBanjo · · Score: 1

      Holy bias and overreaction Batman!
      Did you contribute at all to the development of MySQL?
      I mean really, how dare you blast a company for wanting to make some money on commercial versions of its own software (which they still provide sourcecode to freely), OSS or not. SCO licensed MySQL just like a thousand other companies have and just because SCO has kicked the Linux community in the teeth with its bullshit claims doesn't mean that MySQL should be lumped in with them!
      By your reasoning if I start an OSS cycle and after years of dev decide to start a company with the key developers for hopefully making a few bucks and one of my 10,000+ customers is SCO you'll boycot our work? Extremely petty in my eyes buddy!
      I've not used PG but from what I've read it seems a strong contender, but even if they were backed by M$ I wouldn't bad-mouth them like you have done with MySQL. You're outraged, well so what, I'm offended by your ignorance!

      --
      There are only 10 kinds of people in the world. Those that understand binary and those that don't.
    3. Re:I move all my projects from MySQL to PostgreSQL by Anonymous Coward · · Score: 0

      SCO are a malicious, immoral and damaging
      parasite. Denying their destructive intent and
      the severity of the damage they've inflicted on
      the industry, innovation and open source is
      just wishful thinking. They've contributed
      massively to the continuing perversion of
      intellectual property law, and indirectly
      helped to change perceptions of barratry
      and theft of ideas to the point that
      those have been transformed from
      reprehensible criminal behavior into
      standard corporate actions. While Sarbanes
      Oxley is futilely attempting to shore
      up corporate governance on the one hand,
      SCO has helped to destroy one of the last
      refuges in industry where the greater good
      long prevailed.

      Anyone that does business with SCO is complicit.

      I posted this to the MySQL forums:

      This is an outrage. SCO have done nothing
      worthwhile but sustain a campaign of maliciously
      damaging open source and Linux in the past 3
      years. And you guys are teaming up with the
      worst parasites to ever infest the computer
      industry? You're out of your minds.

  47. Re:Minor Detail by burnin1965 · · Score: 1

    Minor detail indeed.

    I assume you are talking about the psql client. Note that this is a client and not PostgreSQL. There are other clients you can use with a PostgreSQL server some of which are GUIs. phpPgAdmin is one of them:

    http://phppgadmin.sourceforge.net/

    burnin

  48. good one by qda · · Score: 3, Funny

    "Since then both databases have evolved to wherever they are today." Thank you for that profound insight..

    1. Re:good one by Anne+Thwacks · · Score: 1

      Well at least he got that one right!

      --
      Sent from my ASR33 using ASCII
    2. Re:good one by Tellalian · · Score: 1

      Don't encourage him. It's obvious these DBs were created through intelligent design!

  49. Re:The most interesting part of the old article... by tzanger · · Score: 3, Funny

    As are you. :-p

  50. Re:The most interesting part of the old article... by Paul+Crowley · · Score: 2, Funny

    How do you think I feel?

  51. Two things - technology and support by Pecisk · · Score: 1

    PostgreSQL is best opensource database for serious, enterprise size applications, so MySQL is no match here. However, PostgreSQL had/still has serious issues about support - MySQL is much better supported in various apps, software, systems, etc. For example, I do programming now in Java/WebObjects, and I had problems to go with Postgres as database, using EnterpriseObjects. For now I stick with MySQL and still hope I can migrate to PostgreSQL later.

    However, MySQL is superior is small and medium PHP based sites, because it is "good enough". They also working constantly on bringing new features and bug fixes, so for sake of both them I can say - competition is good in this case.

    --
    user@ubuntubox:~$ stfu This server is going down for shutdown NOW!
    1. Re:Two things - technology and support by timeTumbler · · Score: 1

      PostgreSQL's support issues vs. MySQL's are simply because MySQL is a company, while PostgreSQL is a community. The good news, though, is that there are some very capable commercial support organizations, including (in alphabetical order), http://www.commandprompt.com/, http://www.enterprisedb.com/, and http://www.pervasive.com/.

  52. Re:The most interesting part of the old article... by billysara · · Score: 3, Funny

    Where-as you're a long-timer? ;-)

  53. Sco Partners With MySQL AB by burnin1965 · · Score: 4, Informative

    Get your facts straight coward:

    "As part of the agreement, the companies will work together on a range of joint marketing, sales, training, business development and support programs"

    http://www.mysql.com/news-and-events/news/article_ 948.html

    burnin

  54. Which version are you using? by panurge · · Score: 1

    Version 4.1 throws all the data truncation warnings you could wish for. Someone else has already commented on the use of NULL rather than NOT IN. I don't think there is any particular merit or demerit in different syntactical variations between database engines, other than being a pain in the butt to port. I just try and use MySQL where appropriate, and for some things it's very appropriate. It's just that, if you have to work with several different engines, you can get more error prone owing to minor variations. It's also often erroneous to compare databases on the basis of problems with certain queries, because the optimisations might be such that a variant query would give the reverse result. It's better (IMHO) to stick with what you got, and use indexing or temporary tables intelligently to optimise complex queries.

    --
    Panurge has posted for the last time. Thanks for the positive moderations.
  55. Postgres: Lazy Replication Rules the Day by LordMyren · · Score: 1

    PostgreSQL will hopefully some day have Postgres-R integrated into it; a distributed lazy replication update scheme. (Multicast to ensure ordered group communication to derive seriazability, v. 2pc) This should allow it to scale out to a couple hundred if not couple thousand boxen quite easily with rather stunning performance.

    Some more info here

    Way of the future kiddies, look sharp.
    Myren

    1. Re:Postgres: Lazy Replication Rules the Day by Anonymous Coward · · Score: 0
      boxen

      Please stop using this word.

  56. +1 funny by Anonymous Coward · · Score: 0

    consider this a mod point i'd have given had I had one

  57. Message bearer by burnin1965 · · Score: 4, Insightful

    True, but then again it also depends on who is bearing the news as well.

    Considering you are nobody your press release wont really mean much. And I would also go so far as to say The SCO Group are nobody as well and their press releases don't mean much.

    However, if Kroger made a big deal about your toothpaste purchase in the news section of their website it may actual be something to consider.

    When SCO made their press release I didn't pay much attention because I have become very skeptical of any messages that come out of their organization. But it is disconcerting when MySQL considers the partnership to be news worthy as well:

    http://www.mysql.com/news-and-events/news/article_ 948.html

    burnin

    1. Re:Message bearer by bernywork · · Score: 1

      Pardon my ignorance, but WHO is Kroger?

      I presume this means it's time to use that little box in the top right hand corner of my screen with the blue G beside it?

      --
      Curiosity was framed; ignorance killed the cat. -- Author unknown
    2. Re:Message bearer by Quarters · · Score: 1

      Kroger is a chain of grocery stores in the US.

    3. Re:Message bearer by Anonymous Coward · · Score: 0

      When SCO made their press release I didn't pay much attention because I have become very skeptical of any messages that come out of their organization. But it is disconcerting when MySQL considers the partnership to be news worthy as well:

      Yes, that's a press release, alright. Pretty much exactly like the parent was saying. Look at the other press releases on the site. I challenge you to find ONE that is actually newsworthy. That's the nature of press releases. You write one anytime you do anything that anyone might potentially write a story about or post to Slashdot. Not only when you consider it a big deal.

      There was a story a few months ago about a company issuing a press release because the CEO got a Gmail invite and thought that he was one of a select few.

    4. Re:Message bearer by Anonymous Coward · · Score: 0

      From their site:

      Headquartered in Cincinnati, Ohio, Kroger operates supermarkets under the banners Kroger, Fred Meyer, Ralphs, Smith's, King Soopers, Dillon, Fry's, City Market, Food 4 Less and Quality Food Centers.

      From my experience, Kroger is mostly an East-Coast name, while they use Ralphs and Food 4 Less on the West Coast.

  58. Forget Interbase/Firebird by Just+Some+Guy · · Score: 2, Informative
    The last time I used Firebird on a major project, it sucked so badly that I wrote a program to convert its databases to PostgreSQL (even if they contained unreadable rows that kept the normal utilities from working). Unless Firebird's undergone the same kind of rewrite that Netscape did while becoming Mozilla, I wouldn't touch it with a ten-foot pole.

    To each his own, of course, and the situation may indeed have improved. I don't see any clear advantage that it has over PostgreSQL, though, and I doubt it'll ever gain much momentum.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Forget Interbase/Firebird by Vile+Slime · · Score: 1

      Dude,

      Read your reasons for not using Firebird and quite frankly I was not impressed:

      > First off, you have to specify the exact path of the database file on the remote machine. That is, you can't connect to database FOO on host BAR - you have to connect to /var/databases/FOO.gdb. Heaven help you if you ever change your directory layout and run multiple applications against the same server.

      Huh? Haven't you ever heard of the "ln" command or environment variables or configuration files are any other of a multitude of ways to pass path information along to a program?

      > The command line client, isql, is awful. It has no supports whatsoever for readline-esque features such as command history, or even deleting the previous character. Standard procedure is to type queries in a text editor and then paste them into the isql shell.

      I'm not sure what type of terminal program you use but frankly mine handles all that sort of stuff just fine for me. Why should ISQL be tasked with what is clearly a terminal program's tasks?

      > A nice feature we discovered: suspending the isql client with ^Z will lock the server until you foreground the client process again. We were NOT amused to discover this: "HEY! THE $#!*(@# SERVER IS FROZEN AGAIN! WTF?!?!?"

      So, now just exactly how many times a day are you typing ^Z? Perhaps you should consider typing lessons.

      > We've experienced several (!!!) cases of database corruption where we were completely unable to recover any data inserted into a database after that point.

      Based upon your previous displays of skill should this complaint even warrant a response?

      If you are aware of a database corruption, which is what your statement suggests, why are you still trying to insert data into it?

      > AFAIK, no equivalent of mysqldump exists for Interbase. At least, I was unable to find one when I critically needed it (see previous point). I eventually hacked one up in Perl that works OK for our needs, but that still rather surprised me. AFAIK (yes, twice in one post! :), you can only back up the binary database to another binary file. BTW, my boss gave me permission to release my backup tool under the GPL

      The last time I looked the database actually ships with a dump utility which includes the full source code. Did you even bother to look in the examples directory. Dynfull.e exists in that directory and you should probably take a look at it.

      --
      ---- Go ahead, mod me down, I'll just post it again and you lose your mod points.
    2. Re:Forget Interbase/Firebird by Unordained · · Score: 4, Interesting

      I had mod points, and as a Firebird user, I was going to mod up the grandparent -- Firebird is very often ignored despite a host of positive features.

      But as you had a bad experience, and you link to your problem list, I thought I'd respond instead. Better to answer questions than just mod up friendlies.

      - Database path: Yes, firebird supports aliases. Our app doesn't use them, but they're there.
      - ISQL: I hear Oracle's SQL*Plus isn't much better. However, I use isql every once in a while, and I have command-history, backspacing, etc. available to me. From what I hear, it's more of a function of the shell you use (around isql) than isql itself. If you set up your environment properly, isql and its ilk automatically get command-history. (That's what I'm told, note. Anyone who can explain this is welcome to. I'm not a sysadmin.)
      - Never seen it freeze.
      - Corruption: we've had exactly one database issue, where it seems a backup/restore script ran in the middle of the day, restoring the database to its state from 4 hours earlier. In 4 years of use, with somewhere around 60 users in a medical clinic/insurance/billing environment, we've had no corruption. Using forced-writes is important, however. The careful-write strategy is really, really reliable, but it still can't protect you from faulty hard drives or operating systems that refuse to send data to the disk in the order requested (cf. Windows). M1 Abrams tank story, anyone?
      - IBDataPump and other third-party tools exist for some of the other features you're interested in. I'm not sure I know how even I feel about some things only being offered by third-parties. Oracle's tools suck enough people buy other products ... heck, why bother? Just develop a good RDBMS with a good API, and let others fight it out? (That's an open question.)

      Feature-wise, and maybe target-audience-wise, Firebird and PostgreSQL are similar. Stored procedures, triggers, check constraints, MVCC (Postgresql seems to have copied MVCC off of Interbase, note), savepoints/nested (but not concurrent) sub-transactions, etc. It lacks a lot of the UDT (type) features of PostgreSQL (you can define domains, but not entirely new datatypes) -- note that Postgres was specifically designed with UDT's in mind. Firebird does support UDF (function) features though, and you can get some of the same flexibility that way if you're masochistic (save data in octet or blob fields and use UDF's to interpret the data). Pg also has neat SP language support, letting you write your SPs in a variety of languages -- Fb doesn't. Unlike Postgres, it's really easy to install, particularly on windows (that was a problem for Pg up until semi-recently) and it practically maintains itself. (Happily, the Pg team eventually got their vacuum, equivalent to Fb's sweep, to not take down the database, so Pg can now run 24/7 too.) Fyracle has been trying to make Firebird more Oracle-like in SP language support and some of Oracle's more interesting query abilities (CONNECT BY). Yes, I occasionally get feature-lust and look at other DBMS's. I don't need Oracle features, but Pg features would sometimes be nice. But I don't use Pg, so I don't know what annoyances it has that Pg users would be thinking about. Maybe it's all-around better, I don't know.

      Both are really good projects, with their own strengths. I would say comparing Firebird and PostgreSQL is a much fairer comparison than Pg and MySQL or MySQL and Fb. Pg and Fb are more of a 'niche' comparison. MySQL has nowhere near the features of either of them, isn't nearly as safe, and just isn't designed with the same requirements in mind.

      Every single experience I've had with MySQL has been one of "fixing" stuff for a MySQL user who just couldn't get things to work. Joins that wouldn't work (but should have), joins that were slow, data being eaten ... And then there's reliability ... ugh. MySQL just wasn't designed with data integrity in mind, while Pg and Fb were. "Foreign key constraints can be

    3. Re:Forget Interbase/Firebird by fimbulvetr · · Score: 1

      Wow. All I can say is wow. Did you even recognize this guy's problems?

      <i>Huh? Haven't you ever heard of the "ln" command or environment variables or configuration files are any other of a multitude of ways to pass path information along to a program?</i>

      Time out. The guy was talking about how obtuse it is to have to specify the exact location of the database. You mentioned using ln. Any sysadmin worth their salt knows that ln, in almost all cases, is bad. In almost all of the cases where you would use ln, you do it as a kludge to hard fix something in where it should be dynamic. Environment variables are just as bad. They're just more work and headache when a better solution already exists. If you think they are just fine, I encourage you to work with DJB's software(qmail, djbdns, etc.), Java, and Oracle and see how long you stay sane.
      Configuration files - I'll give you that - but how would that help him in this situation?

      <i>I'm not sure what type of terminal program you use but frankly mine handles all that sort of stuff just fine for me. Why should ISQL be tasked with what is clearly a terminal program's tasks?</i>

      Whoaaaa! He's talking about ISQL not supporting a backspace. Do you realize how much of a pain in the ass that is? You told him yours worked, but you didn't say what you were using... He has to use a seperate text editor to write his sql, don't you see a problem in that? I think that a working backspace key is not an unreasonable thing. Readline support is an *extremely* nice thing to have, especially in an sql client. It lets you do things like:

      $ mysql -uuser -ppassword < stuff.sql
      $ echo "select * from users;" | mysql -uuser -ppassword

      Instead of ugly kludges like:

      $ cat sqlplus user/password@database << EOF
      select * from users;
      EOF

      <i>
      So, now just exactly how many times a day are you typing ^Z? Perhaps you should consider typing lessons.</i>

      Umm. Well, see, in UNIX, they have this whole notion of being able to "suspend" processes. ctrl-z Does this on most modern unices. Try it, it's pretty cool. Run a process. Hit ctrl-z. It's now suspended. Type "fg" to get it back into the "foreground" or "bg" to resume it into the "background". Most of us also have a good idea of client/server seperation. If a client disconnects/suspends/terminates, the server should not be affected.

      HAND

    4. Re:Forget Interbase/Firebird by Vile+Slime · · Score: 1

      > Wow. All I can say is wow. Did you even recognize this guy's problems?

      Yes I did, and from what I saw he was just plain lazy. Except for the ctrl-z issue, I saw a person who obviously never took the time to find out what Firebird has or has not.

      Most of the functionality he "desired" is available.

      Sure, some of my alternatives offered were not the greatest, but this guy went to a lot of trouble to write up his experiences with what he considers to be a bad database system when mostly it's actually just the default interactive client program with which he finds fault.

      He could have spent that energy adding some of the functionality he feels is missing to the stupid little ISQL program rather than bitching about it.

      As far as what you write I'll respond:

      > The guy was talking about how obtuse it is to have to specify the exact location of the database.

      Well, regardless of how it's done, it has to be specified somewhere. And in my situation my client (a person) might have 500 separate databases on a single server machine. Don't blame me for that boneheaded design flaw. So it's actually kinda nice being able to specify exactly which database to use in a concise manner.

      >>I'm not sure what type of terminal program you use but frankly mine handles all that sort of stuff just fine for me. Why should ISQL be tasked with what is clearly a terminal program's tasks?

      > Whoaaaa! He's talking about ISQL not supporting a backspace.

      I stand by what I said. For goodness sakes even MS-DOS supports backspace while in an ISQL session.

      I regularly use XTerm, did he even bother to try a default setup of XTerm? I doubt it.

      > Readline support is an *extremely* nice thing to have, especially in an sql client

      Once again, he didn't bother to do his homework. He just whined when the ISQL client didn't perform exactly like somebody else's.

      > $ mysql -uuser -ppassword < stuff.sql

      Ok, so what's that got to over:

      $ isql.exe -u SYSDBA -p masterkey -i stuff.sql database.gdb

      Other than specifying a particular database they are functionaly equal. And for those who need to ability to have several simultaneous databases running on a particular server specifying the DB might not be a bad thing.

      > $ echo "select * from users;" | mysql -uuser -ppassword

      I had mentioned the dynfull.e source code (I believe this code is probably the code for ISQL as well, I've never bothered to investigate) which with just a tiny amount of tweaking results in:

      $ dynfull -u SYSDBA -p masterkey database.gdb "select * from users ;"

      So what's the problem with that. It spits the results out to the console. I assume your MySQL does as well.

      Same answer, different format.

      Per the ctrl-z issue, I would once again say, don't trash the database itself over a probable client issue. But since neither I nor you apparently know what is going on in this case I'll leave it at that.

      Have a great day!

      --
      ---- Go ahead, mod me down, I'll just post it again and you lose your mod points.
    5. Re:Forget Interbase/Firebird by Just+Some+Guy · · Score: 1
      Note that I wrote my critique about Interbase rather than Firebird, and posted it to my wiki in November 2001. As you read, it was a repost of an even earlier Slashdot post. Since Firebird only forked from Interbase in 2000, it's reasonable to assume that the two were still mostly identical at that point.

      Now to present. See where I wrote this part?

      Unless Firebird's undergone the same kind of rewrite that Netscape did while becoming Mozilla, I wouldn't touch it with a ten-foot pole.

      That means that Interbase/Firebird was awful at the time I wrote my criticism, but that I don't know whether they've since fixed the I saw. Follow? OK. So you're basically saying that I'm an idiot because the some of the problems I had four years ago don't exist in the version you used last week.

      And yeah, I used it in an xterm, although the terminal has exactly zero to do with isql's built-in line editor.

      --
      Dewey, what part of this looks like authorities should be involved?
  59. One thing to consider - collations and Unicode sup by melted · · Score: 4, Informative

    One thing to consider - collations and Unicode support. Believe it or not, folks, Postgres does NOT support case-insensitive string comparisons. Or, more exactly it does, but you end up doing full table scan and converting everything into upper/lowercase, which is not an option on all but the smallest of the datasets. And even converting to upper/lowercase is a BIG problem for PostgreSQL, because it's UNICODE support is quite poor. So if your project has even remote possibility of using non-English textual data in lookups, steer clear of PostgreSQL.

    There's a discussion about including support for IBM ICU, but as of right now there's no proper collations/unicode support in PgSQL, aside from storing character data in UTF-8.

    MySQL is much better in this regard.

  60. The scoreboard by ttfkam · · Score: 4, Informative

    http://www.huihoo.com/postgresql/mysql-vs-pgsql.ht ml

    Changes/corrections since that study was made:

    PostgreSQL now natively supports BLOBs directly in tables (bytea type) as opposed to using oid references.

    PostgreSQL has always had "better than row level" locking, Multi-Version Concurrency Control.

    PostgreSQL has added Java and Ruby to its list of stored procedure languages.

    ----------------

    Now, here's the caveat. MySQL 5.0 is still marked as a "development release (use this for previewing and testing new features)" so I didn't include it in the above. If we include MySQL 5.0, we must also include PostgreSQL 8.1, currently in beta.

    MySQL 5.0 adds views, stored procedures, triggers, cursors, the bit data type, up to 65K varchar fields, two new storage engines (federated and archive), and a strict mode.

    PostgreSQL 8.1 adds two-phase commits, a role system, shared row level locks using SELECT, and many speed improvements.

    The strict mode in MySQL is most exciting to me. I always bought the argument that MySQL could have fewer features in exchange for greater speed. But there is no excuse (in my opinon of course) to accept random strings into numeric fields and other such contrivances (MySQL gotchas). Data integrity in a database should not be an optional feature.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:The scoreboard by puppetman · · Score: 1

      For MySQL, don't forget sub-selects in 4.1. Unfort, the feature is almost useless, as indexes aren't used in the parent query.

      MySQL also only uses one-index-per-table-per-query, which is kind of nasty.

      On the flip side, MySQL replication is a breeze to use (compared to commercial-only replication (or SLONY - an add on) in Postgres).

      Postgres optimization (last I looked, in 8) had gotten much better than it was in 7.x, but there's still way more fuzziness in Postgres (more like Oracle).

      I also like the tablespace-per-table that InnoDB offers, and in general the way InnoDB handles tablespaces and backups.

      The MySQL bookshelf is also much fuller than the Postgres bookshelf.

      Both are awesome projects, but MySQL seemed a bit cleaner, with a feature-set that was more appropriate to what we needed.

    2. Re:The scoreboard by Sxooter · · Score: 1

      Just FYI, on the mysql side, setup a replicated pair, initiate a hundred or so simultaneous transactions, then pull the plug on both machines a couple seconds apart.

      Restart the database. you will likely need to restore from backup now.

      Do the same to a slony pair running postgresql, and they will both be operational, and at worst you might have to reinitiate replication. something slony can do "on the fly" but MySQL requires the whole cluster be shut down.

      For serious enterprise use, MySQL's replication is not really usable.

      Just saying, I don't really hate MySQL, just am amazed how many people think their replication is good, when in fact, it's a pretty mediocre system.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
    3. Re:The scoreboard by Anonymous Coward · · Score: 0

      MySQL 5.0 adds views

      The 1980s called. They want thier new DBMS back.

    4. Re:The scoreboard by Anonymous Coward · · Score: 0

      "SLONY - an add on" - Different needs need different replication. The replication should be a add on.

      Slony-I is made by Jan Weick. He is one of the main developers of PostgreSQL. Slony-I uses the core technology of PostgreSQL. Is it a real integrated solution that you can choose to add on.

      http://www.onlamp.com/pub/a/onlamp/2004/11/18/slon y.html
      http://www.onlamp.com/pub/a/onlamp/2005/03/17/slon y_changes.html

      Slony-I is not a multimaster replication system. They are working on Slony-II that will have more features.
      http://slony2.org/

    5. Re:The scoreboard by MemoryDragon · · Score: 1

      That does not help if the feature implementation is junk...

  61. Bad move MySQL by HangingChad · · Score: 1
    Partnering with SCO, in any capacity, lends them an aura of respectability they don't deserve.

    Anything that's not already deployed is going to get a chance to see how PostgreSQL and Firebird perform under similar circumstances.

    Probably won't make any difference in MySQL's bottom line but I don't care. You don't partner with SCO.

    --
    That's our life, the big wheel of shit. - The Fat Man, Blue Tango Salvage
    1. Re:Bad move MySQL by Anonymous Coward · · Score: 0

      SCO asked MySQL for their commercial version to be included in their commercial distro, the original free version has been in SCO's releases for years, JUST LIKE ANY OTHER FREE DISTRO!

  62. It really doesn't matter. by MikeFM · · Score: 2, Insightful

    I write my db code to abstract all my queries away from the rest of my program. You access the queries I've writen via a XML-RPC interface. That way if you need to switch db all you have to do is rewrite your queries and none of your app code needs to change.

    Issues like speed, resource usage, sql features, etc really don't matter very much as for 99% of db applications it just makes no difference at all and for the 1% it does then you'd better hire someone that knows the differences in dbs without having to look it up on Slashdot.

    Most of the time it is better just to use the basics. I see people doing EVERYTHING in the db. Stored procedures, adding 1 + 1, massice complicated joins that'd be easy to do in anything other than SQL, etc. A big mistake. The db is the single hardest portion of your application server to replicate and load balance (even with the db supporting things like clustering). It's better to write your glue code in a normal language and just abstract that glue code as a sepperate service and use the db just for storing and retrieving data.

    --
    At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    1. Re:It really doesn't matter. by tzanger · · Score: 5, Informative

      I disagree.

      Putting everything (by everything I mean business logic) in the DB is the only sane way to keep your data consistent across multiple access methods. You simply can't thow data at a DB and then try to code and maintain consistent business logic in a half dozen client apps. You might be able to get away with a shared client access lib but even that can get messy.

      Let's face it: Your data's in the DB. Why pull it all into the application to work on some small subset? Do all the queries and joins and clauses and increments in the database. The DB knows best where the data is and how you're going to be tinkering with it (so long as you give it sufficent hints), so it's the only sane method to access your data in a logical fashion. That's precisely why all these scripting languages and language interfaces exist.

      I too use XML-RPC and SOAP (moreso the latter it seems, as XML-RPC is a little too light IMO) to access my data, but you can bet your sweet bippy I'm having the DB do as much as possible in order to transfer as little data as possible across my app-db link.

    2. Re:It really doesn't matter. by MPHellwig · · Score: 1

      You almost make it sound like the db is designed to handle vast amount of data! Surely that cannot be true? :-)

    3. Re:It really doesn't matter. by llefler · · Score: 1

      Putting everything (by everything I mean business logic) in the DB is the only sane way to keep your data consistent across multiple access methods.

      This is certainly true in an environment where there are several developers working on separate projects accessing the same database.

      But something I have run into over the last few years with large enterprise applications is that some closed source systems put database rules/constraints in code to lock you into their suite. In many cases you can run queries against the data in the SQL server, but if you wanted to dump your data, for instance to migrate to a new system, you won't know the constraints and triggers to export it properly. And if the database is sufficiently normallized, those details are incredibly important.

      --
      It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
    4. Re:It really doesn't matter. by MikeFM · · Score: 1

      As long as you code a single frontend to the db that is accessable from all apps via a standard emthod (like XML-RPC or SOAP) there is no reason to put that logic in the db. Again doing so is bad because it steals performance from the DB which is harder to replicate across multiple machines than some service written in Python, Java, or whatever. Also it's not a very good idea from a security point of view to allow direct access to your DB for every random app and user you might have on your network. Going through a proxy layer screens out the majority of paths an attack could come through.

      Transfering data between machines shouldn't be that big a task as gigabit (or better) ethernet is affordable and with some planning you can implement caching of many queries. (Example, it'd be stupid of /. to run the query that checks what stories are newest for every single hit from every single user. Caching would let them only rerun that query every few minutes.) Doing a lot of unneeded processing in the db will slow things down more than transfering a little more data.

      But of course it just depends exactly what you're doing. I've used stored procedures, big ass table joins, and all the other stuff I suggest not doing because sometimes those are the best solutions. :)

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    5. Re:It really doesn't matter. by musicmaker · · Score: 3, Insightful

      An classic example of a MySQL Idiot. You put things in the database so that they are _atomic_. You want things to either compmletely succeed or completely fail. Most application layers cannot do this successfully, and you end up with corrupt data.

      And go ahead, tell my that having corupt data doesn't matter. Then I'll throw sarbanes-oxley at you and laugh.

      --
      Everyone is living in a personal delusion, just some are more delusional than others.
    6. Re:It really doesn't matter. by MikeFM · · Score: 1

      Maybe if you're a db admin instead of a programmer. If you write the application layer then simply make it do what you need. Duh.

      If you want things to be atomic then turn on transactions or simply design your program better.

      I handle all kinds of db stuff with millions of records and all kinds of interesting interactions and funny enough I never get corrupt data. You rely to much on the db. You probably code in some lame language like Visual Basic too.

      --
      At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    7. Re:It really doesn't matter. by Limecron · · Score: 1

      >> As long as you code a single frontend to the db that is accessable from all apps via a standard emthod (like XML-RPC or SOAP) there is no reason to put that logic in the db. Again doing so is bad because it steals performance from the DB which is harder to replicate across multiple machines than some service written in Python, Java, or whatever. Also it's not a very good idea from a security point of view to allow direct access to your DB for every random app and user you might have on your network. Going through a proxy layer screens out the majority of paths an attack could come through.

      Wouldn't the point of doing things in the database be adding a layer of abstraction between the client and the database? If you've properly coded the database end, you don't have to worry about what a client might do. Doing the processing client side is INSECURE, as a malicious person can much more easily discover what the client is doing database wise using a sniffer or debugger. Also a milicious client could be crafted to fiddle with a poorly implemented database end.

      >> Transfering data between machines shouldn't be that big a task as gigabit (or better) ethernet is affordable and with some planning you can implement caching of many queries. (Example, it'd be stupid of /. to run the query that checks what stories are newest for every single hit from every single user. Caching would let them only rerun that query every few minutes.) Doing a lot of unneeded processing in the db will slow things down more than transfering a little more data.

      First of all, your example doesn't apply to your initial statement. Regarding the example, any good database would cache a query that was executed 1000s of times in a row, so it shouldn't really be a concern.

      More importantly, perhaps you've heard of something called latency?

      You are saying that I can some how improve the performance of a database by sending my data to the client (of which I can't necessarily be certain of its speed, reliability or trustworthyness), process said data, and then have them send it back?

      We're talking thousands to millions of times slower here, unless you have a "solution" to that pesky speed of light problem.

    8. Re:It really doesn't matter. by Anonymous Coward · · Score: 0

      Ah, another MySQL idiot speaks. "Do it all in code! Data integrity doesn't matter, dude. I've never touched an enterprise database in my life . I just handle vague things like 'all kinds of db stuff' and 'all kinds of interesting interactions.' By the way, here's my crappy tutorial site complete with amateur-level PHP 'clean URLs'."

    9. Re:It really doesn't matter. by hey! · · Score: 1

      Terry Pratchett once said, "Rule are there to make you think before you break them."

      You can't make design decisions by a broad rule like "business rules belong in the database tier" or "business rules belong in the application tier". You have to understand the issues for this database, this application and this client.

      I would say this: anything which relates to the consistency of the data probably should be considered for the database tier. It's the only way to make positively sure that the data is consistent. Stuff which relates to performing a specific task very probably belongs in the application tier. But I wouldn't make a hard and fast rule. The most important thing is to know how your role as a software developer changes the maintenance implication of this decision.

      But you do have to consider things like maintenance and performance.

      One important point is that [C/F]OTS application developer's viewpoint is different from an enterprise viewpoint.

      An app developer is worried about porting his application to multiple database platforms. If he develops mosly in Oracle, and he runs across a MSSQL only shop, he's very happy that all that logic was in database independent application code. That way he only has to do it once. To him, the application is the constant in a sea of changing databases.

      An enterprise database manager wants his database to support multiple applications. This in fact is a reasonably definition of a database. So, if such and such a rule must hold when somebody is doing an update through a two tier PowerBuilder app, and it should also hold for the new servlet based web interface,and it should hold for the Access database Joe Blow in engineering hacked together for his group, he's very glad that he put that rule in the database tier. That way he only has to do it once. For him, the database is the one constant and a sea of changing applications.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    10. Re:It really doesn't matter. by StrawberryFrog · · Score: 1

      If you want things to be atomic then turn on transactions or simply design your program better.

      Uh, that porblem has already been solved. By relational database management systems. It's a far from trivial problem, so why reinvent the wheel badly? No Amount of "better design" will keep the data consistent in the event of an unexpected power failure, not without boatloads of code for journals and transactions and the like. A good DBMS will, because it has already done that code.

      I handle all kinds of db stuff with millions of records and all kinds of interesting interactions and funny enough I never get corrupt data.

      "It hasn't happend to me, therefor it is impossible"? But it is possible, and in some systems that's just not acceptable.

      You probably code in some lame language like Visual Basic too.

      An ad-hominem attack. Grow up.

      --

      My Karma: ran over your Dogma
      StrawberryFrog

    11. Re:It really doesn't matter. by Luyseyal · · Score: 1

      Really, this argument boils down to thin client vs thick client; and it greatly depends on what you're doing as to which is better for you.

      I like this comment.

      HTH,
      -l

      --
      Help cure AIDS, cancer, and more. Donate your unused computer time to worldcommunitygrid.org. Join Team Slashdot!
  63. Sorry... by biglig2 · · Score: 3, Funny

    ...does this count as a dupe? Or is there a statute of limitations thing going on here?

    --
    ~~~~~ BigLig2? You mean there's another one of me?
  64. Re:One thing to consider - collations and Unicode by llefler · · Score: 1

    One thing I have always hated about Postgres is how it handles case sensitivity. If you're going to be case sensitive, compare it to exactly what I gave you. The user shouldn't have to take extra steps to maintain case. Even better, look at MS-SQL. When you turn off case sensitivity, it actually turns it off.

    Or at the very least, if you're going to upper/lower case the SQL statement, do the same thing with the schema and data.

    --
    It is amazing what you can accomplish if you do not care who gets the credit. -- Harry Truman
  65. Re:Minor Detail by Waffle+Iron · · Score: 1
    One thing I noticed when using PostgreSQL in my databases class was that someone mentioned that MySQL is the only dbms that actually lets you exit the application when you type "exit". I believe in Postgres, you have to type "\q".

    For both I just use Alt+Ctl+Escape and then click. But I only do it that way because I think that goth scull-and-crossbones cursor is so totally cool.

  66. MOD PARENT TROLL by Anonymous Coward · · Score: 0

    OMFG. Who gives the slightest crap about how the included command line client behaves? Even further, making a case that MySQL is somehow more "user-friendly" from that is quite an accomplishment. Idiot.

  67. who to what? by cxreg · · Score: 2, Funny

    Comparing MySQL and PostgreSQL 2

    Is that the only way that MySQL can look favorable? By comparing to version 2 of Postgres?

    fnord

  68. tpc.org by Anonymous Coward · · Score: 0

    this is where you usualy go for perfomrance benchmarks on databases

    http://tpc.org/

    You will notice that neither mysql or postgres are in there. Not sure why. Oracle RAC on Linux is showing up prominately...

    1. Re:tpc.org by WindBourne · · Score: 1

      Because companies have to pay for this. They cost a LOT of money to do these.

      --
      I prefer the "u" in honour as it seems to be missing these days.
  69. A small thread from the past by leoboiko · · Score: 2, Informative

    I once asked on slashdot about why people use MySQL and how does it compares to PostGreSQL. Got a bunch of interesting responses.

    --
    Prescriptive grammar:linguistics :: alchemy:chemistry. Stop being a nazi and learn some science.
  70. I must disagree. by Stu+Charlton · · Score: 2, Insightful

    MySQL is much easier to manage. I don't know anybody who runs a heavily loaded Oracle server in production without spending significant $$$ on DBAs and commercial tools. I feel quite comfortable doing this with MySQL.

    In other words, you're not actually running an enterprise-scale software system (which would require significant $$$, professional DBAs, and tools no matter WHAT database product you're using). You're running a single-man shop.

    This is a great troll -- all of your points are sufficiently broad as to be impossible to prove or disprove either way. They're all obvious personal opinions but phrased as facts. Who's to say that any arbitrary enterprise software system can be satisfied with MySQL's features, or another's isn't? Or that you find MySQL's administration tools better than Oracle's (which I find to be therichest out there). Or that any "gotchas" you've had with BLOBs and CLOBs seem purely anecdotal.

    The number of features that Oracle has over MySQL is simply staggering, as is its ability to robustly handle enormous concurrent loads. Its clustering support, backup & recovery abilities, and query optimizer are second-to-none. I'm glad you've found a cheap and better alternative, but I hardly think it's applicable to all.

    --
    -Stu
    1. Re:I must disagree. by Anonymous Coward · · Score: 0

      Try telling the CEO of a company that the software system his company makes over $10M an hour running which absolutely CANNOT go down, ever, is going to run on a OSS database without remote replication, local HA and DR to minimize downtime. Also, try to get a **real** vendor to produce a package running this type of mission critical code on an OSS database engine.

      It might be fine for college apps and mom & pop. This type of design doesn't fly in the real world where real money is on the line. Oh, and I bet I make a bunch more money keeping this commercial system up, without any issues than you do running MySQL.

      The cost of the software license directly corresponds to the available money to pay for real talented supporters.

      Call me a sellout. I have a wonderful life, don't have to work anymore time than I want (beyond 40 hours a week) and can take as many vacations a year as I feel. Not a bad life. Oh, and I make about double what the average employee makes where I do consulting. It doesn't take long to do the math and see cheap/free software leads to companies thinking that the people running the systems are cheap too.

      BTW, my pager shuts off at 7pm and isn't on all weekend. Monitoring systems is someone elses job.

      I'm a proud capitalist.

  71. Re:The most interesting part of the old article... by EvilMonkeySlayer · · Score: 1

    Ohm...

    All hail three digit user!
    Bows down before your lordship.

  72. SCO issued a press release. by falconwolf · · Score: 5, Informative

    There isn't one from MySQL AB.

    Actually there is a press release on MySQL's website:

    SCO Partners With MySQL AB to Lower Costs and Increase the Power & Scalability of Modern Database Solutions

    Falcon
  73. switching from MySQL? by falconwolf · · Score: 1

    is MySQL going to stop distributing its product under GPL ? Should those users for whom GPL and the freedoms it gives are important start preparing for a switch to something else ?

    I already use, er have installed and am learning to use, another OS database, Firebird.

    Falcon
  74. Re:The most interesting part of the old article... by dave · · Score: 2, Funny

    Sorry billysara, I must have beat you by a few minutes. :)

  75. Here by Saeed+al-Sahaf · · Score: 1
    From MySQL.com:

    MySQL Administrator

    MySQL Administrator is a powerful visual administration console that enables you to easily administer your MySQL environment and gain significantly better visibility into how your databases are operating. MySQL Administrator now integrates database management and maintenance into a single, seamless environment, with a clear and intuitive graphical user interface. By using MySQL Administrator you will be able to:

    * Achieve higher database availability through improved management
    * Reduce errors through visual database administration
    * Lower database administration costs through improved productivity
    * Deliver a more secure environment through easier privilege management

    MySQL Administrator enables developers and DBAs to easily perform all the command line operations visually including configuring servers, administering users, and dynamically monitoring database health. Other common administrative tasks such as monitoring replication status, backup and restore, and viewing logs can also be performed through the MySQL Administrator graphical console.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  76. Re:The most interesting part of the old article... by billysara · · Score: 1

    Damn you! ;-)

  77. Personal Experience by Scitt · · Score: 1

    I originally tried to convert an application from Oracle to MySQL 5.0. Very simple app, though it had some views in it. The views performed much slower than the straight SQL did - microseconds vs 10seconds plus. I then converted to PostgreSQL 8.0 and everything worked fine. As some one with years of database experience with Oracle, SQLServer, and others, I found Postgresql, at face value, to rank up with both of them in many respects, while I found MySQL to be somewhat limiting. MySQL's flat out speed is of no value if it can't provide the basic requirements of a relational database. While I don't have heavy-duty performance requirements, everything else about PostgreSQL seems top-rank. Documention, stored procedures, SQL adherence, advanced storage mechanisms, etc. were all there. And when the next, great open source database comes along, the standardization that it provides will make it all that much simpler to port yet again!

  78. Posts in the 1000s? by OS24Ever · · Score: 1

    This is different from a working day, how?

    --

    As a rock-in-roll Physicist once said, No matter where you go, there you are.

  79. MySQL is best choice I could ever make by Anonymous Coward · · Score: 0

    Imagine this:

    90 servers sending ~500,000 inserts/updates per day per server to 4 (four) myisam tables, the other 10 machines continiously read buffers and transform data filter and write something like 45% of incomming records passing to processed tables and on the end having other clients that read processed tables intensively and doung statistical queries every here and there.

    The only possible choice to make this happened is mysql. Have you ever seen 21,700 inserts per secound continiously 24h? Do you want a screenshot?

    1. Re:MySQL is best choice I could ever make by telstar · · Score: 1

      Just curious ... what kind of system did all of that?

    2. Re:MySQL is best choice I could ever make by dotgain · · Score: 1
      Have you ever seen 21,700 inserts per secound continiously 24h? Do you want a screenshot? - Anonymous Coward

      Laying your name to the claim would be a good start...

    3. Re:MySQL is best choice I could ever make by Morden · · Score: 1

      So it's YOU running the botnet...

    4. Re:MySQL is best choice I could ever make by Lew+Payne · · Score: 1

      What do you do about the fact that most of your inserts contain SQL errors? Do you count the logged error (and the resultant lack of disk i/o) as one of those ~500,000 inserts/updates per day per server?

      The reason I ask is because I don't believe you are capable of writing proper queries in SQL. As far as I recall, mySQL doesn't yet offer a built-in spell checker. As a result, your queries would be as full of typos as your comment here on SlashDot.

    5. Re:MySQL is best choice I could ever make by Anonymous Coward · · Score: 0

      Yeah prove it and show me what happens to your data when you pull the plug and you power back up. There is more to life than speed, but I doubt your numbers anyway.

  80. Just compared MySQL 4.0.12 vs PG 8.0.3 by adturner · · Score: 4, Insightful

    Short story, mysql.com's interpretation of the GPL is frankly a lot more strict then mine or my reading of the FSF's FAQ on the GPL. If it wasn't for that, I'd still be using MySQL for my company's application since I'm more familar with it.

    Anyways, PostgreSQL IMHO has some things going for it:
    - More features like triggers, stored procs, schemas, subselects, etc then the current stable version of MySQL supports. About the only thing I find myself using are subselects which are just a nice to have.
    - Attempts to be "safer" with your data via WAL, etc. Good for unreliable environments.
    - Tends to follow the SQL standards closer then MySQL
    - Is BSD licenced so you don't have to worry about licensing issues.
    - #postgresql on freenode is great. The people there are intelligent, knowledgeable and friendly if you're not an *sshole. They've helped me a lot.

    The problems I have with PostgreSQL is that:
    - INSERT is very slow (about 3x slower compared to MySQL/InnoDB) for my dataset. The "answer" is to use the COPY command or disable your indexes/FK's which is f*cking lame since you loose all your relational integrity. I was willing to trade off performance for disaster prevention (system crash, power failure, etc) by disabling WAL, but you can't actually do that.
    - The OSS tools available aren't as good for postgres as they are for MySQL. I've yet to find anything as nice or complete as phpmyadmin for Pg or something that supports schema's for ER Diagrams. Frankly, I'm sick and tired of designing my DB in vim.
    - Having to run vacuum all the time to help the query optimizer figure things out. Why this doesn't happen automagically in the background without me having to worry about it is beyond me.
    - In general, I find the documentation on mysql.com superior to on postgresql.org, but #postgresql more then makes up for it.

    Frankly, all the technical "problems" in MySQL or Pg can be worked around if you're willing to think out side of the box.

    1. Re:Just compared MySQL 4.0.12 vs PG 8.0.3 by ttfkam · · Score: 1
      INSERT is very slow (about 3x slower compared to MySQL/InnoDB) for my dataset. The "answer" is to use the COPY command or disable your indexes/FK's which is f*cking lame since you loose all your relational integrity.
      That and making sure the insert commands are all done in a single transaction. But I assume you'v done this since you seem to have done your research.
      Having to run vacuum all the time to help the query optimizer figure things out. Why this doesn't happen automagically in the background without me having to worry about it is beyond me.
      autovacuum

      It showed up one day when I did an apt-get dist-upgrade. Works great.
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    2. Re:Just compared MySQL 4.0.12 vs PG 8.0.3 by Khazunga · · Score: 3, Informative
      - INSERT is very slow (about 3x slower compared to MySQL/InnoDB) for my dataset. The "answer" is to use the COPY command or disable your indexes/FK's which is f*cking lame since you loose all your relational integrity. I was willing to trade off performance for disaster prevention (system crash, power failure, etc) by disabling WAL, but you can't actually do that.
      Wrap the inserts in a transaction. Auto-commits force OS syncs, and these are slooow.
      - The OSS tools available aren't as good for postgres as they are for MySQL. I've yet to find anything as nice or complete as phpmyadmin for Pg or something that supports schema's for ER Diagrams. Frankly, I'm sick and tired of designing my DB in vim.
      PhpPgAdmin is way better than vim. Granted, PhpMyAdmin is better, but the difference is no showstopper.
      - Having to run vacuum all the time to help the query optimizer figure things out. Why this doesn't happen automagically in the background without me having to worry about it is beyond me.
      Like pg_autovacuum?
      - In general, I find the documentation on mysql.com superior to on postgresql.org, but #postgresql more then makes up for it.
      Better than the interactive manual?
      --
      If at first you don't succeed, skydiving is not for you
    3. Re:Just compared MySQL 4.0.12 vs PG 8.0.3 by binux · · Score: 1
      - Having to run vacuum all the time to help the query optimizer figure things out. Why this doesn't happen automagically in the background without me having to worry about it is beyond me.
      Try the auto-vacuum daemon.
    4. Re:Just compared MySQL 4.0.12 vs PG 8.0.3 by nconway · · Score: 1
      Having to run vacuum all the time to help the query optimizer figure things out. Why this doesn't happen automagically in the background without me having to worry about it is beyond me.


      VACUUM does not have much to do with the optimizer's statistics. Statistics are primarily updated by ANALYZE (and VACUUM ANALYZE), and should be updated periodically (say, once a day or week), or when the distribution of the data radically changes.

      As for scheduling VACUUM and/or ANALYZE automatically, the pg_autovacuum daemon (integrated into 8.1, available as a contrib/ module prior to that) can be used. There are various people thinking about how to improve automatic vacuuming in the future, but pg_autovacuum solves the basic problem. BTW, automatically scheduling maintenance operations in an optimal fashion (and without imposing overhead on routine operation) is not an easy problem...

      I find the documentation on mysql.com superior to on postgresql.org


      Is there anything specific that you noticed could be improved with the PG docs?
    5. Re:Just compared MySQL 4.0.12 vs PG 8.0.3 by Dukhat · · Score: 1

      If you are looking for tools that are similar phpmyadmin for postgres, you might take a look at the free version of PostgreSQL Manager.
      It's not OSS, but it's nice.
      http://www.sqlmanager.net/en/products/postgresql/m anager

      A commercial tool for postgres for reverse engineering existing schemas and displaying graphs is Charonware's CASE Studio.

      http://www.casestudio.net/

      Dezign for Databases will let draw an ERD diagram and then generate PostgreSQL compliant sql for creating tables in your diagram.

      http://www.datanamic.com/

  81. Stored Procedures! by matchboy · · Score: 2, Interesting

    Above all things... this is one of my favorite features of PostgreSQL. MySQL has nothing of the sort. Procedural Languages... yum. I recently showed on my blog how I could interact with an instance of DRb from inside of PostgreSQL. How cool is that? MySQL has nothing like this. I'd also guess that a majority of the applications that use MySQL could use SQLite instead and as soon as that becomes more popular, we'll see less MySQL usage.

    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
    1. Re:Stored Procedures! by matchboy · · Score: 1

      See, with pl/Ruby, I can access Rubygems from within PostgreSQL!

      CREATE FUNCTION redcloth(text) RETURNS text AS '

      require ''rubygems''
      require ''redcloth''

      content = args[0]

      rc = RedCloth.new(content)

      return rc.to_html

      ' LANGUAGE 'plruby';
      and I can use it like so:

      rb=# SELECT redcloth('*strong text* and _emphasized text_');

      --

      Robby Russell
      PLANET ARGON
      Robby on Rails
  82. MySQL dolphin vs Postgresql elephant... by allanw · · Score: 1
    1. Re:MySQL dolphin vs Postgresql elephant... by Spy+der+Mann · · Score: 1

      yes, but MySQL got some HELP...

      http://www.elroubio.net.nyud.net:8090/commun/eleph pant_elroubio.gif

      Now we have a Dolphin AND an elePHPant! :D

  83. MySQL vs. PostgreSQL -- Real World by philovivero · · Score: 4, Informative

    I've read a few of the replies to this story. It's interesting to read some of the pro-PostgreSQL peoples' opinions. They're rather dated.

    The more I learn about MySQL (from the perspective of someone who was initially gung-ho about PostgreSQL), the more I realised the shortcomings of MySQL weren't really shortcomings. They were misunderstandings. Yes, this can sometimes be as bad, when a default option is a stupid option (like table-level locking, as the parent and other PostgreSQL fans complain about).

    Then I quit that job and went to work at Friendster, which is also a big MySQL shop. What I learned then was that when used properly, MySQL can scale to amazing proportions. Millions of transactions per hour (I won't be too specific being as I don't want to be sued into oblivion now that I'm an ex-Friendster employee).

    Keep in mind that Friendster isn't alone. Google and Yahoo! use MySQL. For production loads. Big, big production loads.

    What I didn't like about PostgreSQL was the weird licensing problems. Yes, bizarre as it may be, the BSD license they chose over GPL causes it to be bizarre. You can't get replication without downloading some weird third-party patch and recompiling (because the patch is GPL). Screw that. MySQL has it built in to the supported binaries you get from their site.

    Without replication, your DBMS is useless. It's pretty clear from reading the parent post that Michalf doesn't really understand replication. If he did, he might think a moment about his statement that MySQ can't scale to more than 100 users at once. Friendster had millions (at once). Yahoo! has at last estimate nearly a hundred million users at once.

    Last I checked PostgreSQL (admittedly, 6-9 months ago?) it just wasn't viable. Really replication was about the only thing holding it up, except I know another engineer who worked extensively with PostgreSQL internals (hacking it up to create a DBMS cluster, actually) and he said their I/O internals were bad/slow. Hopefully he's wrong, but I know before I deploy PostgreSQL I'm going to be carefully benchmarking it before doing so. Keeping in mind that I never deploy an RDBMS in a tiny little "more than 100 users" environment like the parent poster.

    Sorry for the long-winded rant. It's just that I've been wishing/hoping/praying PostgreSQL would be the winning RDBMS in this battle for years, and every time I think it's going to be any good, it goes and shoots itself in the foot somehow, which makes me sad. Currently, I'm still a fulltime MySQL DBA.

    Caveat: Much of what I've said here only applies in high volume RDBMS environments. If your environment is low volume, PostgreSQL may be a better choice.

    1. Re:MySQL vs. PostgreSQL -- Real World by Anonymous Coward · · Score: 0

      I have been running PostgreSQL with replication for over a year now (and I am sure it was supported for several years before that)... what is the problem?

      Replication works great with PG. It has excellent documentation and you can get excellent commercial support. What exactly is the problem? The license? Why is the GPL a problem?

      BSD code is compatible with the GPL!

    2. Re:MySQL vs. PostgreSQL -- Real World by mikaelhg · · Score: 1

      What I didn't like about PostgreSQL was the weird licensing problems. Yes, bizarre as it may be, the BSD license they chose over GPL causes it to be bizarre. You can't get replication without downloading some weird third-party patch and recompiling (because the patch is GPL). Screw that. MySQL has it built in to the supported binaries you get from their site.

      That's what Friendster used, the MySQL binaries you can download from the mysql.com site?

    3. Re:MySQL vs. PostgreSQL -- Real World by countach · · Score: 1

      >What I didn't like about PostgreSQL was the weird
      >licensing problems. Yes, bizarre as it may be, the
      >BSD license they chose over GPL causes it to be
      >bizarre. You can't get replication without
      >downloading some weird third-party patch and
      >recompiling (because the patch is GPL).

      So blame the dumb fuck who decided to release a patch under a different licence to the original. People need to conform to the original app, not go their own way.

    4. Re:MySQL vs. PostgreSQL -- Real World by Overly+Critical+Guy · · Score: 1

      The more I learn about MySQL (from the perspective of someone who was initially gung-ho about PostgreSQL), the more I realised the shortcomings of MySQL weren't really shortcomings. They were misunderstandings.

      It's hard not to misunderstand MySQL's bizarre handling of NULL/NOT NULL or their lovely silent truncation.

      MySQL Gotchas

      --
      "Sufferin' succotash."
    5. Re:MySQL vs. PostgreSQL -- Real World by dodobh · · Score: 3, Informative

      Yahoo! uses MySQL for minor, readonly stuff. All writes are written to InnoDB tables, and those are slow. That is replicated to MyISAM tables, which are used as caches.

      PostgreSQL replication? is here. BSD licensed too.

      Oh, and .org uses PostgreSQL as a backend. Let me know when Yahoo! starts using MySQL for its financial accounting stuff.

      --
      I can throw myself at the ground, and miss.
    6. Re:MySQL vs. PostgreSQL -- Real World by timeTumbler · · Score: 2, Interesting

      PostgreSQL has come a long way in 6-9 months. Please take a look at today's SLONY replication, at commercial support *and value-add* companies like http://www.commandprompt.com/, and http://www.enterprisedb.com/. Replication is here...don't worry. And by the way, sounds like EnterpriseDB is putting replication in place between Oracle and PostgreSQL...could be interesting...

  84. Wow. by Anonymous Coward · · Score: 0

    Al Gore is really bitter.

  85. Check Out PostgreSQL 8.1 Beta by einhverfr · · Score: 3, Informative

    The one good thing I have to say about mysql is that its multi-user friendly for hundreds of accounts.

    Not really. PostgreSQL had MySQL beat there. You can assign permissions to groups. With large numbers of accounts, this becomes problematic with MySQL.

    PostgreSQL 8.1 beta further improves this by supporting the concept of roles. A role is like a user or group except that they can be nested. This allows even easier administration of databases with hundreds or thousands of user accounts.

    Users on the web dont need something heavy unless they are a commercial website. Also there are a ton of php and perl scripts and tools for users to use.

    Commercial as in what? A mom-and-pop web-store? I would call that commercial and because MySQL will *truncate* numbers to fit fields if they are too big, I would say PostgreSQL is needed for that.

    You are right in that MySQL is quite adequate for content management provided (of course) that you don't need to integrate it with other buisness apps. If you do, you can either go to PostgreSQL (and take advantage of schemas) or use PostgreSQL with DBI-Link to pull the data from MySQL. DBI-Link is easily one of the coolest new projects for PostgreSQL as it allows any data source reachable via Perl's DBI interface to be seen as a table from within PostgreSQL.

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:Check Out PostgreSQL 8.1 Beta by jim_keller · · Score: 1

      >I would call that commercial and because MySQL will *truncate* numbers to fit fields if they are too big, I would say PostgreSQL is needed for that.

      This is a legitimate point, but the values should've been sanity checked prior to ever being passed to the query. I realize it's better to have a failsafe (the query failing) in the event that they do make it, but having the database layer throw a general error back to the client (which hopefully is at least hidden and translated into some sort of "unknown error occurred" message) is not the way to handle improper user data.

    2. Re:Check Out PostgreSQL 8.1 Beta by einhverfr · · Score: 1


      This is a legitimate point, but the values should've been sanity checked prior to ever being passed to the query. I realize it's better to have a failsafe (the query failing) in the event that they do make it, but having the database layer throw a general error back to the client (which hopefully is at least hidden and translated into some sort of "unknown error occurred" message) is not the way to handle improper user data.


      True, but the job of your database is to ensure that you have meaningful data. Validation only gets you so far especially if you have one database and many clients. The last thing you want is for one client to think a field is bigger than it is and start messing with your accounting numbers.

      --

      LedgerSMB: Open source Accounting/ERP
    3. Re:Check Out PostgreSQL 8.1 Beta by jim_keller · · Score: 1

      >Validation only gets you so far especially if you have one database and many clients. The last thing you want is for one client to think a field is bigger than it is and start messing with your accounting numbers.

      I don't really understand how "validation only gets you so far", though. The database field definitions act as kind of a contingency validation, but your program should sanity check everything:

      if ( $given_num > $max_num ) {
                  no_query();
      }

      I think the problem really comes into play when you have multiple developers working on one database. Still, they should understand the database structure if they're working the app.

    4. Re:Check Out PostgreSQL 8.1 Beta by einhverfr · · Score: 1

      Ok. Your database is there to maintain and manage *meaningful* data. This data is extremely valuable. In general, you don't want it to be contaminated with known bad values. You could have any number of applications working against the same database. Developers will make mistakes and that is why software has bugs. But you don't want these bugs to insert known bad data into your database. This is neatly summarized as Date's Central Rule, which could be paraphrased that the integrity of the data should be maintained by the RDBMS and not be circumventable by the application.

      Yes, bugs can cause bad data to be entered (Why is everyone in our database from Alaska even when their telephone number lists as a Florida number?) but this is not as serious as knowing, say, that numbers have been accidently truncated by the database and you have no idea what they were.

      These things can also happen as needs change and the application is changed without changing the database schema to match. Shit happens. Take precautions.

      Yes, you need to validate your input. But you need to do it in the backend too.

      The real question is: What is the correct thing to do when you cannot insert what you were told to insert? Do you do your best (like MySQL) or do you fail with an error (ANSI standard)?

      IMO, the RDBMS really has three jobs:
      1) Store data (many developers never get beyond this one)
      2) Maintain data (this is often overlooked but is extremely important).
      3) Present data (this is often overlooked but it is extremely useful. For example you can have different applications seeing the same data in different ways according to their own data models.) It is also often used in reporting.

      Yes you can push these jobs to the application to some extent, but it is a lot easier to maintain them in the back-end and it is a lot *safer* to maintain them in the backend.

      --

      LedgerSMB: Open source Accounting/ERP
    5. Re:Check Out PostgreSQL 8.1 Beta by jim_keller · · Score: 1

      I certainly don't disagree with you that the query *should* fail if you try to insert, let's say, 5000 into a tinyint field (which will get truncated to 127 in mySQL), but I also don't think it's a single point of failure for mySQL as an enterprise class solution, as some people seem to be making it out to be. It's an implementation decision that the mySQL developers made, and the application programmer just needs to be aware of it. I'm sure you know as well as I do that any tool, whether it be mySQL, postGres, or anything else, will have certain design aspects that make you ask, "why would they do it this way?". Though now that you've got me thinking about it more, this integer truncation thing IS actually starting to bother me. Maybe we can at least get some sort of config flag to turn off that behavior :)

    6. Re:Check Out PostgreSQL 8.1 Beta by einhverfr · · Score: 1

      Maybe we can at least get some sort of config flag to turn off that behavior :)

      MySQL 5.0 will have a "strict" mode where the ANSI behavior is observed instead of truncating fields. But alas it is still in beta. I also assume that it will do little good for shopping cart apps because ISP's won't want to have the strict mode on as it could break a lot of other applications.

      --

      LedgerSMB: Open source Accounting/ERP
    7. Re:Check Out PostgreSQL 8.1 Beta by flupps · · Score: 1

      Can enable it server-wide or on a per connection basis, actually.

      SET {SESSION | GLOBAL } SQL_MODE = 'strict_all_tables'

    8. Re:Check Out PostgreSQL 8.1 Beta by mw · · Score: 1

      You can't check all data within the application. Maybe you think so, but you will forget this or that. In that case it's nice to have integrity check within the database.

      And beside that, it's still no excudes that mysql does not check data.

  86. Uhmm... by Anonymous Coward · · Score: 0

    If you had bothered to look at the first link, you'd see that it linked to a previous slashdot article, way back in '99, that compared the two then.

    That was part one, this is part two of that comparison. Neither really linked to any real comparison, they just tried to spur some discussion of the two, and let the comments tell the real story.

  87. NOT IN (SELECT blib from wheee) by mrmike37 · · Score: 1

    You can do a join, and add a "having isnull(wheee.blib)".

    --
    Really, I'm not trying to be clever with my signature.
    1. Re:NOT IN (SELECT blib from wheee) by huiac · · Score: 1

      In most SQL databases, this would be a poor way to achieve the result (and you may not be able to use HAVING without GROUP BY).

      HAVING ... makes no restriction on the rows joined by the queries, resulting in a large intermediate set from which the rows satisfying the HAVING clause are extracted.

      Using a LEFT JOIN allows the intermediate set to be constructed using only rows that may ultimately satisfy the condition, resulting in faster execution and possibly reduced memory use.

      Of course, the RDBMS may optimize your HAVING clause into a JOIN on its own, but I'd be a little troubled if that happened.

      huiac at internode.on.net

    2. Re:NOT IN (SELECT blib from wheee) by mrmike37 · · Score: 1

      He asked for a work around, not the perfect solution. You can't do a join on a NULL. I understand what you are saying, but I don't think it would work becuase you have to join all rows in order to find out the ones that don't have matches in MySQL. Also, I do understand 'having' only clips out the results after having constructed an intermediate result set.

      --
      Really, I'm not trying to be clever with my signature.
    3. Re:NOT IN (SELECT blib from wheee) by huiac · · Score: 1

      You should read up further on JOIN types.

      SELECT * FROM foo LEFT JOIN whee ON bar.foo = whee.blib WHERE whee.blib IS NULL;

      The DBMS can optimize this however it likes; using the WHERE clause to limit the JOINed rows is a basic optimization, easy for the optimizer to spot. The NOT IN clause may be more efficient still (requires less smarts from the optimizer), but in its absence the LEFT JOIN is potentially orders of magnitude better than HAVING - it depends how big whee and bar are, and how many rows there are in the result set.

      Also proposed in
      http://slashdot.org/comments.pl?sid=161173&cid=134 84920

      huiac at internode.on.net

    4. Re:NOT IN (SELECT blib from wheee) by mrmike37 · · Score: 1

      I tried that IIRC, and it didn't work in MySQL. I believe the where occurs before the join, hence that can't be done. I could be wrong though.

      --
      Really, I'm not trying to be clever with my signature.
    5. Re:NOT IN (SELECT blib from wheee) by huiac · · Score: 1

      Well, LEFT JOIN should give you a whee.blib = for every row in foo; the whole point of a LEFT JOIN is that you'll get a 'dummy row' with NULLs for whee.* if there is no 'real' row in whee that satisfies the JOIN condition. If that's not happening for you, then either MySQL's LEFT JOIN is broken or perhaps it's something about how you're typing 'WHERE whee.blib IS NULL'.

      Alternatively, if you're joining o an indexed column and the index is corrupt or incomplete the DBMS may not find all of the rows vin an index scan.

      It shouldn't matter when the WHERE is evaulated, the same rows will be found - it's just open to the query planner to use the WHERE clause to restrict the number of joined rows it considers. rather than to do a full left join (including rows with whee.* set to NULL for rows in foo without a corrresponding whee which satisfies the join condition) and then wade through the results.

      huiac at internode.on.net

  88. Slony by Admiral+Burrito · · Score: 1

    As far as I know Postgres-R is dead..? Slony-II is under development, and will provide synchronous / multi-master replication for PostgreSQL. (Slony-I is already available, but is asynchronous / single-master.)

    1. Re:Slony by LordMyren · · Score: 1

      Oh god, its going to be some terrible partition+heirarchy scheme isnt it. Bollox to that.

  89. Comparison of MySQL, PostgreSQL, Oracle, MS SQL... by einhverfr · · Score: 4, Informative

    No benchmarks here but benchmarks are largely useless in the database world anyway unless they are run on your specific application.

    Oracle: Very portable database, replaces many OS functions and is extremely tunable. Downside: $$ and the fact that the tuning options are extremely complex allowing your DBA to spend all his time tuning the database, and your second DBA to spend all his time tuning the tables..... (/sarcasm)

    One of the odd problems with Oracle is that empty strings and nulls are seen as equivalent (and Oracle DBA's seem to think that an empty string and a null are the same thing). The general concensus in the RDBMS industry is that these are not the same.

    MS SQL Server: A Windows-only RDBMS which is tightly integrated with Windows in terms of memory management. Quite extensible, less costly and simpler to administrate than Oracle. Will tie you to Windows. Troubled security history.

    PostgreSQL: An Open Source RDBMS designed to target Oracle's market. Extremely powerful and full featured. Attempts to tune itself to the greatest extent possible and relies on the OS for additional tuning. Downside is that it is not as widely used as the others listed above. Stored procedures are available in a much wider number of languages than in any other RDBMS in this comparison.

    MySQL: A popular open source database manager (neither really relational nor a management system). Provides a simple non-standard subset of SQL for the interaction with various resources. Downside is that it does not do much integrity checking and does not enforce much integrity (valid dates include 0000-00-00 and 2004-02-31). Furthermore it will *truncate* numbers that are too large to fit in a number field making it unfit for any purpose where it must track money. It is more widely used than any other open source RDBMS.

    FirebirdSQL. A good RDBMS designed really for Windows but ported over to UNIX/Linux. Fairly extensible and stable but largely undocumented. Lacks many of the data types available in all other databases listed here.

    --

    LedgerSMB: Open source Accounting/ERP
  90. Exactly was Re:Not exactly ... by matchboy · · Score: 1
    If Bill Gates and I do a press release about our new partnership, that's an entirely different thing.


    Exactly. This isn't just about buying a license. MySQL is outright promoting that they are working together with SCO, who is a soon-to-be bankrupt and known enemy of the open source community.

    MySQL issues have come up in the past (see PHP5 licensing issue for example)... their motivations for the future seem to be forgetting who made them who they are.

    Every Linux user who has installed a distribution has probably install MySQL. It's been supported by the open source community and they would not be where they are without that community.

    If you have a group of dedicated friends, do you join a pact with their enemy? It only seems to validate that MySQL approves of the business practices of SCO. Is this true? Where is the ethics? Selling SCO a license is one thing, joining a pact is another.

    This concerns me.

    My question for the PR department at MySQL... does MySQL support the ethical business practices of SCO?

    That is how I see this announcement.
    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
    1. Re:Exactly was Re:Not exactly ... by Zontar+The+Mindless · · Score: 1

      > does MySQL support the ethical business
      > practices of SCO?

      No.

      At least I'm pretty sure they don't, since MySQL AB (still) support FOSS and (still) oppose software patents. They continue to offer source and binaries at mysql.com on all the most common platforms (and not just Linux).

      The legal matters are for the courts to decide. (Personally, I hope SCO get tarred and feathered.)

      Several other companies have already "partnered" with SCO to offer paid Postgres and Ingres support to SCO users. So MySQL AB did likewise. Why should MySQL not compete for those customers?

      BTW, MySQL AB have previously entered into such "partnerships" with Novell, Dell, and others to do the same thing - encourage their users to run MySQL and offer paid support (and maybe certified binaries) to those who do.

      --
      Il n'y a pas de Planet B.
    2. Re:Exactly was Re:Not exactly ... by geminidomino · · Score: 1

      SCO has "ethical business practices?!" O.O

  91. Comparing Slashdot! by Sinus0idal · · Score: 1

    Don't know about comparing mysql postgresql, but reading the slashdot article from 6 years ago made me realise how slashdot has gone downhill!

    1. Re:Comparing Slashdot! by fm6 · · Score: 1
      I agree. And here's my pet theory as to why: Slashcode hasn't kept up with the times. The user-interface still has a simplistic display model that doesn't work if there are more than 100 posts per article. Nowadays, frontpage articles often get thousands of posts -- and there's no way to skip past threads you're not interested in.

      That shows in the current discussion, which started out with a long and pointless flame war about the SCO thing. Anybody interested in a serious discussion is going to want to skip past it -- but how? So the discussion is dominated by idiots. No thanks.

      Here's a LiveJournal skin that has a handy "thread" link that let's you drill down into threads and subthreads you're interested in. Only the lead post in each thread is shown until you drill down.

      A simpler fix would be to add a "skip this thread" link to each article. The link would take you to the next commend on the same level.

  92. Re:The most interesting part of the old article... by Anonymous Coward · · Score: 0

    All digit people are newbies. When I first joined slashdot in the late seventies we still used letters. I was the letter Q. At some point they switched to numbers and everybody was supposed to sign up for a number. Well I never got around to it so that's why I'm posting as AC today.

  93. Re:The most interesting part of the old article... by Jon+Abbott · · Score: 1

    Old. :^)

  94. Not what we are talking about here by einhverfr · · Score: 1, Informative

    What does the ANSI standard say this means?

    SELECT ('Hello ' || 'World!') as greeting FROM my_table;

    What does it mean in MySQL?

    Yes, every RDBMS has extensions to the standard and this is important but MySQL *breaks* standard behavior in many profound ways.

    Another example: What does the ANSI standard say should happen here:

    CREATE TABLE my_table (
        myfield CHAR(4)
    );

    INSERT INTO my_table (myfield) values ("Hello World!");

    What does MySQL do?

    MySQL does the same with numbers.

    These are areas where standard behavior is actually broken by the RDBMS.

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:Not what we are talking about here by I_Want_This_ID · · Score: 1

      Great. Posing hypothetical questions and not giving us the answers. ANSI - 'Hello World' MySQL - ????????????? ANSI - Won't insert a value that exceeds datatype specification MySQL - 'Hell' Am I right?

  95. extensions by InsaneCreator · · Score: 2, Interesting

    After 4 years of using both PostgreSQL and MySQL, I'd say that one of the biggest differences between them is their extensibility.

    If PG lacks a feature, you have a very good chance of finding a script or an extension which implements equivalent functionality. Materialized views, ordering by different locales and hierarchical queries are some examples of this.

    On the other hand, if MySQL doesn't have a feature you need, you're pretty much screwed.

  96. EnterpriseDB by einhverfr · · Score: 1

    There is a new company, called EnterpriseDB which offers additional Oracle compatibility capabilities on PostgreSQL. Not FOSS, though quite affordable.

    They are also donating a lot of code back the community and have announced that they will be working on having SQL99-compliant PSM support in PostgreSQL 8.2 (possibly also able to support Oracle, MySQL, and PostgreSQL stored procedures in addition to the SQL99-compliant stuff).

    --

    LedgerSMB: Open source Accounting/ERP
  97. SP's are only the beginning by einhverfr · · Score: 4, Interesting

    For an enterprise system,you also need:

    1) Views
    2) Triggers
    3) Integrity Enforcement (i.e. if you try to insert 1000000 into a numeric(4,2) column of your enterprise accounting app you should get an error and not have something inserted).

    As your system gets large you may also want:

    1) Table partitioning
    2) Functional Indexes, i.e. create index on table foo (md5(bar))
    3) Partial indexes (i.e. create index on table foo (bar) where open IS TRUE)

    MySQL hardly offers all of these capabilities.

    PostgreSQL 8.1 will offer all of them in usable forms.

    BTW, for those interested, my site has a whitepapers section which has a MySQL to PostgreSQL migration guide.

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:SP's are only the beginning by BiggerIsBetter · · Score: 1

      As I understand it, "MySQL" 5 will support all that stuff... It looks like a development of SAP-DB with some MySQL branding and usability added.

      --
      Forget thrust, drag, lift and weight. Airplanes fly because of money.
    2. Re:SP's are only the beginning by einhverfr · · Score: 2, Interesting

      I don't think it will support things like table partiitoning though in any maintainable form.

      For example, in PostgreSQL 8.1 I can do something like (pseudocode here):

      create table master_table(
      id serial,
      date_entered date,
      open bool,
      state CHAR(2),
      data text
      );

      create table arizona_table () INHERITS (master_table) CHECK state = 'AZ';

      create rule arizona_rule ON insert to master_table where state ILIKE 'AZ' DO INSTEAD insert into arizona_table (id, date_entered, open, state, data) values (new.id, new.date_entered, new.open, 'AZ', new.data);

      Now all all entries to master table with the state field ILIKE 'AZ' (i.e. AZ, Az, az, aZ) will have their dates entered into arizona_table instead. Furthermore, if I want to do something like:

      SELECT * from master_table where state = 'AZ';

      PostgreSQL 8.1 will only look in the child tables which allow state to equal AZ. If the system is well designed, it will only look in the table which holds Arizona records. This is important for data data warehousing solutions (which MySQL really doesn't even try to handle).

      MySQL 5 may be useful when it comes out and will be a strong step in the right direction. However, many of these features take a long time to get right. I.e. PostgreSQL has had views and rules since 1995 I think.

      --

      LedgerSMB: Open source Accounting/ERP
    3. Re:SP's are only the beginning by Anonymous Coward · · Score: 0

      What shortcomings in your systems do you try to solve by creating this mess?

  98. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Unordained · · Score: 1

    Nitpick: Firebird (Interbase) started off on, what, an Apollo DN320? Not exactly designed for Windows. It got the Windows-oriented feel from being owned by Borland at a time when Borland focused on Windows only. (Note that they're now working on Delphi/Builder for Linux, so that's changing.) The Firebird project dropped support (last year?) for several very old machines that simply don't exist anymore. It worked, but nobody needed it anymore. I'd say it was more designed for a Unix environment, and happens to install easily on Windows (and Linux. Our production firebird server runs Slackware.)

  99. My Grief by Positronic · · Score: 2, Interesting

    I don't know the details about the internal workings of either one, but they both bug me.

    For years I've hated MySQL's install process. Call me old fashioned but I just want to

    ./configure
    make
    make install

    It makes upgrading and maintaining my servers really nice. MySQL is just an annoyance.

    Today I tried PostgresSQL, and I was happy to see a typical install process. Then I finished and I was blown away that it requires a shell in order to run. I understand that daemons need user accounts, but it just doesn't seem secure to give a daemon a shell.

    IMO MySQL is a pain, and PostgresSQL is a joke.

    1. Re:My Grief by Anonymous Coward · · Score: 0

      Can you elaborate on this just slightly, rather than calling PostgreSQL a joke? For that matter, what makes MySQL an annoyance?

      I could for instance call your comments an annoyance and a joke, only they're not very funny. I guess this just makes them annoying.

    2. Re:My Grief by Anonymous Coward · · Score: 0

      but it just doesn't seem secure to give a daemon a shell

      As opposed to what? Having to run it as root and then relying on it to change to the shell-less user and drop root privs correctly? wtf? Who would care about such a trivial thing? You don't have to make the account accessible to anyone.

    3. Re:My Grief by Anonymous Coward · · Score: 0

      Not at all true. PostgreSQL does not require a shell account, just a user account.

    4. Re:My Grief by Anonymous Coward · · Score: 0

      I'm impressed... you judge a database by whether it's using autoconf or not, or whether the user it runs as needs a shell or not (which it doesn't, BTW -- you can use sudo -u postgres pg_ctl start if you like).

      Have you ever heard of precompiled packages from your distribution?

  100. Slashdot uptime by ttfkam · · Score: 2, Interesting

    There's more to uptime than the box(es) being up. Netcraft doesn't count when Slashdot has returned 500 status codes because the back-end (read: database) fell over. While it speaks volumes about the reliability of Apache over long periods of time, Netcraft uptimes mean didley in this case for MySQL.

    Don't get me wrong. Slashdot's reliability has been steadily improving over the years. Perhaps this is an indication of the stability of MySQL improving over the same interval.

    ----

    Also remember that older articles are archived -- removed from active database queries/updates and rendered to flat text files. Once again, it speaks highly of Apache rather than MySQL.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:Slashdot uptime by jamie · · Score: 4, Informative
      The 500s you see are almost always due to load on the webheads (rendering pages takes a lot of CPU) and occasionally to planned restarts (we toast a few hundred connections every time we upgrade the code, basically because we're too lazy to gracefully integrate restarts with the LB proxy). Sometimes due to a DDoS or network outages.

      We haven't had any serious MySQL load problems in over a year, with the exception of one targeted DDoS which wedged up our search DB slave for a while. Slashdot hasn't had any MySQL reliability problems since we moved to 4.0. Our master DB has been running the same version of 4.0.x since early 2003 and it just keeps going, it never crashes. Later versions of 4.0.x are probably more reliable, but we have no need to upgrade because it just works. The only time it went down was last month when the OS finally threw a kernel panic, which sucked, but wasn't MySQL's fault.

      Anyway, the point someone was trying to make is that MySQL isn't ready for high-traffic enterprise sites, which I hope we can all agree is just silly. Slashdot's not even the best example, go look at Wikipedia, CraigsList, LiveJournal, Yahoo, Google, etc.

    2. Re:Slashdot uptime by Anonymous Coward · · Score: 0

      What about when Wikimedia went down for days as they rebuilt their database from backups due to data corruption?

    3. Re:Slashdot uptime by michalf · · Score: 1
      Anyway, the point someone was trying to make is that MySQL isn't ready for high-traffic enterprise sites, which I hope we can all agree is just silly.

      For a mostly read-only and simple queries requests MySQL rocks. That is obvious. But when it comes to high trafic with a lot of inserts, updates, joins - PostgreSQL can be much better.
      After all - it all depends on the sort of application you have. There is no winner, we can agree to this.

      michal
  101. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Anonymous Coward · · Score: 0

    empty strings and nulls are seen as equivalent

    To an extent, I can understand that - they are both an absence of information. I think it's something that depends on your needs - if you need a string, and an empty string conveys something important, then the null should stand for "no information provided", in case there should be a default. Then again, in most cases, there's no difference between "specifically no data" and "no data provided" - for example, someone's middle name. Whether they just don't have one or never gave it, is there really a difference that matters?

  102. Different join algorithms by Anonymous Coward · · Score: 1, Informative

    I guess that by "nested loops" you really mean deep joins, e.g.

    select books.title, publishers.address, cities.timezone
        from books
                  join publishers using(publisher_id)
                  join cities on(address_city=city.name);

    PostgreSQL - and presumably most of the other DBs - will guess how many rows will match based on a precomputed statistical analysis of the tables and choose one of several different join algorithms, as appropriate. One of the possible algorithms is nested loops, i.e.

    for b in books
        for p in publishers
            for c in cities
                if b.publisher_id = p.publisher_id
                      and p.address_city = c.name ....

    This is obviously very inefficient in the cases where the data sets are large; you'll get much better results using other techniques using e.g. hashing, or a merge-sort type approach. What indexes are present is also important.

    PostgreSQL has the "EXPLAIN ANALYSE" command that you can use to find out what strategy it has chosen for your query. Just about the most common FAQ on the PostgreSQL mailing lists is "Why is PostgreSQL using an inefficient method and ignoring my indexes?". The answer is nearly always "its statistics have got out of date, run a periodic cron to update them" or "it is confused about the relative cost of reading from disk and sorting in memory, tweak something". Less often the answer is "add another index" or "re-write the query".

    By poking around a bit you can nearly always get it to do the right thing. In your case, if PostgreSQL really is taking 18 hours vs. 5 minutes (200x slower), then do go and ask on the lists. Someone is sure to help if you can show an "EXPLAIN ANALYSE" output. It could be that MS_SQL is faster, but I find it inconcievable that the difference is that great.

    1. Re:Different join algorithms by Klaruz · · Score: 1

      Yup, oracle runs the same way. Though shalt update thy statistics.

      Interesting enough, oracle and postgresql use a similar read consistancy model. I know mssql is based on sybase which (did) use locks. I wonder what they're using nowadays. Read consistancy used to be oracle's big selling poing (and one reason it's slow and locks are fast).

  103. Nevermind the security implications by ttfkam · · Score: 1

    Proper security is not determining the bad things and preventing them. It's determining what is acceptable and rejecting everything else.

    This is true for programs just as it is for programs, including but not limited to database engines. In a sufficiently complex environment, very few people can wrap their heads around every possible combination of variables and logic -- especially when coding with a group. Better to code to what you know is right and reject the rest. It's the only way to be sure.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  104. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Richthofen80 · · Score: 1

    Your points about MySQL are spot-on. If you set 'allow nulls' on an InnoDB database table fiend to be off, and fail to populate that field in an INSERT statement, MySQL puts in an empty string in that field. Logically, it should throw an error, I would assume.

    I wouldn't mind a mode where I could choose how to handle non-nullable fields where no data is present (or write some sort of SQL error handling Stored Procedure).

    Also missing are proper quoted / non-quoted syntax checking, so I don't try and stick an int value into a varchar field, etc. Heck, up until 4.1, you couldn't even do a

    SELECT ...

    UNION

    SELECT ...

    with either of those above SELECT's containing a subquery. Wasn't documented, either, and I had to pour through forums to find out why it didn't work.

    However, some of the features I mentioned above are actually why people prefer mysql, they would prefer the database didn't bark at them, it allows for more rapid prototyping of web applications if you don't have to validate all those fields against empty string conditions.

    --
    Reason, free market capitalism, and individualism
  105. Autovacuum by Anonymous Coward · · Score: 0

    In the forthcoming version 8.1, Autovacuuming is part of the backend and should "just work" without much user intervention. In current versions a separate process autovacuums at dynamically-adjusted intervals. Alternatively you can run it manually from a cron job. If you install from a package like Debian's it will all just work.

    For the curious who don't know what we're on about: PostgreSQL transactions can be isolated from each other to some greater or lesser extent, depending on what your application needs. So if you have many concurrent transactions, some will be seeing the newest state of the data and others will be seeing older data from the point in time when they started, while the disk will also contain data that has just been added and not yet committed. So when data is deleted it cannot be immediately removed from the disk as some old transactions may still be referring to it. Vacuuming is the process of reclaiming the disk blocks used by old deleted data. These reclaimed blocks can either be reused for new data (VACUUM) or returned to the operating system (VACUUM FULL).

  106. Sure there is a difference: by Kristoffer+Lunden · · Score: 1

    It's the difference between an empty bucket and no bucket. In some cases, an empty bucket is as useless as no bucket, but there is still a significant difference.

    1. Re:Sure there is a difference: by einhverfr · · Score: 2, Interesting

      No. It is the difference between a bucket you *know* is empty and a bucket that contains an unknown.

      --

      LedgerSMB: Open source Accounting/ERP
    2. Re:Sure there is a difference: by Anonymous Coward · · Score: 0

      My original comment made it quite clear that I understand the difference you're referring to. My question is only meant to apply within the context of the example I gave.

  107. Re:Friendster by ttfkam · · Score: 2, Insightful

    And Friendster was also slower than tar for a very long time. In addition, when you make changes in Friendster, you may have to wait for those changes to become visible to others. They have some very aggressive caching.

    On second thought, who knows? Maybe it used to. That would explain the constant downtime and speed problems.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  108. MySQL(tm) supports enough to host R/3... by Christopher+B.+Brown · · Score: 1
    1. MySQL supports all of the Oracle features you need to build and operate an enterprise software system.

    Ummm... no. MySQL does not have user-defined data types, object-relational extensions, full support for the CHECK constraint (a big one IMHO), views in a stable release, updatable views, rules, stored procedures in a stable release, synonyms, support for more than one autoincrement column per table, automatic conversion of code pages between client and server, nested transactions, complete trigger support, access privilege grouping, access to multiple databases in one session, multi-master replication, gateways to other DBMSs, XML data and transformation tools, and better tools for recovery from failures.

    Actually, as of somewhere between 4.0.x and 5.1, MySQL(tm) does gain "enough" functionality to be able to (in some sense) support the operation of THE "enterprise system," namely SAP R/3.

    It was interesting to watch the presentation by the MySQL guys at OSCON last month; I think that at some point they actually did mention that they had introduced all of the functionality actually required by SAP R/3.

    Note that SAP R/3 does not require:

    • Triggers
    • Foreign keys
    • Significant "domain" functionality / CHECK CONSTRAINTS (e.g. the lack of verification of date values in the database is not an issue; even on Oracle, R/3 uses plain CHAR fields for dates)
    • Stored procedures

    R/3 does all of those sorts of things (as much as it does them) in the application, that is, in the several gigabytes of ABAP/4 code.

    In principle, I don't think there's anything that was needed to support "enterprise software" like R/3 aside from the introduction of the InnoDB transaction manager.

    You may want to object and say, "Oh, but I mean for developing NEW enterprise software, not stuff written for IMS back in the 1970s."

    To which my response would come in two parts:

    • Well, the Business Strategy at MySQL AB has clearly chosen the above route. Unless you're planning to pay them $Millions in licensing fees, you're not a market; you're an irrelevant consumer.
    • And if your desire is not to support legacy application that make less than the most primitive use of the DBMS, then clearly your "use case" doesn't fit with this, and you should probably look at something else.

    A year ago, I was puzzling over the MaxDB deal; the only scenario that made any sense about it was for this to represent an opportunity for MySQL AB to, by supporting MaxDB for a while, to figure out the exact minimum set of features that they need to add to their own product in order to attract SAP AB's interest the next time they feel the need to rattle sabers at Oracle over licensing fees.

    Considering that this is a route into playing high level games with some of the biggest "totally proprietary" vendors out there, that should cause concern for anyone in the free software community...

    --
    If you're not part of the solution, you're part of the precipitate.
  109. Solved: CREATE INDEX id1 ON T1 (lower(x)); by Anonymous Coward · · Score: 2, Informative

    > Postgres does NOT support case-insensitive string
    > comparisons. Or, more exactly it does, but you
    > end up doing full table scan and converting
    > everything into upper/lowercase

    The case-insensitive comparison is done like this:

    select * from T1, T2 where lower(x)=lower(y);

    If you have normal indexes on x and y, this won't use them and you'll get a sequential table scan. To be useful for this query, you need indexes on lower(x) and lower(y), e.g.

    CREATE INDEX idx1 ON T1 (lower(x));
    CREATE INDEX idx2 ON T2 (lower(y));

    This is described on the reference page for CREATE INDEX.

    I suggest that you ask on the mailing list next time you find a "showstopper" problem - people really are using PostgreSQL for serious applications, and an obvious thing like this would have been fixed long ago.

    1. Re:Solved: CREATE INDEX id1 ON T1 (lower(x)); by melted · · Score: 2, Interesting

      I know this, smartass.

      Now try the same for Unicode (i.e. non English) strings. Your lower(x) doesn't work for them.

      The first approach suggested by you has horrible select performance and leads to full table scans (that's on top of not working with international chars).

      The second approach screws up INSERT performance, which would be OK if it worked well with Unicode strings. Which it doesn't.

      So next time before you unleash your righteous criticism on someone, do some hands-on testing.

    2. Re:Solved: CREATE INDEX id1 ON T1 (lower(x)); by tgl · · Score: 1

      The unicode upper/lower stuff works fine in PG 8.0 (except on Windows, where it will work fine in 8.1). I think your information is obsolete.

    3. Re:Solved: CREATE INDEX id1 ON T1 (lower(x)); by alyandon · · Score: 2, Informative

      If you truly believe Unicode support is fundamentaly broken in some way then why not help the project out by filing a bug report with a specific example that demonstrates the problem?

      The instructions for filing a bug report are at:
      http://www.postgresql.org/docs/current/static/bug- reporting.html

  110. CPanel is very isp friendly by Christopher+B.+Brown · · Score: 2, Informative
    ISPs use MySQL(tm) because cPanel includes a bunch of tools that use and support MySQL, and numerous ISPs use cPanel.

    That's the primary reason, as far as I can see.

    --
    If you're not part of the solution, you're part of the precipitate.
    1. Re:CPanel is very isp friendly by Zandall · · Score: 1
      So, if it is true, why don't we see more ISPs using cPanel with PostgreSQL ?

      It seems you're not completely correct about the real reasons, since cPanel does include PostgreSQL configuration tools...

    2. Re:CPanel is very isp friendly by Christopher+B.+Brown · · Score: 1
      The recent fragmentary support for PostgreSQL in cPanel is more a joke than anything else. My hosting provider (which uses cPanel) now does provide "vague" PostgreSQL support, which essentially doesn't work.

      In any case, recent addition of non-support is irrelevant. cPanel has supported MySQL(tm) for years and years now, including having a barrel of tools that depend on MySQL(tm).

      --
      If you're not part of the solution, you're part of the precipitate.
  111. Postgresql is very ISP friendly too. by Some+Random+Username · · Score: 1

    I should know, I offer both mysql and postgresql for all our hosting customers. The only difference is postgresql allows more fine grained permissions and is easier to administer.

    Postgresql lets you add users just fine, you don't need to install it for each system user, that's just crazy. You do the same as you do with mysql, add a user (and a database for them is a good idea too).

    And the reason to use postgresql isn't because its "heavy", whatever that means. Its because mysql intentionally corrupts data on you. Set a column to not null, then don't insert anything in that column. Instead of getting an error like you should, it will put a 0 or a "" or something similar depending on the column type. Try inserting an int too big to fit in a column, sorry no useful errors from mysql, it will just chop the number down to fit. People who want their database to store the data they put in it, instead of changing it on them should use postgresql. Or anything but mysql more accurately.

  112. If you know your company uses Oracle... by PCM2 · · Score: 1

    ...why increase the risk of your development process by switching back and forth? Oracle is available under a free development license. You don't need to buy additional licenses to develop applications on Oracle, only to deploy them. You can have a completely separate Oracle install as a test base and you won't have to worry about switching back and forth from PL/SQL (or "recompiling," though it seems foolish to hard-code your SQL queries in C).

    --
    Breakfast served all day!
    1. Re:If you know your company uses Oracle... by CaptainZapp · · Score: 1
      ...why increase the risk of your development process by switching back and forth? Oracle is available under a free development license.

      Maybe so that his customers have a choice between an awfully expensive database engine, coming with awfully expensive support or a free alternative (which may also come with expensive support).

      If the app can really be adapted that easily I think the guy or his company would be stupid not to offer such an option to customers who can't afford awfully expensive DBAs

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

  113. well patch it dear Henry by pbhj · · Score: 0, Troll

    I only did a very quick search but truncation of data fields doesn't appear to be in the Bugs database. Have you submitted it, please give the #.

    If you have submitted, I apologise, otherwise cut some slack and help the cause.

    1. Re:well patch it dear Henry by pbhj · · Score: 1

      Yee-haw, my first troll rating!!!

  114. MySQL PostgreSQL by Anonymous Coward · · Score: 0

    As someone that's done a lot of code on top of both MySQL and PostgreSQL, I can tell you, the difference is like night and day. MySQL can handle crappy web apps that barely need a real database at all, but the gap between that and everything else is like the grand canyon. It lacks almost all features that are absolutely required for non-trivial apps. E.g., it's just recently that it even had stored procedures! That's sad.

    PostgreSQL has all sorts of really important stuff like stored procedures, triggers, nested queries, GIS/GiST indexes (rtree/PostGIS), asynchronous notifications, etc.. It also doesn't force your app to be GPLed. I think 99% of people currently using MySQL don't realize they changed the client library license, even for the newer 3.23 series.

    The reason people used to use MySQL for web stuff was that MySQL was really easy to set up, could run on Windows, and let you write sloppy SQL. The same people probably write HTML that doesn't validate. PostgreSQL is now easy to set up and can run on Windows. It still doesn't let you write sloppy SQL, and that's a good thing.

  115. #1 problem with Postgres... by Evro · · Score: 1

    As someone who's been using PgSQL in production environments for years at several companies, I can sum up the biggest drawback with Postgres in a single word:

    VACUUM

    --
    rooooar
  116. AUTO_INCREMENT by RAMMS+EIN · · Score: 1

    That, and watch out for AUTO_INCREMENT. That's one really useful extension in MySQL that many other databases don't implement (they don't need it, because they have a more generic system). If you use AUTO_INCREMENT columns and insert NULLs in them, you'll have to rewrite that code, as it won't do what you want in postgres.

    --
    Please correct me if I got my facts wrong.
  117. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Anonymous Coward · · Score: 0

    MS SQL Server: ... Troubled security history.

    Nice and objective. Not.

    At least Microsoft deals with it's security issues promptly. Unlike, say, Oracle.

  118. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Anonymous Coward · · Score: 0

    Your MS SQL bit seems a bit harsh:

    tightly integrated with Windows in terms of memory management.

    Um, what specifically does it do that the others don't? There are plenty of apps that'll reserve a chunk of memory from the OS (CorelDraw springs to mind) and there are open APIs to do this.

    Troubled security history.

    ONLY if you left the TCP/IP administration port open to the internet. (Which is a really stupid thing to do.) Firewall that off or restrict your server to named pipes and there've been no problems.

  119. clustering "out of the box" by Doktor+Memory · · Score: 1

    While it's true that MySQL 4 and 5 support "clustering" out of the box, it's actually a somewhat misleading statement. MySQL's clustering support is actually an entirely different database engine from MyISAM or InnoDB, much in the same way that MaxDB is. Cluster is actually something called NDB (Network DataBase), which Mysql AB acquired from a european telco (I think Vodaphone, but don't quote me on that) and is slowly integrating into the MySQL codebase.

    NDB has some interesting design features, but it is not a plug-and-play HA solution for MySQL. It imposes some very serious limitations on queries and datatypes -- differences that basically make it a worst-case-scenario subset of the limitations of MyISAM and InnoDB. Additionally, running NDB requires running a number of specialized daemons that are administered in a substantially different fashion than the rest of mysqld, and which are, to put it charitably, a bit on the undocumented and flaky side.

    Mysql AB appears to be working pretty hard to integrate NDB into their codebase, and I expect that in another 2 or 3 years it will be a very compelling solution. But for now, it's an interesting toy and nothing more.

    --

    News for Nerds. Stuff that Matters? Like hell.

  120. What Friendster did by PCM2 · · Score: 2, Informative
    That's what Friendster used, the MySQL binaries you can download from the mysql.com site?
    No, they did not. InfoWorld ran a case study recently on exactly what Friendster did with MySQL. They tweaked it in practically every conceivable way and customized it heavily (with a lot of support from MySQL AB). Friendster is pretty much the quintessential "bleeding-edge" MySQL shop.
    --
    Breakfast served all day!
  121. Re:One thing to consider - collations and Unicode by Anonymous Coward · · Score: 0

    Um... btree index on lower(field)?

  122. Novell must have known about this by G3ckoG33k · · Score: 1

    Novell to Offer MySQL Network - 9 Aug 2005. From here:

    "SAN FRANCISCO (LinuxWorld Conference & Expo) - Novell and MySQL AB today announced an agreement to deliver enhanced, combined support for key components of the popular open source LAMP infrastructure stack. Under the reseller and joint-support agreement, the only accord of its kind between a Linux* vendor and MySQL AB, Novell will now offer subscriptions to the MySQL Network commercial database service directly to its customers. As a result, customers can now deploy a true enterprise-class open source foundation for their IT infrastructure with confidence."

    Of course MySQL AB must have made Novell aware of this before it happened, SCO vs Novell is fairly well known in the industry... Maybe MySQL AB are just getting ready for Novell's takeover of SCO? After all SCO owe Novell quite some money and maybe MySQL wants to be on the SCO "I owe you" list too. Investing in debts anyone, may that be done?

  123. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by einhverfr · · Score: 1

    To tell you the truth, my RDBMS's are in order of preference:

    PostgreSQL, FirebirdSQL, DB2, MS SQL, Oracle, MySQL.

    Oracle is a nightmare largely because it tries to replace too much of the OS's function, so tuning it is extremely complex. This means that you can expect the time (and hence cost) required to develop and tune a database in Oracle to be much higher. With MySQL, this cost is almost nothing, but the cost of having invalid data in your enterprise database might be even higher.

    --

    LedgerSMB: Open source Accounting/ERP
  124. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Anonymous Coward · · Score: 0

    Troubled security history.

    Back that up. Other than MSDE being installed without an SA password (which is really just a problem with uneducated admins) what exactly is this "troubled security history" ?

    Because I say you're full of it.

  125. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by einhverfr · · Score: 1

    To an extent, I can understand that - they are both an absence of information.

    Not really. NULL reprensents the value of "unknown." If you follow the empty string IS NULL analogy, then maybe a 0 in an INT field should evaluate as NULL too. But it doesn't for good reason.

    For example, lets say that I am evaluating damage on houses in Mississippi following Hurricane Katrina. There is a huge difference between an absense of damage (0, empty string) and an unknown quantity of damage (NULL).

    --

    LedgerSMB: Open source Accounting/ERP
  126. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by einhverfr · · Score: 2, Informative

    No other RDBMS has had the number or severity of viruses target it as MS SQL Server. Need I remind people of the SQL-Slammer worm? And this was not about blank SA passwords (unlike previous worms).

    SQL-Server holds the dubious honor of being the host for the virus which spread around the world fastest.

    --

    LedgerSMB: Open source Accounting/ERP
  127. A redistributable? by ttfkam · · Score: 1

    You mean a Microsoft installer file named something like postgresql-8.0.msi? A single, redistributable file like that?

    Looks like there's a file just like that in the Win32 zip download for PostgreSQL. Just bundle up the appropriate install file with your app and you're set.

    Available via FTP and bittorrent for your convenience. Admittedly, it wouldn't have helped you two years ago, but it's been there for at least the last six months or so.

    What was that MSDE advantage again?

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:A redistributable? by DrXym · · Score: 1
      No, I mean an executable with no UI that doesn't install help, extraneous drivers, development files, admin tools, readme's, contribs - just the DB and core tools. Your installer run the executable with a few command line params to set the admin account and it installs silently. Such an installer would probably be half the size of the full install.


      On top of that it must be able to install multiple times on the same machine so that many apps could ship with their own DB engine without interfering with each other. That means being able install with different ports, install paths, service names to keep the processes distinct from each other.

  128. MySQL's major downside by Anonymous Coward · · Score: 0

    I haven't seen anybody mention this yet, but MySQL has one major downside that the other databases don't: its developers.

    The MySQL "gotchas" are widely known and cited here. Sometimes somebody will reply that it's fixed in a beta version, or you can use an option to fix it in a beta version, or it's fixed in the latest release version.

    I don't care.

    I simply cannot conceive of any developer who is remotely qualified to work on a database who would make the choices that have led to these gotchas. The gotchas themselves are bad. But they are merely a symptom of a bigger problem - the incompetence of the developers. These are guys that confuse 0 and NULL, for fuck's sake!

    Until new developers take over, or the existing developers say something like "yeah, I don't know what we were thinking, that was a fucking moronic thing for us to do", I simply won't be able to trust MySQL. Who knows what other gotchas are lurking in the wings?

    I realise it sounds like FUD, but I'd really like a MySQL fan to explain how it is that they can trust developers that make so many basic errors.

  129. CIDR support by chud67 · · Score: 1

    MySQL is great for some things, but we use PostgreSQL at my job because it supports CIDR:
    http://www.faqs.org/rfcs/rfc1519.html
    If you have a table in your database full of IP addresses, this is invaluable because you can query blocks of IP addresses using CIDR notation.

  130. PostgreSQL is "more relational" by Anonymous Coward · · Score: 2, Interesting

    If anybody here has actually studied database theory, you know that the relational model allows you to do a lot of cool things. For instance:

    #1 updateable views (these are like subroutines calls in programming language: they allow you to abstract and refactor)

    #2 arbitrary database contraints (these let you say, for instance, that tuple X refers to a tuple in relation A OR relation B, but not both. or that the string in attribute Z must not contain spaces).

    #3 real type constraints: can't store integers into a string attribute, and vice-versa

    #4 user-defined types: need to store IP addresses, JPEGs, XML data, etc, and declare constraints.

    #5 arbitrary relational expressions. for example, I'd like to join two tables and then project the result, then join the result with something else. Compare with arithmatic: most languages let you nest and group expressions arbitrarily: A + ((B*C+2) * D)

    Once I design my database using relational principles, I have to find an actual physical database to implement it with. Since there are no relational databases today (except maybe Dataphor), I have to settle for an SQL database. Now. Which should I choose? Open source is usually more flexible, let's see how MySQL and PostgreSQL fare:

    MySQL

    #1: no updateable views. In fact, no views at all in any release version.

    #2: No triggers to implement these.

    #3: ugh, no

    #4: no

    #5: yes, finally they have sub-selects, which is a wordy way of writing out relational expressions, but that's the best we can do with SQL.

    Let's see how PostgreSQL meets my needs:

    #1: no updateable views, but you can intercept inserts and updates and send them to your own code.. good enough.

    #2: simulated with triggers, we can do it.

    #3: yes

    #4: yes

    #5: yes, sub-selects here too, and Postgres had them longer

    So, if the relational model is a "10", and MySQL is a "2", then Postgres is at least a "3" or "4". I.e., MySQL is a SUBSET of PostgreSQL. Maybe if you're hacking together a blog or LiveJournal or something, you can away without having this stuff (heck, you can probably just use flat files). But for any real database app that involves money or requires accuracy, I'll stick PostgreSQL.

    Remember folks, the purpose of a database is DATA INTEGRITY, not data storage. Once you figure this out, like Codd did in the 70's, you'll be a much better programmer, and you'll laugh at stuff like MySQL (just like Lisp programmers laugh at BASIC programmers).

    1. Re:PostgreSQL is "more relational" by Anonymous Coward · · Score: 0

      So, if the relational model is a "10", and MySQL is a "2", then Postgres is at least a "3" or "4".

      I basically agree with you there. Where we differ is in the conclusion. In my opinion neither DBMS is acceptable, and you have to either put most of the logic in the code or pay money for a "real" database. I generally choose to put most of the logic in the code, and just use the DBMS for storage, indexing, and concurrency. Between MySQL and PostgreSQL, it really doesn't matter.

    2. Re:PostgreSQL is "more relational" by Anonymous Coward · · Score: 0

      pay money for a "real" database.

      The point is though, the "real" databases as you call them, are still SQL databases and still a pain in the ass for someone who's looking for relational operations. If PostgreSQL is a "3" then Oracle is a "3.5", and that's as high as you'll ever get. MySQL doesn't even show up on the radar.

      The database industry is messed up beyond belief. Imagine if the only programming language available was FORTRAN. Oracle FORTRAN, MyFORTRAN, PostgreFORTRAN, just different versions of the same crap. And then when somebody suggests, hey, let's make a language where you can do arbitrary stuff, define your own types, refactor into packages, packages, objects, etc, clean up the syntax, wouldn't that be so much more productive? And everybody else tells him, STFU, FORTRAN is teh STANDARD and it does everything I need. That's what databases are like today. Oh well, a rant for another time I guess.

      I generally choose to put most of the logic in the code

      This isn't how to design a robust application. People figured this out in the sixties. Maybe that's why you can't tell the difference between PostgreSQL and MySQL?

      What happens when you switch applications? When you get fired and then new guy writes in a completely different language? You'll change your song pretty quick. I've seen plenty of DBs gone to shit because the previous guy thought "well, I'll just put my constraints in the code, because I'm teh awesome", then he's gone and a new guy comes in and trashes the DB, and the project has to be started all over again. Or at least, the new guy has to waste time re-implementing the logic that should've been factored out into the DB.

    3. Re:PostgreSQL is "more relational" by Anonymous Coward · · Score: 0

      >if the relational model is a "10", and MySQL is a "2", then Postgres is at least a "3" or "4".

      So how do you rate Oracle and the like then??

  131. Comparison Grid by Joe5678 · · Score: 2, Informative

    I'm not sure why I don't see this mentioned yet, but this wikipedia article has a great grid that compares major database systems.

  132. The importance of a middle name by mangu · · Score: 1
    in most cases, there's no difference between "specifically no data" and "no data provided" - for example, someone's middle name. Whether they just don't have one or never gave it, is there really a difference that matters?


    Well, there is a *big* difference: different middle names apply to different persons. For instance, if the police is looking for a "John Wayne Holmes" and look into a database, then there is a vital difference in knowing if a certain "John Holmes" just doesn't have a middle name or omitted to put a "Wayne" in there.

    1. Re:The importance of a middle name by Anonymous Coward · · Score: 0

      So what you are saying is that the police have specific need for a difference between null and "". Seems to me the original poster understood and even pointed that out - your needs define whether there is a difference. In a large number of cases, the difference between "" and NULL is completely academic. Many other replies seem to miss this too, opting for correctness rather than understanding the realities involved.

  133. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by killjoe · · Score: 1

    You are working off an old sheet.

    Oracle 10G is as easy if not easier the MS Sql. It also costs the same feature for feature. Oracle has now matched MS on price on every level.

    --
    evil is as evil does
  134. PostgreSQL SCO "relationship" by tangledweb · · Score: 5, Insightful

    So what exactly is the difference between the MySQL-SCO relationship and the PostgreSQL-SCO realtionship that were announced at about the same time?

    MySQL has only one commercial vendor, who helpfully call themselves MySQL AB, so even Slashdot readers can understand what they sell. So SCO made a deal with them to compile and test a certified MySQL binary for SCO.

    PostgreSQL has had a number of failed commercial vendors over the years, but one current one is EnterpriseDB. Maybe not having the word PostgreSQL in the company name confused slashdot readers who think Walmart sell Wals?

    eWeek report it as the same deal. "SCO has added open source database vendors MySQL and EnterpriseDB to its partner list, said SCO President and CEO Darl McBride"

    What is the difference?

    Oh, I forgot. This is slashdot where MySQL is evil because they charge for some things and where we all sit around and pretend that MySQL does not have transactions and that PostgreSQL vacuum is a good thing.

    Yay for Postgres/Perl. Boo for MySQL/PHP. Can I have mod points now?

    1. Re:PostgreSQL SCO "relationship" by einhverfr · · Score: 1


      Yay for Postgres/Perl. Boo for MySQL/PHP. Can I have mod points now?


      Lol. I wish I could mod you funny just for that line.

      Can we start a PHP v. Perl. v. Python flame war now?

      Disclamer: I code in all three languages....

      --

      LedgerSMB: Open source Accounting/ERP
    2. Re:PostgreSQL SCO "relationship" by Anthony+Boyd · · Score: 2, Insightful
      So what exactly is the difference between the MySQL-SCO relationship and the PostgreSQL-SCO realtionship that were announced at about the same time?

      Well, anyone who glances at my posting history will know that I'm not exactly a fan of the PostgreSQL community (although the technology is looking good in 8.1). However, I'd prefer to dislike PostgreSQL for legitimate reasons, so let's clear up that press release that you linked to. It mentions the company, EnterpriseDB, and says they "make the PostgreSQL database." However, the PostgreSQL fans here on Slashdot have pointed out that EnterpriseDB is just one of a few companies that offer commercial branches of PostgreSQL. EnterpriseDB supposedly doesn't own it, control it, or speak for it. They are separate entities. The PostgreSQL developers apparently want to distance themselves from this, which I think is the correct move. In fact, I think they should be doing it more loudly. At least enough so that I don't have to. :)

      Yay for Postgres/Perl. Boo for MySQL/PHP.

      If PostgreSQL really does distance itself from EnterpriseDB and SCO, then yes, yay for them. But if you want, we can still dislike them for other reasons. As for MySQL, I think they really have made a blunder here. In fact, they've made two. They made the mistake of bragging about their deal with the devil in a press release, and then stuck with it as people began to voice concerns. So yeah, boo on MySQL.

      Of course, despite the booing, I'm still hoping MySQL will do a 180 degree turnaround on this. Their community -- both employees and users -- is very friendly and productive. The communities that have sprung up around other database products are typically missing one of the two (friendly but not productive, or productive but not friendly).

    3. Re:PostgreSQL SCO "relationship" by Wabbit+Wabbit · · Score: 1

      Well, I was gonna mod you up, but I'd rather post instead.

      Toss in Ruby, and we can have a four-way!!!

      --
      Nothing is inexplicable; only unexplained -Tom Baker, Doctor Who
    4. Re:PostgreSQL SCO "relationship" by einhverfr · · Score: 1

      Nah.... LARP sounds, well dorky.

      LAMP implies that it sheds light on things, but LAPP is a better name implying ruggedness and an ability to survive and perform quite well under very adverse circumstances.

      Therefore while we could throw in Modula (Linux, Apache, Modula, PostgreSQL), I think it is better if the languages start with the letter 'P' ;-)

      --

      LedgerSMB: Open source Accounting/ERP
    5. Re:PostgreSQL SCO "relationship" by Anonymous Coward · · Score: 0

      Therefore while we could throw in Modula (Linux, Apache, Modula, PostgreSQL), I think it is better if the languages start with the letter 'P' ;-)

      Which is why I do all my web coding the real men's way.

      Latex, ASCII, Minix, and Pascal.

      It may not be pretty, but it sure runs fast. :P

    6. Re:PostgreSQL SCO "relationship" by jadavis · · Score: 1

      What is the difference?

      The difference is, that PostgreSQL is in no way dependent upon EnterpriseDB; whereas MySQL is entirely dependent upon MySQL AB.

      PostgreSQL has survived, and even accelerated development, through numerous companies and individuals with varying degrees of involvement.

      SCO has a track record of making huge problems for companies that they work with. If they make huge problems for MySQL AB, the MySQL product is in serious danger, and so are all the customers. MySQL is actively involving SCO, and possibly risking a lot. We don't know, but anyone who uses MySQL has a legitimate reason to worry.

      If SCO makes huge problems for EnterpriseDB, that's unfortunate, but does not risk the PostgreSQL product.

      At a time like this, I'm happy that my company uses PostgreSQL, which is not controlled by any one company.

      PostgreSQL vacuum is a good thing

      When did that become a myth? Autovacuum has been touted for a couple releases now, and in 8.1 it's integrated into the backend. Users no longer have to worry about it at all (although like many performance parameters, it's still tunable to a degree).

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  135. useful comparisoin of SQL implementations by harlows_monkeys · · Score: 1

    There's a very interesting and details comparision of the SQL support of several databases here.

  136. Re:One thing to consider - collations and Unicode by Anonymous Coward · · Score: 0

    Learn what functional indexes are, dumbass.

  137. Re:One thing to consider - collations and Unicode by Anonymous Coward · · Score: 1, Informative

    > as of right now there's no proper collations/unicode support in PgSQL, aside from storing character data in UTF-8.

    Yeah, dipshit: the solution is store your fucking character data in UTF-8.

  138. They ask for it because it's a branding issue by mgkimsal2 · · Score: 1

    But people ASK for it because it's what they've been offered all over the place, it's what they've used at other hosts, and it's what everyone else is using. It's a circular issue. If people *WANTED* postgres support in all their hosting accounts, ISPs would deliver it. They just might find it a bit harder to set up. But then more people would know about it, and then ask for those pg apps by name in the future.

    I tried to use postgresql years ago and it had a (ridiculous) 8k per row limit. There were many things I couldn't do with that, mostly involving community/forum type sites. Look at where PHP/MySQL exploded - hosted community/forum sites (phpbb, etc.) Not saying the code is good or bad, but it met a need, people used it, and it grew from there. Theoretical standards don't stand a chance in the way of people getting their needs met. And I now fear it'll be years before anyone can mount a serious challenge to MySQL on the lower end now. It's not just about introducing a new system, it's about branding and mindshare now, something which was up for grabs 7-8 years ago. It's MySQL's game to lose now.

    1. Re:They ask for it because it's a branding issue by rnturn · · Score: 1

      ``If people *WANTED* postgres support in all their hosting accounts, ISPs would deliver it. They just might find it a bit harder to set up.
      Where does this idea come from? Is issuing:

      createdb username

      all that difficult. Heck, it could be made part of the user account setup script.

      ``I tried to use postgresql years ago and it had a (ridiculous) 8k per row limit.''

      I recall when that was true but it was ages ago; V6.x or, maybe, a very early V7.x release. (BTW, V8's been out since January.) You really ought to take another look at PostgreSQL.

      ``There were many things I couldn't do with that, mostly involving community/forum type sites.''

      But there are some very nice packages out there nowadays that do support PostgreSQL. Try a search at Freshmeat.

      --
      CUR ALLOC 20195.....5804M
  139. Good god, folks by melted · · Score: 1

    It's NOT fine, neither on Windows, nor on Linux. I've tried both just two weeks ago. Try it yourself.

    1. Re:Good god, folks by Anonymous Coward · · Score: 0

      If the tgl that you're replying to is who I think it is, then you're replying to Tom Lane one of the core members of the PostgreSQL dev team. So I think you need to try it again...

  140. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Kalzus · · Score: 1

    One feature I'm aware of that is otherwise uncommon among most Windows programs is that MS-SQL tries very tightly to match a specific amount of physical memory in use, and tries very hard to trim its belt if some of its text or data segments end up in the swapfile. Most Windows programs don't go through the trouble, and a port of MySQL or PostgreSQL to Windows likely doesn't do this, making this feature a win for MS SQL.

    --
    "The Devil does not know a lot because He's the Devil, He knows a lot because he's old." -- unknown
  141. Try functional indexes with Unicode strings by melted · · Score: 1

    Try functional indexes with Unicode strings, then come back and we'll talk. Until then, shut the fuck up.

    1. Re:Try functional indexes with Unicode strings by allanw · · Score: 1

      Works fine for me Mmaybe you need to initdb your cluster with something that isn't SQL_ASCII. (it defaulted to UTF-8 for me)

  142. SQL Loop example? by Anonymous Coward · · Score: 0

    I (and probably any other DBA reading Slashdot) don't follow what you're talking about. Please post an actual example of this SQL loop you speak of. Do you mean correlated subqueries?

    1. Re:SQL Loop example? by einhverfr · · Score: 2, Informative

      The nested loop is a type of query plan not a type of SQL Statement. It is hence a feature of an implimentation and not of the language.

      For example.

      Suppose I do:

      SELECT * from mytable_1 where f_key IN (select p_key from mytable_2 where condition IS TRUE);

      The simplest way to try to do this is to select every p_key from mytable_2 where condition IS TRUE and then query table_1 for the row in which mytable_1.f_key = mytable_2.p_key

      This is the nested loop. It wasn't too long ago when nested loops where the default query plan for all types of joins. Now (for obvious reasons) they are the plan of last resort. More likely, PostgreSQL would choose a merge join for this type of subquery, or so we would hope.

      Subqueries used to be popular when all joins were handled via nested loops because you could force the RDBMS engine to run fewer loops by forcing the inner-most subquery to be the one returning the fewest rows. Nowadays, all really good RDBMS's rewrite subqueries as if they were joins and will try to do other query plans on them instead.*

      Does this make sense?

      My favorite nested loop nightmare was when PostgreSQL was running a nested loop against an empty table thousands of times and eating up CPU activity doing it. Three seconds or so of doing something entirely meaningless.....

      * This is not always possible. I have written many queries looking for possible duplicate entries into a database. These often run nested loop query plans because of the complexity of the search conditions in the self join.

      --

      LedgerSMB: Open source Accounting/ERP
  143. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by asdfghjklqwertyuiop · · Score: 1

    Part of the definition of NULL is that it is not equal to anything, not even itself. Try this on a compliant database sometime (like postgres): 'select 1 where null=null'. You should get nothing back. This is what the 'is' operator is for, testing to see if something is null. 'select 1 where null is null' will give you a row.

    Empty strings on the other hand are equivalent to other empty strings. They also have a type and a length, NULL doesn't.

  144. Re: Free markets (OT) by Anonymous Coward · · Score: 0

    > I agree that the US economy isn't *completely* a free market economy, but it is *principally* one.
    > And what I meant by my original comment is that I believe that market forces should for the
    > most part be allowed to operate unimpeded.

    Sure, you guys are all in favor of the free market - unless the government decides to compete. Even if a majority of people (screwed by HMOs and high-priced health care) voted for a single-payer system, you'd probably scream "socialized medicine!" at the top of your lungs.

    If you want to see how free markets can screw people, learn about how the rural U.S. was provided with electricity by co-ops because the power companies wouldn't do it. That was the turning point for American agriculture that brought it out of the 19th century and enabled us to enter the post-industrial/information/service economy. But the power companies were too short-sighted to see what a boom in productivity it would create - they just saw no short-term profits and said no thanks.

  145. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Anonymous Coward · · Score: 0

    Really?

    How about dual core CPU pricing? How much EE cost per CPU? I can continue.

    It only can be matched if you are big enough and beg long enough to get a hefty discount.

  146. Getting Rid of People With a Clue... ? by Prometheas · · Score: 1
    Blah, blah, Oracle is hard. Get a DBA and a real developer. This is what they're paid for.
    Oh, that's right, you want us to get rid of the people with a clue, because you have to pay them. Brilliant! So I guess we'll call you at 3am on Sunday morning when our servers crashed, we have to restore from rollback segments on our failover cluster... oh wait. MySQL can't do that.

    Please understand I have the utmost regard for craftsmanship and specialized professionals... in part because I am a specialized professional with a craft, myself. DBAs... in-house programmers... honestly, these professionals are very, very expensive. If using MySQL means I can save (between the DBA and programmer) well over $100,000 a year, I'm afraid market realities make my choice an easy one.

    It might help to think of the matter in non-IT terms: some companies have lawyers on payroll; the majority of companies don't. The same is true of DBAs and Programmers... these are tasks that are largely outsourced to consultants.

    Also consider that advancements in technology (including software) generally wind up obsolescing (to varying degrees) the roles of specialized professionals.

    Where's your neighborhood printer? In the corner, at the other end of a USB cable. In industrial design shops, 3D printers are starting to do the same to sculptors.

    Returning to the actual software in quesiton, MySQL is nice. It's not amazing, but it doesn't by any means suck. If using MySQL can save you some bucks, time, and effort, go for it. Postgres is fine, too... especially now that VACUUM() operations are configurable in the db's conf files... still waiting for it to be 99.999% transparent issue, however (eg, when someone that uses postgres might actually find themselves asking at an odd moment, "vacuum? what's that good for?")... it'll be for postgres' own good, I assure you!

    1. Re:Getting Rid of People With a Clue... ? by allanw · · Score: 1

      8.1 (now in beta) has the autovacuum daemon built-in, which looks for updates/deletes to tables and automaticly vacuums them when they reach a certain threshhold.

    2. Re:Getting Rid of People With a Clue... ? by Anonymous Coward · · Score: 0

      Keep in mind that mysql/postgresql doesn't save you on dba salaries - without costing you in other areas: these are simpler products with less functionality.

      If you can get by with them - great, then you should probably do so. But if you've got critical data, vast amounts of data, or very complex applications - you can easily *save* money by paying a dba - rather than having programmers set up a simple database.

      Look no further than reporting - which can kill performance on most transactional applications. Oracle/DB2/Informix/Sybase all have partitioning and parallelism solutions that can offer 40x the performance that mysql & postgresql's single-threaded queries can provide.

      > Returning to the actual software in quesiton, MySQL is nice. It's not amazing, but it doesn't by any means suck.

      Well, it's deviation from standard sql, its silent truncation of numeric data & varchars, its inability to protect validity of a simple date column all are just examples of why it really does suck.

      Regarding VACUUM - there are reasons why running something like VACUUM as a batch process is good: it allows your transactions to focus on only what must be performed not on tasks that can be done later. The benefit is speed. There should be no problem in scheduling batch processes to run on a database - for backups, reorgs (vacuum), stat collection, data quality analysis, etc.

      Back to stats - running ANALYZE will get your stats for you in a batch proces. Why collect statistics? So that the optimizer can figure out the best way to run a query. The better the stats, the better the optimiser the faster the query (Side note: this is an area in which every database *kills* mysql - moderately complex sql). So, you want comprehensive & up to date stats. But what happens when you've got a table with 200 million rows in which you're adding 10 million a day? Collecting stats on that table can take 30 minutes - and hammer the database at the same time. You don't want this during your peak hours - you want to schedule this for 2:00 AM.

  147. Re:Spatial databases...transactions? by UnanimousCoward · · Score: 1

    Last time I looked into this, MySQL didn't support spatial with InnoDB which means that you couldn't use spatial with transactions. What about PgSQL?

    --
    Twelve-and-three-quarter inches. Unyielding. This wand belonged to Bellatrix Lestrange.
  148. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by einhverfr · · Score: 1

    One feature I'm aware of that is otherwise uncommon among most Windows programs is that MS-SQL tries very tightly to match a specific amount of physical memory in use, and tries very hard to trim its belt if some of its text or data segments end up in the swapfile. Most Windows programs don't go through the trouble, and a port of MySQL or PostgreSQL to Windows likely doesn't do this, making this feature a win for MS SQL.

    With PostgreSQL you shoudl be able to tell it how much memory should be available for various types of operations. But you are right. Having part of a working set in a swap file is a very Bad Thing(tm) for an RDBMS.

    --

    LedgerSMB: Open source Accounting/ERP
  149. Answers: by einhverfr · · Score: 4, Informative

    1: ANSI is "Hello World" MySQL is '0'

    2: ANSI is error, and abort the inserting transaction. MySQL inserts 'Hell'.

    Another case in point:

    mysql> create table test (
            -> test numeric(4,2));
    Query OK, 0 rows affected (0.05 sec)

    mysql> insert into test (test) values (10000000);
    Query OK, 1 row affected (0.01 sec)

      mysql> select * from test;
    +--------+
    | test |
    +--------+
    | 999.99 |
    +--------+
    1 row in set (0.00 sec)

    So if this number was important and meant something (which it would in production) you just entered bad data into your database!

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:Answers: by fferreres · · Score: 1

      >2: ANSI is error, and abort the inserting transaction. MySQL inserts 'Hell'.

      If you assign a value to a CHAR or VARCHAR column that exceeds the column's maximum length, the value is truncated to fit. If the truncated characters are not spaces, a warning is generated. You can cause an error to occur rather than an warning by using "strict" SQL mode..

      Thus, worst case is that MySQL inserts 'Hell' ... and issues a warning ... (which is not the same). If you where to use an older mysql version, you could use TEXT to not have the trailing spaces removed (or use wait for ... 5.xx gamma).

      --
      unfinished: (adj.)
    2. Re:Answers: by cloudmaster · · Score: 1

      You take raw data from a user and insert it into your database without doing any range checking? You execute SQL statements that involve boolean operations on strings? No wonder you're dissapointed in the behavior of various RDBMS backends - you're a bad programmer.

    3. Re:Answers: by Anonymous Coward · · Score: 0

      Boolean operations?! Some of us call that string concatenation.

    4. Re:Answers: by einhverfr · · Score: 1

      You take raw data from a user and insert it into your database without doing any range checking? You execute SQL statements that involve boolean operations on strings? No wonder you're dissapointed in the behavior of various RDBMS backends - you're a bad programmer.

      Of course you should check. But not understanding the need to check in the backend makes you a bad DBA.

      What if your programmer checks for the wrong number of characters? If you have 10 applications inserting information into your database, how sure are you that all this information is checked properly?

      This checking is your last resort to keep the data sane. It is not the end all and be all of checking.

      You take raw data from a user and insert it into your database without doing any range checking? You execute SQL statements that involve boolean operations on strings? No wonder you're dissapointed in the behavior of various RDBMS backends - you're a bad programmer.

      The bahaviour I cited as *unique* to MySQL. It is not used by "various RDBMS backends" because it is a fundamentally at odds with the relational model.

      If all you want is a simple store for the information of your program, use BDB. That is exactly what it is designed to do. It even has trasnaction support. But if you want an RDBMS, then make sure you know what one does, understand the relational model, and understand the principles of good database design before you get started. Examples of these principles include:

      1) Date's Central Rule. (Coined by Chris Date.)
      2) Normalization theory.
      3) Relational algebra (what is a Cartesian product, for example)

      To this, I also add Occam's Razor. What William of Occam said (which gets back to principles 1 and 2 above) translates (from Latin) as "One should not needlessly multiply entities."

      If you don't understand these things, you are hardly qualified to have an opinion of the usefulness of *Relational* Database Management Systems. Use BDB instead.

      --

      LedgerSMB: Open source Accounting/ERP
    5. Re:Answers: by cloudmaster · · Score: 1

      What if your programmer checks for the wrong number of characters? If you have 10 applications inserting information into your database, how sure are you that all this information is checked properly?

      If the programmer doesn't know the size of the fields he's inserting in to, then he's a bad programmer. Furthermore, if the programmer depends on the DBMS's behavior in edge cases, he's a bad programmer.

      When I have 10 apps inserting data into my database, I'm sure they're doing it right because those applications have been tested, and ere written by competent programmers.

      The rest of your reply is a straw man - I have quite a bit of database experience, both as a DBA on multiple systems and as a developer targeting database backends, not to mention formal education.

      Anyway, I agree that MySQL should behave according to the ways that the others do, largely on principle alone. The examples you cited, however, are areas where the behavior shouldn't really matter. No competent user will see those situations, and no developer should ever depend on the oucome of those things. When I develop for databases, I consider that kind of thing (inserting an out-of-range number, etc) to be an undefined behavior. Not coincidentally, I have never had a problem with MySQL or any other DBMS - relational or not - in those edge cases.

    6. Re:Answers: by einhverfr · · Score: 1

      I think that from a programmer's perspective, you are right about the necessity for QA, etc. in one's applications. THe programmer should not rely on the database to do error checking.

      I also think that from a relational database perspective you are very wrong. The database is there to manage your data. The database should not rely on the programmer to do error checking.

      The programmer perspective is a usability/programing perspective. The database perspective is a data management perspective. It is from this latter perspective that Date's Central Rule arises. I would never hire a DBA who thought that error checking in the backend was unnecessary simply becuase it is the DBA's job in part to ensure that there is consistant and meaninful data in the database. You cannot do this as a DBA without resorting to backend error checking.

      --

      LedgerSMB: Open source Accounting/ERP
    7. Re:Answers: by mw · · Score: 1

      You cannot check integrity at the application level.
      simplified example:

      create table counter (
          cnt integer;
      );
      insert into counter (cnt) values (1);
      update counter set cnt=cnt*64;
      repeat a few times, and you get wrong values in mysql. what do you do in mysql? reading one value at a time into your application, calculate and write back. good luck!

    8. Re:Answers: by jadavis · · Score: 1

      When I have 10 apps inserting data into my database, I'm sure they're doing it right because those applications have been tested, and ere written by competent programmers.

      What about when you have 9 live applications, and the 10th is in testing phase? If it inserts bad data, it could screw up the other 9 applications.

      And the answer is NOT more application code. That requires an enormous amount of redundant code. If every application does it's own consistancy checking (both coming from and going to the database), you're virtually talking about reimplementing a database product in an application library. And all that code needs it's own testing and has it's own performance problems. And that code can be highly dependent on the physical structure of data, and usually requires massive restructuring when the data schema changes to accomodate application #11.

      Why not just let the database give you an error if you violate a constraint? It's simple, and it tells you exactly where and what the problem is without affecting other applications. Plus, making schema changes is no big deal because you can easily use views to make sure that old applications are supported.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    9. Re:Answers: by Anonymous Coward · · Score: 0
      and ere written by competent programmers

      Yeah, the competent never make mistakes.

      And nobody ever wants to do ad-hoc manual updates in their tables.

    10. Re:Answers: by cloudmaster · · Score: 1

      Don't test on live data?

    11. Re:Answers: by cloudmaster · · Score: 1

      I'm not saying that error checking in the backend is not needed - I'm saying that, with properly designed applications, it should never be needed. I'm always as restrictive as possible with the data being inserted, use well-tested stored procedures when possible so the programmer has fewer places to screw up, etc. But it's my feeling that all of that should be largely wasted time, because it *should* never be needed. Then again, I think insurance in general shoudl be wasted money - but that sure a heck doesn't mean I don't carry health, auto, personal property, etc insurance... :)

      The point is, anyone coming across the discrepencies in MySQL's error conditions was doing something wrong. Ergo, the programmer shares the blame - it shouldn't all be "well, MySQL is teh suck", 'cuz the programmer is also teh suck. :)

    12. Re:Answers: by jadavis · · Score: 1

      It's really hard for me to believe that every application that touches the database is as rock-solid as the release of a database server. And when you have different groups working on different projects, one group will always have to wonder "maybe that other group put in some inconsistent data?".

      Then, presumably, each developer would have access to a spec detailing how the data in the database should look. And every new application you need to accommodate might change that spec. It's easy to have the database handle that spec, so why not just let the database do it? That way you don't have a million versions of a spec floating around and hope that every application adheres 100% all the time, for every query.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    13. Re:Answers: by einhverfr · · Score: 1

      The point is, anyone coming across the discrepencies in MySQL's error conditions was doing something wrong. Ergo, the programmer shares the blame - it shouldn't all be "well, MySQL is teh suck", 'cuz the programmer is also teh suck. :)

      Personally I stopped using MySQL when it did not yet support transactions and have not looked back because PostgreSQL has a richer feature set. When I worked with MySQL I never had these issues either. However, I would not trust my data to it as a strategic decision.

      But it's my feeling that all of that should be largely wasted time, because it *should* never be needed.

      The database is almost always accessible via applications that the programmer has no control over, btw. These include database administration tools. These tools almost always simply pass the query as is back to the database manager.

      Secondly, something like:

      "update mytable set my_qty = my_qty + 1" is dangerous in a programming perspective because the program is never able to adequately check the bounds of my_qty. Thus rollovers are allways a possible problem. Not a likely problem if your field is big enough, but a problem which is serious enough to take it seriously.

      As for a case where this might happen. Imagine I have a shopping cart program. The shopping card program has a feature whereby I can increase all prices by a fixed percentage.

      Let's say I update all prices by 20%. If my application is doing the bounds checking, I have to select each row, add the percent, check the bounds, and reinsert it again. If the database can do this for me, I can just do something like:

      update parts set sellprice = sellprice * 1.2;

      Even a qualified where statement does not make this operation safe. Yet the above example is a textbook example of what the SQL language is supposed to be able to accomplish.

      So MySQL's behavior is bad insofar as it prevents MySQL from being able to adequately fulfill the capabilities of the SQL language in a safe manner.

      Your RDBMS isn't just a storage engine. If that is all you need, use BDB. It is an application and with a language interface. MySQL is fine if all you want is a storage engine. If you want a real RDBMS, however, it falls way short.

      --

      LedgerSMB: Open source Accounting/ERP
  150. error in the migration guide by subtropolis · · Score: 1

    page 8, 2.5 Maintenance Differences

    The first word in the paragraph should read 'PostgrSQL' i believe.

    Interesting guide, thanks.

    --
    "Our interests are to see if we can't scale it up to something more exciting," he said.
  151. GPL by bill_mcgonigle · · Score: 1

    Now what does it matter if Mysql partnered up with SCO

    When you partner with a company who considers the license you distribute your software under invalid, you've got problems.

    When you partner with a company who is actively trying to ruin the livelihoods of your customers, you're going to have problems.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  152. gotcha! by CowbertPrime · · Score: 1

    A critical responsiblity of the dbms is to ensure data integrity independently, that is: the dbms should have the native capability to never have to rely on and/or trust the accessing client to sanitize or validate input data. This means that it is more desirable for a query to fail than for the dbms to try and guess intention of or worse, "correct" the query if the query will result in a constraint violation. There should be no so-called "undefined" behaviors. If an outcome of a query won't be deterministic, it should fail (excluding things using an auxillary prng for obvious reasons), or barring that, at least emitting a warning. The speed of the query should always secondary to the resulting integrity of the data.

    Several MySQL gotchas have been documented on stable versions. Many of these are egregious pitfalls plaguing this dbms. Some of these are just plain violations of SQL (i.e. playing with the definition of NULL or column types behaviors like VARCHAR), to outright altering input.

    Finally, the reliability is atrocious. Since there is no "repair table" option for innodb, I have to fetch a backup copy of the db because it gets corrupted so easily. The concept of supporting atomic transactions is made irrelevant if the physical portion of the engine still gets trashed in a way requiring major manual intervention.

  153. More MySQL bugs with dates by einhverfr · · Score: 1

    PostgreSQL:

    chris=# select date '99999-02-01';
            date
    -------------
      99999-02-01
    (1 row)

    chris=# select date '2005-02-29';
    ERROR: date/time field value out of range: "2005-02-29"

    I.e. there is a Feb 1, 99999, but not a Feb 29, 2005.

    For MySQL:

    mysql> create table test ( test date );

    mysql> insert into test (test) values ('0000-00-01');
    Query OK, 1 row affected (0.00 sec)

    mysql> insert into test (test) values ('2005-02-29');
    Query OK, 1 row affected (0.00 sec)

    mysql> insert into test (test) values ('99999-02-01');
    Query OK, 1 row affected (0.00 sec)

    mysql> select * from test;
    +------------+
    | test |
    +------------+
    | 0000-00-01 |
    | 2005-02-29 |
    | 0000-00-00 |
    +------------+
    3 rows in set (0.00 sec)

    Note that MySQL suffers from a Y10k bug. Not a big deal for normal work but I can see scientific uses where this might be an issue. Furthermore, it allows days, months, or years to be zero in inserted dates. Let me just schedule an appointment for January 0, 2007..... Or Feb 31, 2006.

    --

    LedgerSMB: Open source Accounting/ERP
  154. But can you use all the features at once? by bigtrike · · Score: 1

    For quite some time you couldn't use a table type which supported both referential integrity AND transactions at the same time in MySQL.

  155. Back to the original question though by einhverfr · · Score: 1

    How have MySQL and PostgreSQL changed over the years? Are the points from 6 years ago still valid?

    PostgreSQL has matured greatly over the last 6 years. Six years ago it was a PITA to do any prototyping on because you could not drop a column from a table. You could not change the size limit of the variable, etc. There were few easy to use admin tools. And more.

    Today, PostgreSQL is probably the most flexible open source RDBMS, is *rock solid* (only errors I have gotten in the last four years were either bugs in extremely obscure corner cases which were already fixed by the time I found them or were the result of hardware failures). I have used PostgreSQL for moderate OLTP databases and for prototyping a few OLAP projects. There are a number of good GUI tools (PGAdmin) and good web-based tools (PHPPgSQL). But I still prefer the command line.

    MySQL has also evolved in important ways. The attitude of the company has changed from "You don't really need these features" to "Would you trust your data to a program progressing as rapidly as PostgreSQL?" to "Ok, we want to impliment the entire ANSI SQL standard." 4.1 was a step in the right direction with UNION and subselects supported (albeit not in ways that perform well). 5.0 should be a further improvement, especially with strict mode, but they have a long ways to go to impliment a system which is as enterprise-capable as PostgreSQL was six years ago.

    At the same time, PostgreSQL is moving into even newer territory. Some projects such as DBI-Link are bringing at least part of the SQL/MED (Management of External Data) standard to PostgreSQL. 8.1 will have two-phase commit for distributed transactions, and better data warehousing capabilities. Projects such as Bizgres are promising to bring parallel execution of queries to PostgreSQL also, perhaps allowing it to compete with Oracle 10g in the areas of business intelligence etc. And companies such as Affilias have developed open source replication systems (which could be used in multimaster configurations with a sufficiently small number of masters though these configurations are largely undocumented). And with PostgreSQL 8.1, the backends will vacuum the database automatically. In short none of the arguments against PostgreSQL from six years ago will hold true after this next release (expected within the next few of months).

    There are a few rough spots still in PostgreSQL. If you use off-the-shelf software and never put any information in any tables, the planner can get tricked into doing a nested loop join against an empty table. This can kill performance. If the database doesn't get vacuumed every few billion transactions, the transaction counter wraps around which is a Bad Thing(tm) because transactions in the future are now hidden by MVCC. In practice this rarely happens becuase if any reasonable percentage of your queries are writing updates to the database, you will get slow performance after a fraction of this number. Bit if it happens, you are in Trouble(tm). Even with the new release it will be possible to set this up so that this can happen, but it should not be easy.

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:Back to the original question though by nconway · · Score: 1
      And companies such as Affilias have developed open source replication systems (which could be used in multimaster configurations with a sufficiently small number of masters though these configurations are largely undocumented).


      Can you elaborate on this?
    2. Re:Back to the original question though by davegaramond · · Score: 1

      Basically I agree with your points. Automatic vacuum management has, for far too long, been one of Postgres' quirks. Even older databases like Interbase/Firebird (and newer ones like InnoDB) never impose this manual vacuuming 'labor' onto their users. I hope Postgres solves this problem (along with the OID wrap thingy) once and for all.

      One other thing Postgres will need to work on to catch up with the other kids (especially Interbase/Firebird) is international support (Unicode and friends, among others).

      Then there are smaller things like easier/more integrated full-text indexing (like in MySQL), more efficient TEXT and BYTEA, and other enterprise features like partitioning, XA conformance, parallel queries, etc.

      With the fast pace of Postgres development, one might wonder what will happen 6 years from now :-)

    3. Re:Back to the original question though by Anonymous Coward · · Score: 0

      I could be wrong, but OID wrap arounds are only a problem if you don't vacuum the database. In PG8 tables are no longer given an OID by default. That still limits you to 4billion transactions between vacuums though (because transactions have OIDs as wel..)

    4. Re:Back to the original question though by einhverfr · · Score: 1

      Affilias (which runs the .org TLD) employs Jan Wiek (sp?) who is a member of the core development team. They paid for him to develop a Master-Slave async replication system which is called Slony-I (released under a BSD-style license). Also under development is a synchronous replication solution called Slony-II.

      Now as for multimaster replication, it is possible to partition tables using PostgreSQL's inheritance features and then have each system be the master of one partition of the table. There are a few issues here that need to be dealt with (namely updates to slave partitions would need to be done via dblink or DBI-Link) and this could rase some transactional control issues. However, these could all be hacked on if necessary. Again, it doesn't scale up to, say 100 master servers very well (administration-wise), but it could be used in some limited circumstances.

      --

      LedgerSMB: Open source Accounting/ERP
    5. Re:Back to the original question though by nconway · · Score: 1

      Affilias (which runs the .org TLD) employs Jan Wiek (sp?) who is a member of the core development team. They paid for him to develop a Master-Slave async replication system which is called Slony-I (released under a BSD-style license). Also under development is a synchronous replication solution called Slony-II.


      Right; SL2 will also be multi-master. (Whether it is truly synchronous or not is open to debate if this algorithm is used -- but it is certainly "almost" synchronous, and in any case that algorithm isn't necessarily going to be used.)

      Now as for multimaster replication, it is possible to partition tables using PostgreSQL's inheritance features and then have each system be the master of one partition of the table.


      Ah, I see. That sounds fairly dodgy, IMHO...
    6. Re:Back to the original question though by einhverfr · · Score: 1

      I hope Postgres solves this problem (along with the OID wrap thingy) once and for all.

      Autovacuum has been moved to the backend for 8.1 (in beta now). Long-term I think that the core development team wants a different architecture that handles dead tuples more gracefully. However, nobody has put in the time or effort to make that happen. There are higher priorities at the moment.

      As for OID wraparound, that isn't really a problem anymore. Most tables don't create oid's for rows anymore unless you specify it, so OID's are largely used exclusively for the system catalogs. If you manage to wrap these around.....

      One other thing Postgres will need to work on to catch up with the other kids (especially Interbase/Firebird) is international support (Unicode and friends, among others).

      As long as your unicode doesn't allow for embedded NULLs (the bane of C programming), PostgreSQL supports it.

      Then there are smaller things like easier/more integrated full-text indexing (like in MySQL),

      Like tsearch2?

      more efficient TEXT and BYTEA,

      Not sure what you mean here.

      and other enterprise features like partitioning,

      Possible in pre-8.1, but much more efficient in 8.1. Now you can use check constraints to tell PostgreSQL which partition to look for the data in.

      parallel queries

      The Bizgress project is working on that. Expect it to be in the main codebase soon.

      XA conformance,

      8.1 beta has Two-Phase Commit

      Features people are talking about for 8.2 (no promises though) include SQL-99 compliant PSM support and others.

      --

      LedgerSMB: Open source Accounting/ERP
    7. Re:Back to the original question though by einhverfr · · Score: 1

      No. Transactions have transaction id's. OIDS are different. And transaction id wraparound is far worse than OID wraparound.

      With OID wraparound, you may suddenly be unable to create tables, alter tables, or add rows to talbles with OID's because the unique constraint is violated. This will be an intermittant problem and very difficult to fix.

      With transaction id wraparound suddenly, many transactions in your database (since it was vacuumed last) will suddenly disappear (the executor thinks they "committed in the future." Furthermore, it is possible to accidently roll-back previously committed transactions. This is Very Bad(tm). But you have a few billion transactions (iirc) since the last vacuum before it happens, and if you have any reasonable percentage of updates or deletes, you will get warning signs (sssllllooowwww pppeeeerrrfffoorrrmmmaannccceeee) long before you hit this point.

      --

      LedgerSMB: Open source Accounting/ERP
    8. Re:Back to the original question though by davegaramond · · Score: 1

      Sorry, I meant TX ID wrap around, not OID. I hope from now on (Postgres 8.1 onwards) I can forget about doing vacuuming (except when doing fine-tuning, perhaps).

      tsearch2 is okay, but what I meant was something like a new index type that is directly supported by Postgres (like in MySQL and Oracle).

      Large TEXT and BYTEA columns are not efficient to handle. As of now they do not allow stream or chunk processing (contrast this with the traditional blob data type).

      8.1 has 2PC, but it is not XA compliant yet. I'm not sure if this is a big deal though.

      Yay for Postgres!

    9. Re:Back to the original question though by einhverfr · · Score: 1

      tsearch2 is okay, but what I meant was something like a new index type that is directly supported by Postgres (like in MySQL and Oracle).

      This would be nice at least in that having it immediately available to a larger user/developer base might ensure faster progress. But the trend in PostgreSQL is actually going the other direction. The Core Development Team has decided that a kernelized approach might be better, where the PostgreSQL RDBMS project is completely separate from any add-ons. I understand that a lot of the PL's may be moving out of the backend project at some point. I guess that part of the reason here is so that people don't have to upgrade the core RDBMS in order to get the next version of, say, PLPGSQL.

      Large TEXT and BYTEA columns are not efficient to handle. As of now they do not allow stream or chunk processing (contrast this with the traditional blob data type).

      I see what you mean. It is currently possible to do some sort of chunk processing using substring functions but these are inefficient. The other thing I think would be nice would be if the client libraries could automatically unescape BYTEA fields. This would allow easier processing of these types of fields.

      8.1 has 2PC, but it is not XA compliant yet. I'm not sure if this is a big deal though.

      Hope it will be soon. There is a strong emphasis on standards compliance in the PostgreSQL community so this may be a rough draft but it will be refined. Same with the new support for Roles.

      --

      LedgerSMB: Open source Accounting/ERP
    10. Re:Back to the original question though by jwdg · · Score: 1

      The substring functions aren't that inefficient - if you set the storage type to EXTERNAL (ALTER TABLE foo ALTER COLUMN bar SET STORAGE EXTERNAL) then substring operations on large values will only read the minimum number of chunks required (rather than the whole value). This makes streaming a vlaue realistic. The tradeoff is increased storage space (but for some sorts of data it may not be very compressible anyway) and therefore increased disk time to load it.

    11. Re:Back to the original question though by jadavis · · Score: 1

      I hope Postgres solves this problem (along with the OID wrap thingy) once and for all

      8.1 is in beta, and as I understand it, both those issues are solved. There's integrated autovacuum which uses statistics to determine the best times to vacuum automatically. And OIDs are now not used by default, so wraparound shouldn't happen by accident. There's not much reason to use OIDs on purpose, either.

      international support

      What's wrong with PostgreSQL's international support?

      easier/more integrated full-text indexing

      I happen to like tsearch2. I think the main thing that PostgreSQL should do is have better support for "packages" so that it is easy to install a 3rd party project like tsearch2. I think the fact that PostgreSQL doesn't integrate every last feature into the backend is a strength. It's very extensible, I just think they need to make it a little easier to install 3rd party packages.

      more efficient TEXT and BYTEA

      What's inefficient about them? TEXT is compressed by default. The only thing I would change is allow you to directly access an arbitrary offset of a bytea field.

      parallel queries

      What do you mean by that? PostgreSQL has great concurrent access performance as-is. Are you talking about the 1 CPU per query issue?

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    12. Re:Back to the original question though by jadavis · · Score: 1

      And transaction id wraparound is far worse than OID wraparound.

      Just to clarify, in 8.1 there is integrated autovacuum, and also it detects a possible xid wraparound. The problem is basically eliminated. If you really try to push 8.1 forever without vacuuming, it will start issuing warnings, and eventually errors. Then when you finally vacuum, everything is fine.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  156. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by killjoe · · Score: 1

    Once again, feature for feature oracle costs the same. EE has more features then SQL server enterprise edition and costs about the same even though it has more features and supports more processors.

    --
    evil is as evil does
  157. Transactions, ... by Tetard · · Score: 0, Troll

    Subselects, views, triggers, table inheritance, stored procedures, tablespace management.

    ahem.

    1. Re:Transactions, ... by tangledweb · · Score: 1

      Your grandad rang. He wants his whiney slashdot post back.

      In case you missed it, MySQL has supported transactions since version 3.23 a number of years ago.

      In other news, you no longer need a horse to pull your carriage around. We have this thing called the internal combustion engine ...

    2. Re:Transactions, ... by The+Clockwork+Troll · · Score: 1
      Subselects

      4.1

      views

      5.0

      triggers

      5.0.2

      table inheritance

      Not supported, and for a good reason. It adds no value, only complexity. What can you get from table inheritance that you cannot get from views and more simply? Also completely breaks Postgres' referential integrity (oops).

      stored procedures

      5.0

      tablespace management

      3.23 (and refined in 4.1.0)

      Tetard's stuck in this year

      1999

      --

      There are no karma whores, only moderation johns
    3. Re:Transactions, ... by RegularFry · · Score: 1

      Tell this to my boss, who thinks that sticking with a hosting provider that's rigidly nailed to 4.0.17 is a good thing. Application-level views? Mmm, tasty.

      --
      Reality is the ultimate Rorschach.
  158. Write-heavy scaling by nitelord · · Score: 1

    I have used MySQL behind a multi-million dollar website over the last 2 years, with projected growth it's hard to say weather or not mysql will work well in the future. However with everything I've seen, Postgres and most of the other commercial databases don't really solve the problem of scaling in a write-heavy environment. We've had to turn to creating separate clusters of master-slaves since our writes pretty much consume the slaves. This will eventually grow to a point where adding slaves won't make a difference. I fail to see how clustering or replication is going to help out in this instance. There are a few downfalls to MySQL. I.e. where is the support for master failover without some sort of half assed setup? In my eyes (web developer) data consistancy and roll-back support doesn't matter as much as the ability to scale and failover. In most cases you store critical data outside of your MySQL db, though it is pretty safe to do so.

  159. Re:Minor Detail by Grail · · Score: 1

    "exit" is not in the SQL specification, therefore it shouldn't be accepted by an SQL shell. QED.

    psql uses "\" to denote psql commands, everything else is SQL.

  160. My experience... by OneFix · · Score: 1

    MySQL is best used when you need speed, compatability, and reliabilty.

    MySQL supports load balancing, PostgreSQL doesn't.

    MySQL supports multiple table formats, PostgreSQL doesn't.

    MySQL stays faster on larger databases than PostgreSQL.

    PostgreSQL is best used when you want more features at the expense of everything listed above...

    The choice is really a case-by-case question.

    These are confirmed by this table.

    With MySQL 5.0 close to a "stable" release, all of this will go out the window as MySQL will gain many of the features of PostgreSQL.

    1. Re:My experience... by Anonymous Coward · · Score: 0

      OK, to take them one by one:

      - "MySQL is best used when you need speed" -- this is largely a myth. Sure, it's a bit faster (with MyISAM) for simple SELECT * FROM foo WHERE bar=? queries. For anything slightly more complicated, PostgreSQL smokes it. (Hint: MySQL's planner doesn't keep any statistics, so it has a rather limited set of data to plan its queries with.)
      - "compatibility" -- with what? Ok, perhaps your average PHP script. Certainly not the SQL standards.
      - "reliability" -- erm, OK. Tell that to Wikipedia after MySQL ate their database after a power outage last year. MySQL is getting there slowly, with InnoDB, but remember that PostgreSQL has been rock stable for several years.
      - "MySQL supports load balancing, PostgreSQL doesn't" -- completely wrong, there's a host of different load balancing options for PostgreSQL (Slony-I, dbmirror, ++)
      - "MySQL supports multiple table formats, PostgreSQL doesn't" -- oh no! How is this supposed to be a feature, really? I'd really like one good table format over 11 different ones with different feature sets. (Want transactions? Use InnoDB. Want full-text search? Oops, can't do it without MyISAM!)
      - "MySQL stays faster on larger databases than PostgreSQL" -- this is just plain unfounded. People are using PostgreSQL for terabyte databases without real problems; the question is not how much data it can handle, it's what queries you run against it. (See arguments about query planner further up.)

      Your argument is supposedly confirmed by a table that doesn't say the same as your arguments at all (where's the part about "stays faster on larger databases", for one?), plus it basically equates "speed" with "speed to establish a new connection", completely ignoring options like pgpool. Besides, it largely refers to a beta version of MySQL... not something I'd run in production, but perhaps you're braver than me.

    2. Re:My experience... by timeTumbler · · Score: 1

      i completely agree with this response. But what i want to add is that this "Table," which has become a sort of standard -- since it's the only one -- is ridiculously slanted towards MySQL. It's just not a fair comparison. Some folks i know are trying to put together a more balanced version, but i haven't seen anything from them yet...

  161. You by cxreg · · Score: 1

    are a moron

  162. Who can use those features? by oglueck · · Score: 1

    I don't really have a favourite among the two. I use a DB mostly through EJB containers. So all those nifty features are of no use because the DB layer won't use them. They don't do much more than the standard SQL.

  163. Getting mysql to use indices is not fun by Serveert · · Score: 1

    Getting mysql to use indexes is an art. Just try random things and eventually you'll get it right. I need to use postgres more but it seems like that's not a problem w/ postgres.

    I eventually figured out that mysql doesn't perform well(ie has a hard time using indices) when joining 4 or more tables.

    --
    2 years and no mod points. Join reddit. Because openness is good.
  164. Spatial Data / GIS uses by GISGEOLOGYGEEK · · Score: 1

    PostgreSQL - PostGIS spatial database extention, 300+ functions plus indices.
    MySQL - wimpy generic spatial text format, very limited functions

    PostgreSQL can use the PostGIS extention to hold spatial data and give you full spatial database capabilities .... with all the tasty spatial analysis functions you'd expect - intersections, crosses, buffers, overlays, ... over 300 spatial functions with spatial indices.

    And in the last year or so, PostgreSQL has been available using an windows installer, with PostGIS as an option, making all its power available to those who are not so hot with linux or similar OS's, and dont want to spend 2 weeks figuring out how to compile said software with all features working correctly thanks to the instructions that bare no resemblance to reality.

    MySQL, like many other 'enterprise' databases can hold spatial data in WKT / WKB formats that can be fed to programs that can use it, but it has very limited spatial functions and I dont think it can generate spatial indices. Someone can fill us in on this point, I understand that a spatial extention may be in the works.

    The HUGE benefit of PostgreSQL with PostGIS is that it gives you a full powered spatial database engine which works with OSS GIS softwares and web mapping programs such as MapServer, Grass, QGIS, JumP, etc ... FREE.

    If on the other hand you chose to use the name brand software since MySQL can't do the job, ... ESRI, with ArcSDE installed on Oracle which is their preferred way of doing things, you are looking at a cost of $50,000 in software, plus $18,000 per year in license maintenance fees. These are canadian numbers, which I priced out in January 2005.

    I'd rather spend that money developing a system, instead of just buying the damn software.

    --
    George Bush + Linux = "I will not let information get in the way of the fight against Windows"
  165. Re:One thing to consider - collations and Unicode by oglueck · · Score: 1

    Well, MySQL at least *has* some collation support. The bad thing is how it is used in SQL:
    SELECT X FROM T ORDER BY X COLLATE collation_name;
    This seems nice at first. The catch is the collation names. Imagine you write an application for international customers. A person from Paris would like a french collation, while a person from Israel definitely needs a different collation. So the collation to use strongly depends on the locale of the person who is logged on. Usually people use the ISO country and language codes (en-US, fr-CA etc.) in their applications to define a locale. Those codes are also used in Java's Locale class for instance. Now the MySQL collation names are like this: latin1_german1_ci, latin1_spanish_ci, etc.
    This does not exactly match with anything of the above. And it makes it harder than necessary for developers to select the right collation for a certain locale. You need some kind of mapping table. Moreover you can not be sure that every MySQL installation has support for all the collations you use, because they can be selected at compile time.

    When you compare this with the way Oracle handles that MySQL looks pretty bad. For me Oracle is the only DB that handles collation well-enough from a developer's point of view.

    And hey, what about time zones? When I store a time and date in a DB, it must be well-defined in what TZ the data is returned. Oracle for instance does quite a bad job regarding that.

  166. I always liked PGs createuser and createdb by pain · · Score: 1

    >The one good thing I have to say about mysql is that its multi->user friendly for hundreds of accounts.

    We started out as a "mom and pop ISP" 10 years ago and mysql administration was always a pain in the ass to me. Maybe I don't get it, but I really think a debian box with postgresql installation is a breeze to administer.

    $ createuser mom
    $ dropuser pop
    $ createdb -U mom

    And psql is your friend. It really suffices for most database work.

    At least on debian postgresql is a very good out of the box experience.

    1. Re:I always liked PGs createuser and createdb by pain · · Score: 1

      That should read:

      $ createdb -U mom divorcedb

  167. MySQL BLOWS CHUNKS -- IT *CORRUPTS* REGULARLY by Anonymous Coward · · Score: 0

    In my job at a large govt agency, I run MySQL in a moderately-sized configuration (1-2M records avg) in a 24/7 environment. We are *constantly* having to rebuild the database every few months because the @$#(*&^ thing keeps corrupting itself. We've examined every facet of the system, and have optimized the crap out of it. Now the whole database is running on high-end solid-state disk drives (backed-up, etc). Same problem. When it DOES work, its really, really slow. It can hardly get out of its own way. Our application requires a lot of subselects, and table joins. MySQL doesn't do very well with either of those. As a result, the application is required to do a lot more work for the database, and there's a lot more database traffic overhead than there should be. MYSQL BLOWS CHUNKS MySQL is good for some kinds of web applications where it doesn't have to do anything except get user data. But get it the hell away from you if you have REAL WORK to do. YOU'VE BEEN WARNED

  168. Database stored procedures have sensible uses by Julian+Morrison · · Score: 1

    ...in particular, they are very useful for a process that programmatically transforms many input records into few output, that can't be done in declarative SQL. Otherwise, you'd have to pipe those many input over whatever network to the handler program. A database procedural language can operate on them in-line and without ever constructing or transporting huge data structures - then merely send you the results.

    1. Re:Database stored procedures have sensible uses by NickFortune · · Score: 1
      True enough if you're working in a strongly distributed environment. Not always the case though - a lot of in-house commercial database applications use a central application server on the same platform as the DBMS and networked thin clients for the workstations. If you don't need the distriution, it's an architecture with a lot to recommend it.

      I any case, I didn't say "stored procedures are useless". I said "I've can't recall needing any feature found in Oracle that is absent from PostgreSQL. Stored procedures, triggers and constraints are all part of the PostgreSQL feature set.

      I did say I preferred to keep the logic in the application code where possible, and I'll stand by that; but not at the cost of making more work for myself. Old School I may be, inflexible I ain't.

      Of course, the question then becomes how do you decide where to draw that line between logic that should live in a SP and logic that belongs in an application function. Within broad limits, I think there's quite a bit of room for stylistic variation.

      --
      Don't let THEM immanentize the Eschaton!
  169. No corruption here by shani · · Score: 1

    Our update server gets about 14 updates per second. We've never had MySQL corruption on the box.

    Both of our query servers get between 200 and 300 queries per second, in addition to mirroring the update server, and have never had MySQL corruption.

    Our data is small (about 12 Gbyte), so maybe we're just lucky, but I think heavy activity is probably not the problem.

    We *did* get some corruption once, about 4 years ago. At the time we were paying for MySQL support, pushed our files to the developers, and MySQL was fixed.

    Are you sure it's not a bug in the application?

    1. Re:No corruption here by davegaramond · · Score: 1

      What version of MySQL and what table engine do you use? Have you used MySQL 3.23 and MyISAM (which was the only viable alternatives for several years if you used MySQL)?

      Have you tried googling for 'mysql corruption' or 'cannot open .MYI' or 'myisamchk corrupted'? See how many results? Compare the results with the same keywords, replacing mysql with postgresql.

      It's NOT an urban legend. It happens (a lot!)

    2. Re:No corruption here by shani · · Score: 1

      We switched to InnoDB many years ago, because, frankly, MyISAM had locking problems. :)

      We switched to 4.0 a couple of years ago, because we wanted the mysqldump that supported transactions and thereby allowed us to make a consistent backup without trickery.

      BTW, InnoDB benched at about half the speed of MyISAM for us for a single query. However, we normally have concurrency, and the speed was only about 10% less in this case. And the worst-case performance was seconds rather than minutes, so it was a clear win.

      We haven't seen any problems since we switched away from MyISAM (and had not with MyISAM for a long time either).

    3. Re:No corruption here by davegaramond · · Score: 1

      Agreed. MyISAM seems to be the devil here. And to think that MyISAM is developed by MySQL AB themselves and still has corruption issues after years of being developed, and still haven't caught up with the other engines (transaction, foreign key checking, et al), makes me have less confidence in MySQL AB :-)

    4. Re:No corruption here by MikeBabcock · · Score: 1

      I haven't used MyISAM for years either. We converted for the better locking in InnoDB (although I was excited about Gemini for a while too).

      InnoDB on raw LVM2 logical volumes is how I run things now. Works very well for me, YMMV.

      help-mysql-sd7@mikebabcock.ca if you want to try it and aren't sure how. Sorry for the long E-mail address :-)

      --
      - Michael T. Babcock (Yes, I blog)
  170. Oracle beats OS hands down still 2005 by Anonymous Coward · · Score: 0

    I think Oracle beats both OS databases hands down, more complex the task or more data, better Oracle performs in comparison.

    Spatial data, terabyte level datawarehouses , and very complex nested joins in optimizer makes OS stuff say quack. And then there is maintainability, real-time clusters, backup-recovery scenarios (single transaction cannot get lost in disaster recovery in stuff like banking) while database is online, haven't seen stuff like RMAN's block-level recovery in OS products.

    Oracle just kick's ass in competition. Yes, it has lots of bugs when you look at the list at metalink, but oldest releases are already starting to be very solid stuff (like 9.2.0.6 for example for 9iR2 series)

    In comparison, if PostgreSQL and mySQL compared, Postgre is just lightyears away. Last time I checked mySQL it lacked triggers, sequences, procedures, partioning tables and all the basic stuff.

  171. What about IBM doing business with the Nazis !? by formal_entity · · Score: 1
    If you're not going to use MySQL because of their business with SCO...

    How about not using Eclipse because IBM's business with the freakin Nazis ??!?!? Yeah it's all on CNET too:

    http://news.com.com/2009-1082-269157.html

  172. InnoDB tuning by mparaz · · Score: 1

    A couple of months ago I spent a good ammount of time tuning MySQL/InnoDB for a JBoss/J2EE app. It wasn't fun but I couldn't port the data to PostgreSQL.

    1. Re:InnoDB tuning by Decibel · · Score: 1

      Couldn't port the data? Or the application?

  173. MySQL data corruption by DMNT · · Score: 2, Interesting

    I run quite a big forum, most active in its kind in Finland. One day in June the site just didn't let anyone sign in or show threads or messages. So I login:

    [x@x forum]$ mysql -p x
    Enter password:
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Didn't find any fields in table 'backup_yabbse_instant_messages'
    Didn't find any fields in table 'backup_yabbse_log_activity'
    Didn't find any fields in table 'backup_yabbse_log_errors'
    Didn't find any fields in table 'yabbse_members'
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 168027 to server version: 4.1.11-Debian_2woody1-log

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select * from yabbse_members;
    ERROR 1016 (HY000): Can't open file: 'yabbse_members.MYI' (errno: 145)
    mysql>

    After that I repaired my members table, losing all the rows. Luckily backups were recent enough, losing only 7 latest registered members (of some thousands).

    After that, I occasionally get MySQL error messages from the e-mail warning system, but repair table helped and didn't lose data.

    --
    ?SYNTAX ERROR
  174. Re:Spatial databases...transactions? by Anonymous Coward · · Score: 0

    Everything is made for data integrity in PostgreSQL. It is made simple for the user: Do your stuff, we protect your data.

  175. My experience so far... by laan · · Score: 1

    I've been long time working with Postgres, MySQL and Oracle and I really think both 3 are in different "market" sectors: - MySQL is the best in it's zone, it's fast, easy to use and reliable but IMHO it's not (still) a full RBDMS, what it's not a bad thing at all. It does the work it is supposed to do and does it better than nobody. - PostgreSQL is a wonderful RBDMS but not intended for OLTP-only-non critical data as MySQL is nor intended for the big markets. If there a real good point in Postgres (aside from being a free RDBMS) is that it's rock-solid even more than Oracle (from my own experience). The bad point of postgres is performance with big databases and/or big boxes. - Oracle is not for gaming, not intended for small or medium DBs or boxes, hard to admin and not easy to tune, also expensive but when the big boxes come and the big dbs are there it clearly outperforms postgres.

  176. Stunning. by Anonymous Coward · · Score: 0

    Someone that actually knows something.
    Danke.

  177. MySQL 5.0 and SAP DB by Argon · · Score: 1

    Everybody talks about MySQL 5.0 as if it's just a upgrade to MySQL 4.1. Isn't it a completely different database? Previously known as MaxDB and before that as SAP DB.

    1. Re:MySQL 5.0 and SAP DB by timeTumbler · · Score: 1

      No. It's my understanding that it *is* just an upgrade to v4.1. MaxDB, their SAP version, is the old ADABAS database, and that is an entirely different product. Also, v5.0 is a year late, which is not surprising, since they're adding features like stored procedures, triggers, and views, which most enterprise databases (e.g., PostgreSQL, Oracle) have had for years, and that's hard! Plus, they take a long time to shake out.

    2. Re:MySQL 5.0 and SAP DB by Argon · · Score: 1

      Looks like it's kind of both. It's a merger of old MySQL with SAPDB

      http://www.linuxpipeline.com/betawatch/mysql_bw.jh tml

    3. Re:MySQL 5.0 and SAP DB by Zontar+The+Mindless · · Score: 1

      That article is about two years old. It is also wrong.

      They're separate codebases and have separate developer teams.

      MySQL 5.0 is considerably different from 4.1 - it adds views, stored procedures, triggers, cursors, a couple of new storage engines, and strict data handling (which going to piss some people off, but hey, you can't please everybody), and there are a number of syntax and other changes intended to make it comply with SQL:2003.

      You will not find SAP/MaxDB code in the MySQL sources (or vice versa). It is extremely unlikely that you ever will, either.

      --
      Il n'y a pas de Planet B.
    4. Re:MySQL 5.0 and SAP DB by Argon · · Score: 1

      Okay, I stand corrected. You seem to have insider knowledge about MySQL 5.0.

  178. Dates without year? by vuzman · · Score: 1

    What genius decided that the Slashdot date format should be day and month only?

    1. Re:Dates without year? by Shut+the+fuck+up! · · Score: 0, Informative

      http://ask.slashdot.org/users.pl?op=edithome

      You have about 20 options for date/time display at the top.

  179. Blame GNU's locales by ThreeDayMonk · · Score: 1

    If you use en_US.UTF-8, en_GB.UTF-8, and probably any other en_XX.UTF-8 as a locale on Linux, you'll have Unicode trouble in a lot of apps: not just PostgreSQL. This is due to weirdness in the locale tables on glibc.

    This problem does not affect other European languages, whose tables are coded correctly.

    For a demonstration, look at this file. It shows the erroneous output of strxfrm under en_XX.UTF-8 locales, compared to other locales. Note, for example, how all Japanese kana evaluate to the same value, giving totally broken results for comparisons.

    --
    If your comment title says 'Re: Foo', I'm not likely to read it.
  180. Binding by shani · · Score: 1

    Indeed. I did some benchmarking of MySQL verus Microsoft SQL Server Express 2005 recently.

    MSSQL works about 4x slower if you do not prepare queries properly. Even so, MySQL is significantly faster for the queries that matter in our application (but MSSQL is faster for certain other queries).

    MySQL 4.1 and newer support prepared statements, if you really want them. (I'll benchmark that tonight, now that I think of it...)

  181. Ingres by Anonymous Coward · · Score: 0

    Now that Ingres is open source, surely this is worthy of consideration when deciding which low cost DB to use.

  182. MySQL MAXDB, Ingres + pricing on various DBs by t482 · · Score: 2, Informative

    MySQL MaxDB (formerly known as SAPDB) is comparable with Postgresql in terms of features. It suffers a similar lack of recognition with hosting companies and php developers. Ingres is another "enterprise" ready db that is available open source.

    Who supports XA Transactions?
    MySQL - Not yet (planned in 5.0.12?)
    SAPDB/MAXDB - Yes (limitations?)
    Postgresql - No - in the works (8.1/8.2?)
    Firebird - Yes
    Berkeley DB - Yes
    Ingres - Yes (limitations?)

    Pricing vs Proprietary
    Oracle: $58K CDN per CPU + 10% maint
    DB2: $55K CDN per CPU + 10% for maint
    MS SQL Server: $3K CDN per year per server (enterprise edition)
    MySQL MAX DB: $1,800 CDN per CPU + 10% maint
    Postgresql: Free + Support
    Ingres: Free + support

  183. Comparisons to Oracle by Anonymous Coward · · Score: 0

    Be careful when making comparisons between Oracle and MySQL or PostgreSQL; Oracle is much more than a database. It's more accurately viewed as an information storage and retrieval system when you consider all of the other technologies that come with Oracle; eg. LDAP, JVM, textual search, media repository, geo-location service, etc.

  184. Re:One thing to consider - collations and Unicode by wilcoxon · · Score: 1

    Most databases don't support case-insensitive string comparisons in a speedy fashion. You either use "lc(col) = xxx" or "col like '[Xx][Xx][Xx]'" - both of which mean you are not using any indexes on col.

    I know this is true in Sybase and Oracle at a minimum. Oracle may have recently changed in this regard but I doubt it (it's been a few years since I've used Oracle).

  185. SQL is a proprietary standard, anyway by Anonymous Coward · · Score: 0

    Sigh. No, MySQL is not like Microsoft, you ridiculous troll.

    Seriously, this is one of my pet peeves when people go on about "this dbms doesn't implement this part of the standard" or "you should have been coding to SQL99, not the MySQL documentation". Do you know what the difference is?

    Like my DBMS of choice, the MySQL documentation is FREE (and excellent, btw). Where do I go to get a copy of SQL99 for the same price? (At ansi.org all I see is a link that says "purchase standards", which is a rather sickening contradiction in terms in my mind.)

    Sure, big companies can probably afford to license it for their developers. Web design contractors probably cannot. Besides, no matter what your intentions, you will be *actually* running your code on one of the many available choices; the MySQL manual does a pretty decent job of pointing out where the implementation differs from the spec, and at least gives you the knowledge about "non-standard" features that might help to simplify your life.. whether you use them is up to you.. portability is always an issue, but adhering to a standard that you aren't allowed to look at shouldn't be.

    (Please note, I'm not really arguing for/against MySQL here, just want to point out that referring to the SQL "standard" is a bit like referring to GWB's "complete military service record". Give me a copy before you ask me to read from it.)

    1. Re:SQL is a proprietary standard, anyway by mellon · · Score: 1

      ANSI's model for printing standards is in fact outdated, and that's unfortunate, but it is still a standard. You can implement it without paying any sort of license fee, although you do have to fork over the bux for a copy of the standard. If you can afford to spend tens of thousands of geek-hours building a database management system, you can probably afford to spend $400 sometime during that development cycle to buy a copy of the standard that everyone else, including the other open source databases, implements.

  186. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by RealProgrammer · · Score: 1
    empty strings. They also have a type and a length, NULL doesn't.

    That's analogous to string variables in many programming languages. While PERL will (usually) be happy to tell you that a variable that contains an empty string and an uninitialized variable are equal, under C that will create an agregious, and sometimes elusive, bug.

    --
    sigs, as if you care.
  187. It goes both ways by phlamingo · · Score: 1

    As both a programmer and DBA, I am often disgusted by the atrocious way that most programmers treat the database. Joining tables by scan-and-select, naive use of features, bad assumptions, "it's all just rows and columns" thinking, etc. Modern RDBMSs are very sophisticated tools, with many ways to either shoot yourself in the foot or to provide serious value to the application, depending on the sophistication of the programmers.

    In some cases, yes, you should keep all or most of your logic in your applications. In others, it makes sense to push some of the logic closer to the data. Like everything in this business, it depends on your goals and constraints.

    As for "control-freak DBAs" ... If you got blamed every time some idiot screwed up a WHERE clause, you'd be a bit of a control freak, too.

    --
    I had forgotten how much cooler teenagers look when they are smoking. Oh, wait ...
    1. Re:It goes both ways by grassbeetle · · Score: 1

      I mostly agree. It's a matter of degree. There is a role for well placed stored procedures/triggers in the world... not a big place... but a place. I maintain it isn't because application programmers can't learn relational thinking or to optimize their SQL. I spent years as the performance whipping boy for my company and swam through lakes of bad SQL. Didn't make me want this gunk in pl/sql. Just made me want pound a proper equijoin construction into some skulls. Believe it or not, I'm something of an evangelist for the power of relational operations in a row-by-row thinking company. I've just seen the kind of goo-balls that apps coded in the DB become.

  188. I just got an email from mysql folks by Anonymous Coward · · Score: 0

    since I'm on various lists, apparently the newest version of mysql will no longer be gpl'ed and in addition to upgrade, I'll have to pay $699 for any linux licenses in my shop before I can get mysql updates.

  189. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by asdfghjklqwertyuiop · · Score: 1

    While PERL will (usually) be happy to tell you that a variable that contains an empty string and an uninitialized variable are equal


    Not without warning you about your sloppy programming first:

    $ perl -w
    use strict;
    my $uninit;
    if( '' eq $uninit ) {
            print "equal\n";
    }
    ^D
    Use of uninitialized value in string eq at - line 5.
    equal


    under C that will create an agregious, and sometimes elusive, bug.


    C has no concept of NULL in the same sense that perl and SQL do. In the later, NULL is a distinct entity from 0 or ''. In C, the "NULL" constant is the same thing as 0. That's why it shows up as a wierd bug, because there is no such thing as an uninitialized/undefined/null value in C in that sense. A variable always has a value, just not what you expect.

    This concept is known as ternary logic.
  190. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by RealProgrammer · · Score: 1
    Not without warning you about your sloppy programming first: $ perl -w use strict; I just did:
    $ cat t.pl
    #!/usr/bin/perl

    $str = "";
    if($str eq $foo)
    {
    print "equal\n";
    }
    else
    {
    print "not equal\n";
    }

    $ ./t.pl
    equal

    If you use -Tw as I usually do, then yes, you get the warnings. The point is, however, that to PERL the two are equal, even though it knows an "undef" from an empty string. It's a feature.

    C has no concept of NULL ...

    True, even though C programmers do. As you say, an uninitialized char pointer may have the value 0 or some other randomish number you can't anticipate. The value "NULL" is usually a macro for "(void * (0))"), if I can split a hair, but there's nothing special about that value to the language or a compiler; you may init some pointer to the value 45 and probably not get a warning.

    --
    sigs, as if you care.
  191. Where's the comparison? by Anonymous Coward · · Score: 0

    Let's recap: The only comparison in this slashdot article is a reference to a six year old comparison referenced in Slashdot. That's it. There is no comparison going on here.

    Here's my comparison: starting somewhere in version 4.x, mySQL moved much closer to the SQL standard and other SQL implementations (MS, Sybase, Oracle et al.) than PostgreSQL, particularly in respect to stored procedures, and particularly when being programmed in SQL. (ironic, eh?)

    I have recently checked out the latest versions of mySQL and I am impressed. As for PostgreSQL, it certainly has its strengths, but portable stored procedure support is not among them. Do a quick search of the table of contents for "stored" in the PostgreSQL documentation. Yes, it's buried there somewhere in the documentation but that in itself is telling. The earlier version of PostgreSQL was just plain different. My brief perusal of the current documentation suggests that it hasn't changed in this respect.

    Reading a bit more, I see it hasn't. Input variables for PostgreSQL don't have names; they are numbered: $1 for the first argument, $2 for the second, etc. The only other database language I've seen this is 4th Dimension but that's for procedural scripts, not (the equivelant) of SELECT statements.

    As an SQL programmer, trying to work with PostgreSQL was sheer hell. As for scripting in other languages, I wouldn't know. It seems to me that the PostgreSQL designers care little for common SQL coding.

    I took a job porting a non-SQL database to PostgreSQL. The existing small IT staff chose PostgreSQL. I was hired as an SQL guy because none of them had any real experience with SQL. You should be able to see where this is going. Without going into details, the results were devastating for me.

    1. Re:Where's the comparison? by Anonymous Coward · · Score: 0

      Just a quick retort:

      1. PostgreSQL is well known for being SQL compliant. MySQL 4.x may have got better but I think you'll find that PgSQL is more standards compliant than MySQL or even MS, Oracle etc.

      2. PgSQL can use names for function parameters in PL/pgSQL. Any function written in SQL can be rewritten with PL/pgSQL with very little effort. It's just like a procedural SQL with variables, control structures etc. Well worth the 10 minutes it takes to learn. Also it's very similar to PL/SQL from Oracle (or so I understand)

      3. I've never had any problems using SQL with PgSQL. Everything just works as I would expect. This seems at odds with any other SQL RDBMS I've used.

      The other thing I would like to mention is the support I've received from the news groups has been invaluable. Better than any paid for support I've experienced. Always helpful and knowledgeable.

  192. development tools for postgres by ed1park · · Score: 1

    Can anyone recommend any postgres development tools for windows? So far I've come across this:

    EMS PostgreSQL Manger
    http://www.sqlmanager.net/en/products/postgresql/m anager

  193. Nulls and types by einhverfr · · Score: 1

    In PostgreSQL, NULL's have types.

    If you try to do a SELECT NULL::text::bool you will see what I mean (you will get an error, that you cannot get a bool from a text value). A NULL doesn't mean you don't know its type (this can still be inferred from the column), just that you don't know its value.

    Therefore in PostgreSQL you cannot compare NULL::BOOL NULL::TEXT simply because that is like trying to compare an unknown orange to an unknown apple. It doesn't work. You get an error rather than a NULL.

    I don't know how NULL casts are handled in other RDBMS's (whether you can cast a NULL text as integer or make other arbitrary and invalid comparisons between NULLs). Though I believe that MS SQL assumes that NULLs are untyped.

    --

    LedgerSMB: Open source Accounting/ERP
  194. Discuss the DBs anyone? by ShieldW0lf · · Score: 1

    I offer this as a hook near the top for opinions and discussions about PostgreSQL and MySQL, since the soap opera fans seem to have completely flooded the thread with discussions about SCO.

    Have MySQL sorted out their data corruption stuff yet? Is there clustering support for Postgres yet? Does anyone have anything more useful to contribute than more ranting and conspiracy theories about SCO?

    --
    -1 Uncomfortable Truth
    1. Re:Discuss the DBs anyone? by rubycodez · · Score: 1

      I use mysql for my web site (freebsd jail with no sys v ipc, so can't use postgresql), data corruption still happens with Innodb occasionally because hosting provider reboots machine about every 30 days. Clustering for postgresql can be had now with proprietary products (see SteelEye product family), and is planned for next 9.x release. But I'd rather troll some more about SCO, they suck so mightily and deeply.

  195. Re:Minor Detail by jadavis · · Score: 1

    The server does not care about "\q" at all. The server only accepts SQL queries.

    "\q" is a command for the "psql" program (which is the command-line client that postgres admins usually use). When psql sees "\q" it terminates itself, which is just the client software. The server of course keeps running.

    --
    Social scientists are inspired by theories; scientists are humbled by facts.
  196. Re:Not exactly ... just use MSDE by Anonymous Coward · · Score: 0

    MSDE (yes its Microsoft) is free enough (via MSDN) and works fine for me... at least is the equivalent to an enterprise product.
    Isn't MySQL kinda like MS Access? SQL Express runs rings around both MySQL and PostgreSQL in my humble opinion.

    SQL MSDE http://www.microsoft.com/sql/msde/howtobuy/msdeuse .mspx

    SQL Express (beta): http://lab.msdn.microsoft.com/express/sql/default. aspx

  197. OT: Re:PostgreSQL SCO "relationship" by einhverfr · · Score: 1

    Latex, ASCII, Minix, and Pascal.

    PDF alert?

    It may not be pretty, but it sure runs fast. :P

    Actually I would have thought it would be the other way around. That it might not be fast, but the resulting documents would be pretty.

    --

    LedgerSMB: Open source Accounting/ERP
  198. Sort of by einhverfr · · Score: 1

    Under certain circumstances, MySQL will create a MyISAM table instead of an InnoDB table. Hence transactions are still broken wrt MySQL in my book. For some apps this is not a big deal, however.

    It is also certainly not as bad as truncating numbers........

    As for Subselects. They don't perform too well yet. table inheritance is not planned (but is *really* nifty for things like data warehousing and table partitioning for massive databases).

    Stored procedures? MySQL has those even in production releases (if you write them in C). The beta version only supports Perl.

    PostgreSQL supportes them (out of the box) in SQL, PLPGSQL, Perl, Python, and TCL. You can also add PHP, Java, SH, R, and other languages if you like. I hear the .Net framework is coming soon too (which should make it really easy to port from MS SQL).

    How about:

    Tuple-level replication (MySQL's replication is statement-level which could cause problems in some cases)

    XA or Two Phase Commit

    Table Partitioning

    SQL/MED (in PostgreSQL via DBI-Link)

    User-defined types

    Honestly, there is just so much more you can do with PostgreSQL that it is hardly worth comparing them.

    --

    LedgerSMB: Open source Accounting/ERP
  199. Reply to all those comments by adturner · · Score: 1

    1) Yes, I meant 'vacuum analyze'. Yeah, i've heard about something that does this for me, but gezus, I shouldn't have to worry about installing/configuring something else to get something as basic as this to happen automatically. Not to mention, I don't want this scheduled at certain times of the day, it should just "happen" as changes to the DB happen. Ie. it shouldn't be a batch job operation.

    2) Yeah, I'm familar with phppgadmin. It sucks. It's ugly as sin and doesn't allow me to do ER diagrams like phpmyadmin does (which honestly isn't the easiest thing in the world, but hey it works). The interface isn't nearly as intutive as phpmyadmin and it seems like everything takes 3x as many clicks. For now, using vim is actually easier for my 40+ table DB. :(

    3) Mostly, I find the docs on mysql.com better organized and easier to find what I'm looking for. Honestly, Pg is very well documented IMHO for being such a large application (OSS or otherwise). The one thing that could be improved IMHO was performance tuning which is well documented, but is still seems very much like voodoo.

    4) I've optimized the hell out of the INSERT's under Pg. Tuning postgresql.conf, doing transactions, etc. After talking to the guru's on #postgresql, the best I could get my batch job to run was 28hours (yes I said *hours*). MySQL does it in 8 (still too long, but I could live with it for a while). Dropping my FK's and indexes and doing some really creative coding by loading large (1GB+) portions of my dataset into RAM I've got it down to about 2hours (of course, I can't run any queries during those 2 hours since there aren't any indexes).

    Don't get me wrong, I like Pg. It's definately a lot more powerful then MySQL/InnoDB, I just wish it was easier to use and allowed DBA's to make decisions to be able to trade off performance for reliability (turning off WAL for example, being able to disable FK checks without having to drop/create them, etc).

  200. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by eggnet · · Score: 1

    As far as C strings are concerned, you can have:

    char *str;

    str = "";

    in which str points to a byte in memory that is 0.

    char *str;

    str = NULL; /* basically, 0 */

    In this case, str will point to the memory address 0, which is invalid. If you dereference that, your process will terminate. There is a difference between a null string and an empty string, even in C.

  201. You sir are an idiot by CaptainZapp · · Score: 1
    and have obviously not the slightest clue regarding basic data management concepts. You talk out of your arse without the hint of even a fart of knowledge on the subject:

    While that can be annoying, to be sure, why do people rely on the database to do their data validation?

    Uh, so you really want to rely on some sweat shop programmers in Kuala Lumpur to get all your validation straight? You're really sure that the consultant that came in for a week to fix a legacy Cobol program understood all idiosyncrasies and properties of your corporate data? You guarantee - putting your job, professional reputation and career on the line - that no brain dead clerk in accounting hacks together an Access "application", which corrupts your database? See, I thought not.

    That should be done in the application code long before you ever run an insert or update.

    No, it sure as hell should not. As a matter of fact it's probably virtually impossible to guarantee that you caught any and all mistakes in the application. The complexity goes up exponentientally with the complexity and age of the application. I've interviewed a significant amount of applicants for dba jobs. If any of them would have come up with such a braindead concept the interview would have been concluded at once. There would be no more need to continue.

    If you're trying to insert invlaid data, you're the only one to blame.

    You ever heard of data type properties, unique indexes, declarative constraints, triggers and stored procedures? Either not, or you seem a bit unclear on the concept. Those are exactly the objects that support you in guaranteeing that this really cheaply produced piece of software as well as the illicite front ends from the accounting department rumaging through your corporate data are prevented on the lowest possible level to corrupt your data. Sure, it can still happen, the database engine can have bugs, you can have fundamentally flawed logic in your database code, etc. But the feasibilty for this to happening is exponentiality larger when you rely on the application to guarantee correct data.

    I suggest that you educate yourself before turning yourself into the laughing stock of millions of readers.

    HTH HAND

    --
    ich bin der musikant

    mit taschenrechner in der hand

    kraftwerk

    1. Re:You sir are an idiot by ajs · · Score: 1

      You've entirely misread the grandparent (as, I assume, did his moderators). He has a valid and insightful point which does not contradict your rant (which was uncalled for, even if he was making the assertion you thought he was).

      He's not speaking of data integrity, but of data validation.

      This is a common complaint about MySQL, and I have to agree with the grandparent that it's a spurious one. If you need to guarantee the validity of your data, then your application (perhaps in the form of triggers, perhaps inside your client code) should validate the data. Relying on the database to screen out mistakes in your data gives you a very false sense of security.

      More specifically, MySQL will silently insert data that does not match the input in many cases when the input does not match the type's constraints (e.g. a date which cannot exist). I agree that this can be surprising to a neophyte, but I certainly cannot agree that it is on-par with concerns about data integrity (which is what you were responding to).

  202. Just wondering by CaptainZapp · · Score: 1
    [Posgresql] (free license, but increased TCO).

    Why do you perceive the TCO higher with Postgresql then with MS-SQL Server?

    I'm really curious here.

    --
    ich bin der musikant

    mit taschenrechner in der hand

    kraftwerk

    1. Re:Just wondering by Stinking+Pig · · Score: 1

      Because SQL Server required no tuning in our scenario, and the few tweaks I did try either didn't affect performance or hurt it compared to the "next-next-next-install-servicepack" installation.

      Postgres installed and patched in 5 minutes thanks to RPM, but then required about a week of tuning efforts in which I spent a great deal of time learning database architecture and arguing about the real-world utility of "tune your database" versus "rewrite your application" with the PG developers. At the end of that week Postgres performed very well (with the one exception I noted above), and I was able to document a BKM on installing and maintaining it for our customers.

      Still, the TCO of Postgres was obviously higher: it was higher for us as developers because we had to either rewrite and retest our app or spend that man-week on tuning Postgres. It was also higher for our users, who had to find, read, understand, and use the document I had written before they'd get decent performance (or retrace my steps with the pg mailing lists). Don't get me wrong, I'd still rather use PG than Oracle ANY DAY. I'm just saying that MS-SQL is IMHO not the toy that some think it is.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    2. Re:Just wondering by CaptainZapp · · Score: 1
      Thanks; teaches me once again that it's always worth it to listen to different point of views.

      Coming from the enterprise world of software integration, per seat licensing for database engines can be a major cost factor. And if you don't need the totally hardcore huge database- , thousands of transactions per second -, warehousing -, or advanced replication features of a database engine then Postgresql is a very viable contender in terms of cost effectiveness.

      MS SQL Server is rarely used in such environments, since it's Windows only, and even though you can run serious iron under Windows today, those shops usually run Unix -, IBM -, or even VMS-boxes. Either traditionally, or due to the fact that specific features just don't cut it under Windows (i.e. clustering under TruUnix).

      --
      ich bin der musikant

      mit taschenrechner in der hand

      kraftwerk

  203. This isn't flame fest its useful! by Cronky · · Score: 1
    I have to say that I disagree - this story isn't a flame fest topic. The company I work at currently uses MySQL and we are considering our future database options (eg wait for 5, move to something better etc) and PostgreSQL is one alternative we are looking at. The link to the Metatron article http://www.metatrontech.com/wpapers/mysql2postgres ql.pdf is spot on. And seeing as the original article is so old it is a good time to brind this topic back up.

    This is exactly the kind of story I like to see on Slashdot as it generally encourages intelligent(??) discussion on technical issues.

    And sure folks from both the MySQL and PG camps might get a bit hot headed; but hey ho it makes great reading!!

  204. Uhhh by CaptainZapp · · Score: 1
    5. MySQL's supposed gotchas pale in to comparison to Oracle's.

    I always figured Oracle to be a badly assorted mass of a lot of files preferrably scattered around on a lot of disks. I think the architecture is a mess and that installation, administration and tuning is like a root canal while you get all four wisdom teeth extracted at the same time without narcosis. But...

    If you have a look at this list of MySQL idiosyncrasies you will see why MySQL is simply unusable in an enterprise environment, or even in an environment that relies on the validity of your database transactions.

    That doesn't mean that MySQL doesn't have a legit place, but it's certainly not in the billing environment of a major Telco, or in any billing environment for that matter.

    --
    ich bin der musikant

    mit taschenrechner in der hand

    kraftwerk

  205. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by asdfghjklqwertyuiop · · Score: 1

    In this case, str will point to the memory address 0, which is invalid. If you dereference that, your process will terminate. There is a difference between a null string and an empty string, even in C.


    Not really. C doesn't have a string type like the languages we're comparing it to. In this example you just have one single variable of type 'char *' with a value of 0. *str isn't a different variable, it is just the same variable with an operator (*) applied. That still isn't the same thing as a null/undefined in perl/python/etc where any given single variable can be 0, some other value, or in the totally separate state of being undefined.

  206. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by asdfghjklqwertyuiop · · Score: 1

    The point is, however, that to PERL the two are equal, even though it knows an "undef" from an empty string. It's a feature.


    Actually that ability to compare undef and a value should never have been put into the language. It is just bad programming practice. That's why practically every perl program out there runs with -w and use strict nowadays. I bet perl6 won't even allow that type of stuff, at least not by default.

  207. Re:Comparison of MySQL, PostgreSQL, Oracle, MS SQL by Anonymous Coward · · Score: 0
    A null pointer isn't necessarily represented as memory address zero. That depends on the machine architecture. The compiler is responsible for seeing a constant integer expression whose value is zero and substituting a null value of the appropriate pointer type. Yes, this means (int)x==0 does not imply that (void*)x==0, nor vice versa.

    But it's true that the null pointer is not the same as a pointer to a zero-length string. The null pointer can't be dereferenced, so it's meaningless to try to determine its length.

  208. Why MSSQL sucks by WebCowboy · · Score: 1

    (I'm talking about 2000 heren not "Yukon"/2005 which I admit looks quite promising)

    * MSSQL is too damned expensive for what it does. PostgreSQL has more features and is free.

    * MSSQL's scheme for locking and handling contention is primitive. I've had INSERT and UPDATE queries put on table-level locks at the oddest times. PgSQL NEVER does this, it has quite a sophisticated method of handling concurrent transactions on overlapping datasets (MVCC). If you have many concurrent connections performing a lot of INSERTs and UPDATEs it can be frustrating to manage all the locking in MSSQL.

    * MSSQL is not as standards-compliant as PgSQL. The latter has non-standard extensions but their developers place much more effort on ANSI compliance.

    * MSSQL is not multi-platform. All the others you mentioned will work on Linux, various UNIX flavours and Windows.

    * MSSQL is feature-rich in many ways but lacks other features most of the competition has had for ages. For example, in MSSQL you can return the "TOP x" rows of a set but you cannot do an "offset"--for example, MSSQL cannot return rows 101 to 200 of a set! So, of you are doing a web interface that pages through results you have to resort to clunky hacks. Also you can only do stored procs in TRANSACT-SQL (I eagerly await Yukon's ability do do them in any .NET language though). You cannot create user-defined AGGREGATE functions in MSSQL.

    * MSSQL might be "easy to tune" but one might say that is because there isn't much that can be tuned. If the query plan seems wonky sometimes you just have to accept it or rewrite your query. There ARE more tuning parameters than one might be aware of, however you have to scour the web for a knowledgebase tip or an undocumented/unsupported hack. MSSQL is the antithesis of Oracle in that respect--the latter is extremely tuneable but trying to understand and manage it could make your brain explode.