Slashdot Mirror


Major Changes To MySQL Coming Soon

Meltr writes: "This ZDNET article details some of the coming changes to the MySQL database server. In 4.0, to be released in mid-October: 'support for the Unicode character set, the SSL (Secure Sockets Layer) protocol, embedded database links and multitable updates' and in 4.1, to be released in December: 'nested queries and stored procedures'."

108 of 301 comments (clear)

  1. FULLTEXT search by Swamp · · Score: 3, Informative

    I'm just looking forward to being able to tune the FULLTEXT search function without recompiling the database server!

    1. Re:FULLTEXT search by ekrout · · Score: 2

      But will the sequal to MySQL be as good as the original? ;-)

      --

      If you celebrate Xmas, befriend me (538
  2. Reporting Tools by Anonymous Coward · · Score: 2, Insightful

    Universal Objects has also announced that their Unicode report server has been ported to Linux and is available now. Cheap, multilingual solutions might be what Linux needs for acceptance.. I belive we could beat Microsoft at the whole "total cost of ownership" game here.. What Unicode compliant database software is available free or cheap to use this with?

  3. MySQL other database comparison by Secure42 · · Score: 4, Informative

    It sounds great, MySQL it is trying to implement many features that were missed without loosing speed.
    You can have a look to these comparison between Mysql-PostgreSQL and other open source databases.

  4. Stored Procedures! Yay by serps · · Score: 2, Interesting

    Excellent. One of the reasons my company decided to hold off on porting to mysql was the lack of stored procedures. A pity; now they've moved to DB2 and the moment is lost.

    --
    "Einstein argued that [...] God is not capricious or arbitrary. No such faith comforts the software engineer." ~ Brooks
    1. Re:Stored Procedures! Yay by oingoboingo · · Score: 2

      We've just done exactly the same thing. I miss MySQL's overall simplicity...it makes it really easy to develop quickly. after 6 momths of using DB2, i still feel like it's more in the way than actually helping me get the app developed.

      there's no way we can go back now either...we're an IBM strategic partner (but the upside of that is we get nice hardware to play with for free...where's the Regatta?)

  5. Decent comparison of mysql and pgsql by Khazunga · · Score: 5, Interesting
    Does anyone know of a good comparison of both databases? Not the usual "X as feature A, while Y has not. Y is faster.". These are open-source products, so there's room for design analysis, not just the ZDNet style checklists... There's room to review the design and implementation decisions. This would ideally involve established members of both dev communities.

    What I'd like to see is a profound comparison of mysql and postgresql. I'm a happy user of both, and I currently have pgsql serving a 8 million pageviews/month site, and handling load gracefully. AFAICare, pgsql is at least fast enough. I also never had any reliability/data loss problems with mysql, despite heavy concurrent access. AFAICare, mysql is robust enough. I'd really like to find out what are the core differences in both designs to get a grasp of how fast they may evolve.

    --
    If at first you don't succeed, skydiving is not for you
    1. Re:Decent comparison of mysql and pgsql by Anonymous Coward · · Score: 3, Informative

      Ok you can have a look to these comparisons: -http://www.mysql.com/doc/M/y/MySQL-PostgreSQL_fea tures.html -http://www.geocities.com/mailsoftware42/db/ -http://www.mmlabx.ua.es/mysql-postgres.html (Spanish) -http://openacs.org/philosophy/why-not-mysql.html -http://phd.pp.ru/Software/SQL/PostgreSQL-vs-MySQL .html -http://www.mysql.com/information/crash-me.php

    2. Re:Decent comparison of mysql and pgsql by Anonymous Coward · · Score: 2, Informative

      Ok you can have a look to these comparisons:
      -http://www.mysql.com/doc/M/y/MySQL-PostgreSQL_fea tures.html
      -http://www.geocities.com/mailsoftware42/db/
      -http://www.mmlabx.ua.es/mysql-postgres.html (Spanish)
      -http://openacs.org/philosophy/why-not-mysql.html
      -http://phd.pp.ru/Software/SQL/PostgreSQL-vs-MySQL .html
      -http://www.mysql.com/information/crash-me.php

    3. Re:Decent comparison of mysql and pgsql by Khazunga · · Score: 2, Informative

      Moderators, please read before moderating. This AC posted a bunch of uselesse links. They're either biased (from the manuals of pgsql or mysql), or zdnet-like checklists, mostly outdated.

      --
      If at first you don't succeed, skydiving is not for you
  6. Um, transactions anyone? by FastT · · Score: 2, Informative

    Another Open Source debacle. They add gobs of new features while leaving the most fundamental and important feature untouched (again). Feh.

    Go ahead, flame away, I can take it.

    --

    The only certainty is entropy.
    1. Re:Um, transactions anyone? by Osty · · Score: 2, Insightful

      With the introduction of the Berkely DB table type, MySQL gained transactional support. It'd be nice to have native transactions for all table types, but at least this is better than nothing at all. Of course, if you want to complain about useful-but-missing features, complain about decent stored procedure support (coming, but the keyword here is "decent" -- if they only support one language, like perl, then it becomes useless), foreign keys, subselects (apparently coming in 4.1), and triggers. Of course, the way the MySQL project seems to be going, they're going to end up reinventing the wheel originally designed by Oracle 20+ years ago, while steadfastly denying that the missing functionality is useful up until the point where they announce that they'll be adding said functionality.

    2. Re:Um, transactions anyone? by Osty · · Score: 3, Informative

      To me, the fundamental feature missing is foreign key constraint, which I see is not even mentioned among the new features.

      Exactly! Take a look at http://www.mysql.com/doc/B/r/Broken_Foreign_KEY.ht ml and see why they don't have foreign key support yet. They simply say it's scheduled for inclusion in the "near future" (I'm not sure what their definition of "near" is, but that page has been up for months now, and foreign key support still isn't slated for 4.0 or 4.1). Don't hold your breath, and either switch to a real rdbms (a la pgsql), or continue to work around mysql's deficiencies on an app-by-app basis.

    3. Re:Um, transactions anyone? by Michael+Widenius · · Score: 2, Informative

      Just a note about this: If you are using InnoDB, you will get foreign key support in MySQL 3.23.44 and 4.0.1.

      For other table types, we will add full foreign key support for 4.1.

      People that find cascaded delete very useful, will proably also like the new multi-table delete feature we arlready have in MySQL 4.0

      Regards,
      Monty

  7. Why MySQL ? by Anonymous Coward · · Score: 4, Insightful

    Yes, why ? Mysql is a very popular free sql database system , and I still have problems figuring out why.
    It supports almost none of the sql features I need. The solution to my needs(which includes free/opensource) is PostgreSQL,
    which do supports the features i require(subqueries, locking, stored procedures,views,triggers,other _real_ nice features..).
    One point that often comes up is that mysql is very fast, and it is fast, but atleast for my projects only silghtly faster than postgresql(2-4%),
    and in many special cases posgresql is way faster.
    Also the point of mysql beeing very fast disappears if you use the locking features of mysql, BDB/Innodb tables.
    For me, its postgres over mysql anytime.

    1. Re:Why MySQL ? by pere · · Score: 5, Insightful

      The answer is "because it does the job".

      Most small projects does not need transactions, subqueries or locking. And to really take advantages of such features you need to have some good understanding of databases.

      With mySQL you can actually make fearly decent, fearly fast and fearly stable application without using hours trying to design things optimal, (and actually without not really understanding what you are doing.)

      If you worry about +2-4 percent performance, how to handle peeks of hundreds of hits a second... then you have several good databases to choose from.

      If you should store a few thousand posts, and are hoping for a few hundred hits a day, and your web-application had deadline yesterday, and you are aout to start developing (90% of the web-application of today).... mySQL is a killer!

      (You can use it for other things as well. And it does scale fairly well (so Im told)... but then you should consider several other good databases..like PostreSQL)

    2. Re:Why MySQL ? by brunes69 · · Score: 3, Insightful

      I partialy agree wit this, but I would never base any application of mine on something as incomplete as MySQL (I too use PostgreSQL). Why do you ask? Simple. Who knows how large your project will get, or what substantial new features you will want to incorperate in the future. You may never need locking, but subqueries? C'mon, that is basic stuff. Sure you can get around needing them, but its a big pain in the butt and ends up being much moe inefficient. This is why I alays stick with the best product first, to leave my opions open, and won't have to re-do everything from scratch when I switch from MySQL (non SQL-92 standard) to any other DB.

    3. Re:Why MySQL ? by GooberToo · · Score: 2, Insightful

      Because it is fast.

      Cough, cough. It depends. This by far is not an accurate statement without lots of qualifiers. To make it so, you'd need to quantify many of your project's environmental conditions. I'm assuming all of your projects are 100% readonly.

      Because it does the job.

      The same way MS Access "does the job", only, the Jet database is more advanced. Simply put, if you wouldn't use a Jet Database for your project, MySQL should not be used either. I'm serious. Any project you start and need to select a database, ask your self if you'd use a JetDB here. If the answer is, "no", then walk right on past MySQL too.

      Becasue it is popular and well supported by the community. Because it is "out there", people see others using mysql and end up using the same.

      That's true. I think if you look around, you'll find, to a slightly lesser degree, PostgreSQL is "out there" and being used by real live people too. There are books for it too and the community is pretty strong.

      I for one like MySQL. I dont need subqueries for a simple website, and I sure as hell don't need transactions for it.

      I always get confused when I hear people say this. If this is truely the case then you'd almost always better off NOT using any type of relational database at all. There's no point. Subqueries are faster, help ensure the validity of the result sets that you work with (dataset could change between the two queries you issue trying to work around this issue on MySQL). And, if you don't need transactions, locking, ref. integ. and your are only updating a single row in a single table or reading a single row from a single table, why are you using a relational database to begin with? It's much too slow compared to your options here.

    4. Re:Why MySQL ? by sql*kitten · · Score: 2

      I was going to post a well reasoned reply to this, but, hmm, about 1/2 hr ago I couldn't log into /., and all the non-static pages were just taking me back to the front page. Hmm, that couldn't be because MySQL crashed (again) could it?

    5. Re:Why MySQL ? by horza · · Score: 2

      This is a poor way of working. You should work out from the start how large your project is going to get and the functions you are going to need then pick the best tool for the job. You can _then_ future-proof the application as much as possible, for instance using database wrappers to make the code DB independant. Also, if you start on something that is _missing_ features then porting to a compatiable-language application with _extra_ features should mean NO rewriting of code. From your "I'm going to install the best possible no matter what the expense just in case" attitude I bet you were a hit during the dot-com boom :-P

      Phillip.

  8. Mysql is ace by Anonymous Coward · · Score: 3, Interesting

    1. Microsoft Access is more functional, easier to use and deploy than MySQL.

    More functional? I could explain theoretically why that statement is utterly ludicrous, but I'll merley give a practical example:

    A big British financial organisation maintained internally, its publicly available financial data in Access. I wrote a system for them, using GNU/Linux, MySQL and mod_perl, which allowed web visitors do perform complex searches on this data. The internally-maintained big Access dataset was imported into the MySQL datbase via an import system I wrote for them. Now here's the interesting thing - they began to realise that the web-based system, even over an ISDN line, returned data substantially more quickly and reliably than did Access, even after they upgraded to the (ACID compliant) SQL server! Indeed, the latter constantly corrupted their data, would get into all sorts of unremovable row-locks and god knows what else in its attempt to remain beautifully ACIDic. Eventually, they ditched it and now use my system (with a content management client they've had written which accesses MySQL via myODBC). They've been using this for just under three years now, and there has not been, cumulatively, even one minute's downtime.

    1. Re:Mysql is ace by DNAGuy · · Score: 2, Funny

      Yeah, but MySQL doesn't have the paperclip, does it? Nuff said. :)

      --

      BRENT ROCKWOOD, EST'd 1975

    2. Re:Mysql is ace by Red+Avenger · · Score: 2, Interesting

      You speak as if you know a lot about MySQL and thats great. It sounds to me that you aren't as familiar with SQL server and as such will trash it now. We have a guy at work who does the same thing. Anything made by MS is instantly crapware not fit for anyone. Problem is this guy is a server administrator who is in love with linux.
      We are a windows shop and he does everything in his power to push linux over windows always saying snide comments. He doesn't even take the time to learn how to use it properly. Anything will be better if you don't give it a chance. But if its your job to administer the servers. Shouldn't you at least do a good job? If I take money from someone to do a job I owe it to that person to give them good service. Is this different in the Open Source crowd?

    3. Re:Mysql is ace by scrytch · · Score: 2

      Jet sucks, I agree wholeheartedly. But MS Access can now use MS SQL Server databases for its backend, and it comes with MSDE, the db engine for MS SQL Server. It's crippled to only perform 5 concurrent operations (it serializes them after that), and your db size is limited to 2 gigs, but you otherwise get the full db backend. Then compare MSSQL2k's pricing to Oracle or Sybase when you do want to upgrade your backend. Access has raised the bar significantly here... I can't see using Access as anything but a front-end though. I think you and the original poster are comparing apples and oranges.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    4. Re:Mysql is ace by Malcontent · · Score: 2

      I don't know about mysql but I have used postgres and SQL server pretty extensively. I much prefer postgres. First of all lock escalation is just a bitch. Sometimes entire tables get locked out I have have to tell people to log out of their desktops to clear the locks. Sometimes you can't even do that and you have to stop the service and restarted it (kicking everybody out).
      Postgres has a kick ass rule subsystem whereby you can make any view writable. Postgres allows you to write your own aggregate functions which allow you to do funky things with text fields. Postgres has unlimited row sizes and unlimited text fields (pretty much). Postgres let's you choose which language you want to write your stored procedures in (perl, python, pg/sql or C) all of which are vastly superior to transact-sql.
      I could go on and on. If you ask me postgres is much better then ms-sql server.

      --

      War is necrophilia.

    5. Re:Mysql is ace by On+Lawn · · Score: 2

      Well there are two choices

      Friz `A'

      Friz `B'

      Which would you choose?

    6. Re:Mysql is ace by On+Lawn · · Score: 2

      I choose `B' also. Given the time frame and migration involved after time they would eventually ultimate Friz `B'.

  9. You should have gone to PostgreSQL by Bistronaut · · Score: 2, Informative

    I can tell already that this is going to be a flame war, but here are my two cents: PostgreSQL has stored procedures, unicode support, transactions, triggers, rules, and all sorts of other goodies! In fact, there is precious little that PostgreSQL doesn't have. I am using it for several projects at work, and I love it. It's great that MySQL is adding features, but it has a lot of catching up to do.

    1. Re:You should have gone to PostgreSQL by SuiteSisterMary · · Score: 2
      In fact, there is precious little that PostgreSQL doesn't have.
      I'll tell you what PostgresSQL doesn't have compared to DB2, for example. IBM.
      --
      Vintage computer games and RPG books available. Email me if you're interested.
    2. Re:You should have gone to PostgreSQL by King+Babar · · Score: 2
      In fact, there is precious little that PostgreSQL doesn't have.
      I'll tell you what PostgresSQL doesn't have compared to DB2, for example.

      IBM.

      Yup, there's no doubt about it.A major sticking point in the adoption of truly enterprise-wide free software like PostgreSQL (or mySQL) is the fact that there is *any* risk factor involved in the support arrangements. IBM, like it or not, is just not going to go away. I don't think that, say, Red Hat will go away either, but their support for PostgreSQL in its incarnation as the official Red Hat Database system is more questionable. After all, Great Bridge was (alas) unable to stay in business by doing PostgreSQL development and support contracts.

      It is a wonderful thing that Open Source products do provide you with the source, but in situations where you have a major league database system that controls all your customer accounts, and you have a problem that has to get solved *today*...this isn't really a niche that is well covered yet for all Open Source products.

      --

      Babar

    3. Re:You should have gone to PostgreSQL by Decibel · · Score: 2

      Having delt a lot with IBM DB2 support, I can tell you that it's a very sharp double-edged sword. Yes, you can get product support (for a rather expensive price), but it's honestly not very good. In fact I'd say it's really bad in the cases where you really need it, such as when a production system is crashing or doing other things that make no sense.

      Also, if linux is super-important to you, be aware that DB2 on linux isn't up to production quality yet (unless you throw massive amounts of hardware at it, and even then it's marginal). It appears IBM is still learning the linux ropes. Support for DB2 on linux also isn't as good as on other OS's, from what I've heard. (It's certainly not as good as on AIX, which is what we now run DB2 on, but that's no surprise ;) ). I can't say db2's performance or stability on windows is all that great either. If you must go with x86 hardware for your database, then you should probably look at MSSQL or maybe Oracle.

      Also, while I haven't looked at PostgresSQL, they'd be very hard pressed to do a worse job on documentation than DB2.

  10. The best opensource DBMS/R is here ... by Anonymous Coward · · Score: 5, Insightful

    I am quite frightened when i see people still using MySQL ...

    Ok, it's a nice database but it lacks from major steps :

    - fast and decent transactions
    - procedures
    - triggers
    - views ... (AFAIR there is no views)

    Why do not people user alternative database such as PostgreSQL or Interbase ?

    For instance insterbase and its sister projects (IB Phoenix : http://www.ibphoenix.org/ , FireBird: http://firebird.sourceforge.net , ...)

    The basic specs of interbase are :
    - full SQL92 compliant (entry level)
    - not fully SQL99 compliant

    For instance you have :

    - fast transactions
    - super fast blob/clob feature
    - procedure (full SQL92 here!!!)
    - trigger
    - strucutred data types
    - JDBC2.0 driver (type 4 JDBC3.0 is underway ...)
    - cool tools (admin, major crash fix and recovery stuffs ...)
    - easy data deployment (thru .gdb files)

    Under linux there are 2 architecture, the classical server and the super server (cf the docs).

    There are also cool and nice free GUI admin tools such as IBAccess:
    http://sourceforge.net/projects/ibaccess/

    All these stuffs are opensourced and free (as in beer) !

    No more hesitation ... go for a powerfull database ;-)

    1. Re:The best opensource DBMS/R is here ... by Colin · · Score: 5, Insightful

      I use MySQL for one of my web based applications, and I use Oracle for others. For the one I use MySQL for, I chose it because:

      - It's easy to run.
      I don't have to do much (if any) maintenance and management - I don't need to check if redo logs are too small, don't need to check for extents growing out of control etc.

      - It's fast.
      For my application - with simple inserts and deletes, MySQL is really quick. That saves me money - I can get away with a single processor Linux box for my database server, rather than something much more expensive.

      - I don't need the features of a larger database.
      I'm using MySQL to store and retrive information - basically a distributed file system. I don't need clever locking, transactions, views, foreign keys, triggers, stored procedures. On the applications I do need those features, I use Oracle.

      - It's cheap
      I looked at PostgreSQL, but it was going to take me a while to figure out how to get it set up - I find MySQL very easy to install and get running. Oracle was going to be very expensive - and it's not that easy to install and get running properly.
      When you add in the costs of installation, learning how the software behaves, and the management time in keeping the software running, MySQL (for me) came out as the most cost effective option.

      Colin.

    2. Re:The best opensource DBMS/R is here ... by m_ilya · · Score: 3, Insightful
      I am quite frightened when i see people still using MySQL ...

      Ok, it's a nice database but it lacks from major steps :

      - fast and decent transactions
      - procedures
      - triggers
      - views ... (AFAIR there is no views)

      First of all MySQL does has robust transactions. InnoDB's table type really rocks. Probably it is not very stable yet (there was found some problems with blobs some time ago) but it becomes better and better.

      As for procedures and triggers and all other simular stuff. I wonder if it is really important to have it. I've seen some projects with heavy usage of procedures, triggers and other stuff. All busness logic of applications was implemented by them. It was very unmaintanable. IMHO more powerfull approach is three-tear architecture where middle layer (outside database) implements all busness logic itself.

      IMHO procedures are often overused. Probably they are required sometimes but only sometimes. If you think you need them than rethink you design. Maybe all logic you are going to implement with them should be implemented in middle layer?

      --

      --
      Ilya Martynov (http://martynov.org/)

    3. Re:The best opensource DBMS/R is here ... by brunes69 · · Score: 2

      What about sub-selects??? can't believe its taken this long for MySQL to get something as simple as sub-selects. Sure you can code around them, bu it's a pain in the ass and is much more inefficient.

    4. Re:The best opensource DBMS/R is here ... by chris.bitmead · · Score: 2, Insightful

      Why do you imply that postgresql is hard to setup?
      It's very easy, a piece of cake. So you don't
      need the features of postgresql. Does it hurt to
      have them on hand if you need them in the future?

    5. Re:The best opensource DBMS/R is here ... by Luminous · · Score: 2

      Perhaps this is my complete ignorance in regards to alternatives to mySQL, but my webhost and many other webhosts already have it set up with rather easy access.

      Do I have the option to load in an alternative? Or should I take the time and energy it would take to do that to learn and understand the limitations of mySQL.

      --
      This is not the way to build a lasting empire.
    6. Re:The best opensource DBMS/R is here ... by 21mhz · · Score: 4, Funny
      IMHO more powerfull approach is three-tear architecture

      Ah, these freudian slips...

      --
      My exception safety is -fno-exceptions.
    7. Re:The best opensource DBMS/R is here ... by Just+Some+Guy · · Score: 3, Interesting

      My company is currently trying to decide between MySQL and PostgreSQL, with the latter being the likely choose.

      We're currently using Interbase, and I have to say that it's the biggest pile of fetid horror I've ever had the displeasure of having to maintain. Why?

      • 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.
      • 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.
      • 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?!?!?"
      • We've experienced several (!!!) cases of database corruption where we were completely unable to recover any data inserted into a database after that point.
      • 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. Email me if interested.


      The only reason that we're using the much-despised database server is that our rather largish apps are written against it, and it will take a bit of effort to change. Also, given the lack of the SQL dump utility (other than the hack job I put together), getting information from Interbase to anything else is non-trivial.

      It may be good in theory, and I'm sure that some people like it. For us, however, Interbase is completely undependable and just barely usable for routine tasks.

      --
      Dewey, what part of this looks like authorities should be involved?
    8. Re:The best opensource DBMS/R is here ... by dhogaza · · Score: 2

      PostgreSQL isn't easy to install and get running properly? RH and Mandrake, at least, will install it for you when you install Linux. Automatically. Set it up so it starts up when you boot up and dies gracefully when you shutdown.

      It doesn't get any easier than that.

      PostgreSQL is *simple* to run and *simple* to administer. I've not used MySQL so can't directly compare, but the effort required to keep a PostgreSQL server running is so close to zero that MySQL can't possibly be significantly easier to administer.

      I'm not knocking MySQL in this comparision, just wondering how the heck someone who is competent to administer Oracle can describe PostgreSQL as being anything other than trivial to install and administer.

    9. Re:The best opensource DBMS/R is here ... by denshi · · Score: 2
      It's[MySQL] easy to run.

      I looked at PostgreSQL, but it was going to take me a while to figure out how to get it set up -...

      Here's how I read this: "I spent five minutes looking at the Postgres docs. Then I gave up and went back to MySQL."

      I know this isn't true, at least I suspect it is not from the content of your other posts. But I think the most cracked-out zealotry for MySQL comes largely from people for whom MySQL has been their only database -- script kiddies and beginning Perl/CGI peons in start-ups that have MySQL as default from their hosting provider or somesuch. Most of them don't even know what most database terms mean, let alone can derive a coherent value statement from them. People scream loudest when they are threatened by obsolesence.

    10. Re:The best opensource DBMS/R is here ... by Admiral+Burrito · · Score: 2

      I didn't mean to imply that postgresql is hard to setup - I meant that I found it difficult to install, when I was making the database decision a couple of years ago. I spent a morning trying to get it to work, and failed - which reflects much more on my (lack of) knowledge of PostgreSQL than the product itself.

      I had zero RDBMS admin experience, but managed to compile PostgreSQL 7.1.3 from source and install it. It was dead simple. Maybe things have improved?

      One thing I did notice though, is that by default it doesn't accept connections from the outside world. I think this is a good default, but getting it to accept connections was harder than the rest of the setup. The PostgreSQL web site has a nice online book that explained everything; I would've been lost without it.

      My hassles have all come _after_ PostgreSQL is set up. Mainly the difficulty in altering live tables. You can add columns with whatever constraints you like, but I have yet to figure out how to add foreign key constraints to existing columns. At least foreign key constraints are supported at all. :) But even simple things like removing a column are a pain in the but. The recommended way is "select into" to recreate the table with only the desired columns. I don't know if the new table picks up the constraints from the old table though.

      I've also had problems performing table modifications when a daemon process held a connection to the database. The process had completed its queries and was sleeping, but I could not make table alterations until I killed it. Not a biggie... I've since modified the process to completely disconnect before sleeping.

      PostgreSQL's locking seems to be better than MS SQL (version 7 I think it was; the only other RDBMS I have any experience with). A couple of times I've had to do a table-wide select in one db handle and a bunch of single-row updates in another. PostgreSQL handles this just fine. MS SQL tended to run for a while then deadlock, presumably when the row being updated was on the same page as an upcoming row in the select statement. MS SQL 2000 may be better but I haven't tried it.

    11. Re:The best opensource DBMS/R is here ... by denshi · · Score: 2
      Okay, you're just being stubborn. You don't understand the problem with temp tables, but you're going to 1) ignore it, and 2) keep pushing them as a replacement for stored procedures?

      The worth of your opinion just went to zero.

      The reason MySQL is so popular in web projects is because of network effects. The reason MySQL *survives* in many web projects is because most web projects have low enough usage that their shortcomings are not apparent. One can easily waste 20 times the necessary resources on the web, and you won't notice until that day you are slashdotted and your usage pattern triples. You'll note that large MySQL projects such as slashdot end up writing large complex caching systems to avoid MySQL and are running on enormous machines relative to their needs. Perhaps you have noticed the number of MySQL projects that get successful, and then start working on Postgres and Oracle ports after they look at scalability data.

      As for the rest of your arguments -- SP required seldom, biz logic simple in middle tier, etc -- check the beginning of my message to see a response. You do not know what you are talking about.

  11. Foreign keys by Betcour · · Score: 2, Informative

    Foreign keys are supported since yesterday with the InnoDB table handler (check www.innodb.com for more infos).

    1. Re:Foreign keys by Nugget94M · · Score: 3, Interesting

      You're missing the point. The start of this thread was puzzlement over why, exactly, mysql is so popular in this community when more complete and more robust alternatives exist (like postgresql).

      There is no strong motivation to bring mysql's featureset up to the accepted standards for a sql server when we can all just run postgresql and have those features now, in a more mature and well-tested form.

      I'm constantly puzzled by the enthusiasm and support shown for mysql and simultaneous aversion to postgresql because both attitudes are clearly not based on technical merit. And, to make matters even more confounding, mysql's popular support and user community rallied behind it long before it was actually capital-F "Free" in the religious sense. So, we can't even settle on mysql's popularity being dogmatic which would be an understandable reason.
      I haven't seen anyone in this thread complain that mysql lacks features. I'm just seeing people wondering why we should be motivated to use a deficient product when better alternatives exist.

    2. Re:Foreign keys by Betcour · · Score: 2

      InnoDB does also transactions... it also offers row-level locking which improve performance under high-loads. There's no good reason to use BDB tables anymore.

      BTW : Slashdot runs on InnoDB tables.

    3. Re:Foreign keys by sbeitzel · · Score: 2
      I'm constantly puzzled by the enthusiasm and support shown for mysql and simultaneous aversion to postgresql because both attitudes are clearly not based on technical merit.
      I think you've hit the nail on the head, right there. Preferring one product over another on technical merit would involve:
      • engaging one's critical facility
      • actually having a deep technical understanding of the job and products
      I dunno what sector you work in, but for the past 7 years the web's been built by people who have an often incomplete grasp of both of these. Thus, products which are not the ideal choice get used in spite of flaws, and more appropriate products languish in obscurity. Remember this lesson: while the engineering department is crucial (one must have an actual product), the marketing department is no less so. It doesn't matter how wonderful your technology is if nobody knows about it, or if the people who do know can't figure out how to use it.
      --
      Oh, go on, check out my job.
    4. Re:Foreign keys by figment · · Score: 2


      You're missing the point. The start of this thread was puzzlement over why, exactly, mysql is so popular in this community when more complete and more robust alternatives exist (like postgresql).

      Speed. For a database with a lot of reads and very little writes, mysql will beat postgres in speed. That's it.

      I use both. I use mysql for some of my webprojects precisely for speed, but i use postgres for my non-web projects, where the robustness and particularly transactions and stored procedures, are necessary, and pure speed is not an issue. I (obviously) think that this is really the best to go, use each database where it's best fit.

      I don't know if it's a good thing that mysql is adding all these new features, while it is good that they're providing competition for postgres in this non-web market, i hope that they can either keep up the speed (as that is more important for certain web-applications) while adding these new features, or by forking the codebase such that I can choose between speed and robustness.

    5. Re:Foreign keys by Decibel · · Score: 2

      Everyone comments on how MySQL is faster than Postgres, but have these comparison's been made in an apples-to-apples manner? Obviously MySQL will perform much better out of the box, since it doesn't use things like row-level locking. I'm guessing that Postgres does use row-level locking by default. If you don't care about concurrancy, most databases will allow you to use table locks instead, which gives you a huge performance increase.

  12. Which front-end are you using for your MySQL-PgSQL by Secure42 · · Score: 2, Informative

    Which front-end are you using for your MySQL-PgSQL Databases?
    I am interesting from hearing about your experience.
    I have tested:
    - MS Access through MyODBC
    - StarOfficce through MyODBC or UnixODBC (it is missing native support connection to MySQL but it is in StarOffice TODO list, maybe in forthcoming StarOffice 6.0? :)
    - Rekall: it is still in Beta but seems really awesome
    Do you know any other alternative which one it is your prefered? i would like hearing about you

  13. Re:Which front-end are you using for your MySQL-Pg by Galois · · Score: 3, Informative
    --
    - daniel
    Turn off your computer and go outside
  14. Re:What's so major? by StrawberryFrog · · Score: 2
    I'm already impressed by this example of open-source might.

    Might?? MySQL is still only for weenies. You wouldn't be at all impressed with it if you'd used a really functional Open-source Database like postgresSQL. I've used both and there's really no comparison.

    I don't see these as major changes, rather than just adding some features

    They aren't major changes, just adding some of the features that PostgreSQL has had for years.

    Why bother with MySQL?

    --

    My Karma: ran over your Dogma
    StrawberryFrog

  15. Not a troll by brunes69 · · Score: 3, Informative

    Have to say I 100% agree with this guy. PostgreSQL is light years ahread of MySQL, and is 100% open source. The GPL'ed version of MySQL isn't even free software! (The GPL version i always a subverions or two behind, I believe.) Why people continue to use it when PostgeSQL is out there defies all logic IMHO.

  16. Re:Which front-end are you using for your MySQL-Pg by Howie · · Score: 2

    In that past I've used Access to prototype, then exportsql (in the Mysql contrib page - it's too slow get grab a link right now) to create the script for mysql.
    Now I generally use PHPMyAdmin to do it through the web.

    --
    "don't fall into the fallacy of believing that Perl can solve social problems. Maybe Perl 6 can, but that's a ways off"
  17. great to see progress! by Lumpy · · Score: 4, Insightful

    This is great! When I forayed into the SQL land 3 years ago I dried postgreSQL first because it was a "pure" SQL that was a true GPL and free.. but honestly, MySQL is tons easier to set up and use and program for. So that is what I settled on, it just added a step for me, I had to show a client how to download and install it to meet the license requirement at that time.. (Shoulder driving, click there, click ok, now type rpm -i *.rpm.. cool I can take over now!) I use it extensively today, and the documentation seems to be greated for MySQL than postgreSQL. Is that a fact though? is there sources for postgreSQL for dummies? or nice comprehensive manuals? or 3rd party books?

    --
    Do not look at laser with remaining good eye.
    1. Re:great to see progress! by CodeMonky · · Score: 2, Informative

      the docs on the postgrersql home page are superb. They've combined their three docs (Admin,User,Programmer) into one so it is fairly easy to use and they have a nice sql reference.

      --
      --"Karma is justice without the satisfaction"
    2. Re:great to see progress! by Tepic++ · · Score: 2, Informative

      I would recommend trying PostgreSQL again. Relatively recently (v7.0 and v7.1) there were some major improvements in terms of speed at least. As to setting up PostgreSQL (i.e. create and configure a database), it is very easy, once used to it, and the documentation is pretty good (http://www.postgresql.org/idocs/ ).

  18. Re:More vapourware by mosch · · Score: 3, Flamebait
    A man that speaks the TRUTH! MySQL is a toy, no referential integrity, no CHECK constraints, no stored procedures. It's fast, but so is a JATO rocket attached to a bicycle. Only a fool would use MySQL for something where the data actually matters.

    For a good example of MySQL's performance under load, look at crash^Wslashdot, which probably averages two crashes a day or so, with 5 or 10 minutes down for each crash. As a man much smarter than me has said, slashdot does a wonderful job evangalizing Microsoft products.

  19. What's the best transactionnal backend? by chrysalis · · Score: 2
    I'm very new to MySQL and I only used it with the Innobase backend so far.
    But what's the best MySQL type of (transaction-enabled) tables :
    • BerkeleyDB
    • InnoDB
    • Gemini

    Or something else, new to MySQL 4?
    Anyone has experience or benchmarks with these different types of tables?
    --
    {{.sig}}
  20. Re:More vapourware by OblongPlatypus · · Score: 5, Insightful

    What you're forgetting is that in many web-based applications, the data *doesn't matter* (not more than nightly backups will take care of, anyway). MySQL is perfect for a whole range of web-related work, and these new additions will make it even more useful.

    And in reply to the parent of the parent of this post, I really don't see how the term vaporware fits here. Sure, MySQL is a different class of database than (for example) Postgres, but that doesn't make it a useless product. Besides, at the rate MySQL is going these days, I wouldn't be surprised if they could be considered up to par with Postgres in a few years. If they can keep the speed up there while adding new features, the competition will have a hard time... well, competing.

    --
    -- If no truths are spoken then no lies can hide --
  21. Why people use MySQL by ACK!! · · Score: 5, Insightful

    It goes a little like this:

    1. Someone needs a small easy to install database quick.
    2. Sysadmin knows PostGres is superior but also knows that MySQL is dead easy to set-up quickly. He has set up MySQL before since someone told him how easy it was. He uses that.
    3. People are so impressed in the organization that he got the thing up quickly they start suggesting MySQL for larger projects where it falls flat.
    4. The organization gets turned off to Open-Source databases and chooses Oracle or DB2 instead totally bypassing PostGres which is sad.

    In the end PostGres gets completely bypassed. Lots of people cut their teeth on MySQL so when someone needs a small database set up really quick they choose it. If more people used PostGres initially I think they would never look back. However, I understand immediately why MySQL is used so often.

    --
    ACK /ak/ interj. 2. [from the comic strip "Bloom County"] An exclamation of surprised disgust, esp. i
    1. Re:Why people use MySQL by daviddennis · · Score: 2

      I've gone through a similar path, but for me mySQL has done everything I've thrown at it. I have 50 people banging at it continuously every day, and what they do is mission-critical.

      The truth is that many of us have been with mySQL for years. When Postgres was first created, it was slow, very difficult to install, and used some kind of non-standard version of SQL. mySQL was fast, easy to install, and easy to upgrade from the mSQL database I used before. So I have been using mySQL ever since, with no need to switch.

      I might well use Postgres if I was starting database programming for Unix/Linux now, because the feature set is in fact better. But it looks like mySQL is going to gain the missing features quickly, so it doesn't seem like switching would be worth the effort.

      D

    2. Re:Why people use MySQL by Animats · · Score: 2
      If setup is the problem, then the system administration design is lousy.

      When fixing this, forget "wizards". Don't configure via makefiles. Don't use user-edited text files. Make the setup mechanism find out as much as possible by itself. "You should never have to tell the computer something it already knows", as Apple once put in their developer guide. Ask how little the application really needs to know to get its job done.

  22. Ahhh...a MySQL post.... by bozone · · Score: 4, Funny
    1. Search Slashdot for old articles on MySQL
    2. Set filter to 3
    3. Cut'n Paste a rant about MSSQL/Oracle/DB2/PostgresQL being superior
    4. Cut'n Paste a list of features that MySQL needs to be a real RDBMS
    5. Make it known to the world that I will never use MySQL until it has the above features
    6. Watch my karma grow
    ...my work here is done...
    --
    "Hatred is the coward's revenge for being intimidated" ...George Bernard Shaw
    1. Re:Ahhh...a MySQL post.... by scrytch · · Score: 2

      Maybe people are repeating those rants because they still hold? Without support for simple things like stored procedures or views (really, i can take one or the other in my case, but i can't lack both), and subselects, I just can't use MySQL. No hard feelings, but I certainly won't join the clamoring throng that defends a product too mediocre for me to use.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  23. DBTools for Windows by wirefarm · · Score: 2

    DBTools Is a pretty nice Windows-only front end (Though it will easily admin a server on a linux box.) - It looks a lot like Oracle's tool did 5 years ago, but it really works pretty well.
    This is the tool I recommend to people coming from MSAccess. I often use it when creating tables because I can never remember the syntax for doing auto-increment fields...
    It will take you about 5-10 minutes to figure out how it all works and it doesn't insult the intelligence of the command-line crowd.
    Hope this is of some use to somebody...

    Cheers,
    Jim in Tokyo

    --
    -- My Weblog.
  24. Re:More vapourware by GooberToo · · Score: 3, Informative

    What you're forgetting is that in many web-based applications, the data *doesn't matter* (not more than nightly backups will take care of, anyway). MySQL is perfect for a whole range of web-related work, and these new additions will make it even more useful.

    Except that you are forgetting that multiple recently published scores indicate that MySQL really stinks for this type of work too unless it's ALL read only access. Once you start throwing writes into the mix, MySQL falls far behind. On top of that, MySQL also has concurrent access load issues too. This means it's not going to scale very well when lots of connections are asking for lots of differing types of data from lots of different tables. Yes, it's VERY fast for one or two people (or even a small handful) doing read only access, however, use it in an environment where there are even some writes in a highly loaded system, PstgreSQL is going to beat it, not just with a stick but a full blown Loui Slugger. Once you get into the world of having a large number of writes, MySQL becomes an utter joke as PostgreSQL has lots of optimizations to take advantage of this while MySQL just rolls into a ball and cries. Of course, I've also read lots stating the PostgreSQL's query optimizer is much more advanced, so once you start doing non-trivial queries, PostgreSQL is going to win again. This will be come significantly important once (if) MySQL starts supporting sub-queries.

    The point being, MySQL really isn't a great DB system after all. It may get there one day but the number of situations that it truely works well in and MySQL can address are actually very limited and nitche areas.

  25. Curious description of the GPL by elliotj · · Score: 2, Interesting

    According to the article:

    "The GPL allows open-source programs to be changed by users, but those changes aren't official and can't be sold commercially unless they're given back to and accepted by the owner."

    That's not exactly how I understood it. My impression was that the GPL was a recursive license allowing the free use and modification of code, but requiring that said modifications also be made freely available under the GPL. I didn't think the person whose code I was modifying had to accept my modifications in any way. Nor did I think it was directly incumbent upon me to send them to him.

    I wonder what it is about journalists that makes them so capable of half-understanding so many things?

    1. Re:Curious description of the GPL by whjwhj · · Score: 2

      I caught that too. Journalism ignorance. It is true, however, from a practical point of view, that if you want your modification rolled back into the main product, you have to deal with MySQL AB.

  26. Re:Which front-end are you using for your MySQL-Pg by Daniel+Dvorkin · · Score: 2

    Yep, phpMyAdmin is great; really everything you'll ever need to administer your MySQL database. Once a month or so I drop into command-line access via telnet to do a big, tricky query, but that's more a "because I can" kind of thing -- phpMyAdmin always allows you to execute queries directly if you want.

    As far as user front ends go -- just write everything in PHP. Look at the phpMyAdmin code if you want some ideas; they don't mind! Anyone with a decent amount of Web development and general programming knowledge can whip up a good-looking, functional PHP-based Web interface for a MySQL database in a very short time.

    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  27. "nested queries and stored procs" by dasmegabyte · · Score: 2

    It's about fucking time!

    MySQL has been mired in the stone ages of Dbase4 for years; these will be welcom additions and will definitely help MySQL overtake some of its lofty closed source competitors.

    Me, I'm sticking with PostGreSQL. But I applaud the effort of the developers to make their application into something that DBAs worldwide can feel proud to add to their resumes.

    --
    Hey freaks: now you're ju
  28. Re:More vapourware by swillden · · Score: 2

    Get PostgresQL, a real DB. That already has all of these features, and rock solid too, not beta patches etc.

    I hope people continue to use MySQL. Usage will inspire the developers to continue hacking on it until it rivals and even surpasses PostgresQL. It's much better to have two high-quality open source databases than one. Competition is almost as important in the open source world as it is in traditional commerce, even if the dynamics are different. It can be argued that open source competition does even more to foster innovation because the development teams are free to lift ideas and even code from their rivals.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  29. Why This Is Good by macsforever2001 · · Score: 2

    To all those who are comparing MySQL to PostgreSQL, I'd like to comment on why this is good.

    First, competition will make them both better. The whole point of open source is *more* choice, not less. Stop complaining that MySQL is finally catching up to PostgreSQL and use which one you want. They both have their strengths and weaknesses. It's not like they both cannot coexist.

    Second, I use MySQL occasionally now because most ISPs seem to support it. PostgreSQL is great, but I cannot use it because my clients have long since chosen their ISPs and it is a major PITA to change for many reasons.

  30. Re:This is a lie. by swillden · · Score: 3, Insightful

    Nobody stores critical data in Access.

    Ahh, the naivete of the young...

    People frequently do insane things like storing business-breaking data in access. And they absolutely refuse to listen to the $200 per hour consultant that tells them they're doing a very risky thing.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  31. Re:That's all very well and good by flimflam · · Score: 2

    No it doesn't. Ever read the documentation?

    --
    -- It only takes 20 minutes for a liberal to become a conservative thanks to our new outpatient surgical procedure!
  32. Re:MySQL is far easier and faster than PostgreSQL. by SuiteSisterMary · · Score: 2
    But the fact is, MySQL simply kills it in performance. Which is usually the number one issue with any kind of database.
    No. Actually, speed (which is what I assume you mean by performance) is the last thing a database engineer is worried about; otherwise, you're just increasing the speed at which you fuck your dataset. Atomicity, consistency, isolation, durability. Thats what the database people care about. Beyond that, if it's a database of any import, you just throw more data at it. As somebody once pointed out, if speed is what you're after, use flat text files and grep. The speed of grep is nigh infinate.
    --
    Vintage computer games and RPG books available. Email me if you're interested.
  33. How about those... by Betcour · · Score: 2

    I never hear much about "alternative" commercial databases like Frontbase or SOLID Server... what good are they ? Did anyone tried them in a web environement ?

    1. Re:How about those... by Decibel · · Score: 2

      I've never heard of either of the databases you mention, so I can't comment on them.

      Typically, there are two reasons why people go with commercial databases:

      - Support
      - 'Quality' (more robust, more scalable, etc.)

      Support is pretty obvious... something goes wrong, you call. I'm sure some companies are much better at providing support than others, but it's a pretty safe bet that you'll get better support for a commercial database than a free one. And before the flames start, by support I mean 24x7 support, the kind of support you need when a system is down. Popping into an IRC channel and hoping someone's awake isn't a very good support plan when you're losing business by the second :)

      Quality depends greatly on what you're trying to do. For example, would you open an account with a bank that uses MySQL to keep your account information? Or trust a hospital to keep your medical info in MySQL? Big databases like DB2 and Oracle provide the tools you need to ensure data integrity. They also have a well-proven track record of use in industries where losing or corrupting data simply is not an option (I'm talking things like NYSE and financial institutions, not some e-store or a simple website).

      Another issues is scalability. People love to tout MySQL's performance, but it's very easy to see where you can make it fail. Not having row-level locking means good luck using it in a OLTP system, for example. It also doesn't cluster (which is an absolute requirement if you're going to do anything serious on x86 hardware).

      On the other hand, it'd be pretty silly to pay for something like DB2 just to run a small website.

    2. Re:How about those... by Decibel · · Score: 2

      I think you're confusing clustering and replication.

      Replication is having multiple copies of the same database and trying to keep all the copies in sync.

      Clustering is taking a database and splitting it up across multiple machines. For example, DB2 allows you to do this at the table level, where rows for a single table are stored on multiple machines. What makes this work is DB2 hides most(if not all) of this from the applications, so it looks just like one large database.

      Personally, I'm more in favor of getting hardware capable of running the database, since administrating a single machine is generally much easier than administrating dozens, not to mention power consumption and floorspace considerations.

  34. Re:More vapourware by Quila · · Score: 2

    Yep, all of these people are using it, and many look like it's in places where the data matters. Lots of fools around, ... NASA, yahoo...

  35. SSL? licensing? by prizog · · Score: 2

    How do they plan to do SSL? OpenSSL isn't licensed under a GPL-compatible license.

    If they've built a whole new SSL library, I'm impressed.

    1. Re:SSL? licensing? by prizog · · Score: 2

      No, the Apache license is *not* GPL compatible - read this:

      http://www.gnu.org/licenses/license-list.html

      The OpenSSL license has the same incompatible terms as the Apache license.

  36. The newest version is GPLed by teg · · Score: 2


    The GPL'ed version of MySQL isn't even free software! (The GPL version i always a subverions or two behind, I believe.)


    You're wrong - the newest version of MySQL is GPLed (you can buy another kind of license from the company behind it if you need to). They changed their policy mid-2000, if memory serves.

    When using databases as backends, I'd much rather use PostgreSQL myself (transactions without table trickery, foreign keys, views and subselects being the things I miss most in MySQL), but MySQL certainly is free - and the subset of SQL they do support is very useful, and sufficient for many purposes

  37. Put up or shut up. by Ramses0 · · Score: 2
    Find me a link, or point me to the docs that tells me what to do after typing apt-get install postgresql postgresql-client that will get me set up with a user called "web", and a database called "webdata" that I can use from PHP.

    With MySQL its:

    • apt-get install mysql-server mysql-client
    • vim /usr/share/doc/mysql-server/README.Debian (because apt-get told me to)
    • mysqladmin -uroot password 'newpassword'
    • mysql -uroot -pnewpassword
    • CREATE DATABASE webtest;
    • USE webtest; CREATE TABLE test ( blah INTEGER NOT NULL );
    • GRANT ALL PRIVILEGES ON webtest.* TO web@localhost IDENTIFIED BY 'some-password'; (found the syntax by searching the mysql manual on mysql.com)
    • exit
    • mysql -uweb -pwebtest webdata


    I spent a few hours one weekend trying to perform these equivalent operations with pgsql, etc. Granted I work with MySQL every day, but I wanted to try out PostgreSQL and see how it compares. It took me forever to find out that I needed to 'su' to user postgres in order to connect to the freaking database! Grr.

    I'm willing to try, but somebody needs to point me to the right parts of some manual, FAQ, or HOWTO ... because dammit if I didn't actually go and do just what I said I would do above to make sure that it worked, and now I have an installation of MySQL running in less than 5 minutes.

    --Robert

    1. Re:Put up or shut up. by rho · · Score: 2

      I'm not sure I understand. Why should a relational database -- a hugely complex and complicated program that is used to do complex and complicated things, in an environment that can be set up into hundreds of different configurations -- be easy to install?

      When I make the decision to use something other than a flat-file and go with a relational database, I usually have a larger window than 5 minutes to setup, install, make structural and architectural decisions. The difference between 5 minutes and a day is irrelevant when you're talking about a development time of weeks or months.

      I've never used MySQL. I've found that anything that I don't need transactions and stored procedures for, I can accomplish quite well with simple flat files.

      --
      Potato chips are a by-yourself food.
    2. Re:Put up or shut up. by StandardDeviant · · Score: 2

      from memory:

      root@host# su - postgres
      postgred@host$ createuser web
      [create new databases?] [hit no]
      [add new users] [hit no]
      postgres@host$ createdb webdata
      postgres@host$ psql
      [add the db structure interactively or read it in from a file, see the man page for psql]
      [use GRANT to selectively give 'web' and whoever else privledges on 'webdata' or the structures therein. this is stone standard sql, of course.]
      postgres@host$ logout

      then use this for your PHP connection string, roughly speaking:
      'localhost:5432:webdata','web','' (no passwd)

      the 5432 is the default port it runs on in tcp/ip mode. which is iirc the default in most cases.
      if you wanted to give the 'web' user a password that isn't hard to do but the particulars have slipped out of my head at the moment. this assumes you're postgres owner user name is 'postgres' of course, and that you've started the postmaster daemon already. don't know if the debs do that, I don't run debian.

      that should get you started. more info is the docs, try specifically the getting-started guide, and then like the administrator's guide. Postgresql is a _lot_ more flexible than mysql, the price you pay for that is a little more complexity.

      Oh, and you don't need to su to postgres to connect to the database, but you DO have to have made a postgresql-user for $login to connect from $login. 'createuser' isn't hard to remember. :^)

      I can have postgresql up in about 5 minutes too, if I use binary packages (I usually compile from src). It's just familiarity. For comparison, it takes me ages to remember the mysql-way to do the things I've described here, e.g. the "IDENTIFIED BY" is a new one on me.

      HTH

  38. Re:Good Thing by smack.addict · · Score: 2
    Speaking of MySQL books... I would love to have people interested in MySQL visit:

    http://oreilly.techrev.org

    And look at one or two chapters from our forthcoming book on MySQL. This is the technical review portion of the book which means there are still tons of typos, but what we are looking for is that the community validate its technical content.


    Thanks!

  39. Because MySQL is available for Windows by j7953 · · Score: 2
    Why people continue to use it when PostgeSQL is out there defies all logic IMHO.

    One word: Windows.

    MySQL is available for Windows with a simple, quick install. PostgreSQL can be compiled on Windows, but I think you need Cygwin to do so, and the installation routine is a readme, not an executable wizard.

    Most small and mid-size ISPs offer MySQL on their servers, not PostgreSQL. Why? I'd guess it's because it's used more widely (yes, that's a catch-22), and because clients can easily install it on Windows to develop their applications.

    For simple applications like a web site, you usually don't need the features of PostgreSQL, MySQL will do the job. If you need the features that PostgreSQL can offer, you usually develop with a database server which you can run Linux on anyway. But for applications devloped in small networks or even on a single computer, availability for Windows is a huge selling point because it's the number one desktop system.

    --
    Sig (appended to the end of comments I post, 54 chars)
  40. Communication between mySQL and ODBC by daviddennis · · Score: 2

    Anyone know a good way to address a SQL Server database from an application using the mySQL API?

    That is, is there any type of library available that would let my Unix C program talk ODBC to a SQL server system?

    I know about ODBCSOCKETSERVER, and it's what I use now, but it's not robust enough for some of the things I want to start doing, and I'd really like to have a system that directly talks ODBC under Unix instead of having to go through a Windows box with ODBC installed. (I don't want to run the bridge on the computer that actually contains the SQL server interface).

    Thanks for any thoughts.

    D

  41. Re:Wow! by ravrazor · · Score: 2

    come on, moderators, this is NOT informative.
    Row-level locking is available in mysql by using a third-party table type...As are transactions, and page-level locking.

    you use what you need, and for a lot of people, they really don't need to use correlated subqueries, they don't mind replicating the functionality of a stored procedure in perl or php, and they really don't need a 5-digit price tag.
    MySQL's main feature seems to be its immense popular support among people who haven't used any of the alternatives.
    really? so yahoo and NASA don't know about alternatives to mysql?

    this is such total FUD...i really don't understand the motivation for everyone to tear down mysql based on these same objections and that damn phillip greenspun article.
    can't everyone just let people use the solution that fits their requirements?

  42. Re:PosgreSQL by Michael+Widenius · · Score: 3, Interesting

    Hi! I agree that PostgreSQL has some fetatures that MySQL also has, but it's also true that MySQL has a lot of features that PostgreSQL doesn't have.
    To not have to repeat myself over and over again, I have collected some information about this topic here

    Speedwise I haven't seen any indication that PostgreSQL 7.1 would generally be faster than MySQL. All the tests I have myself run shows that it there is no big speed improvment between earlier PostgreSQL version and 7.1, if you run both with flushing of data disabled. (We will soon publish the results on our benchmark page)

    For many applications, MySQL is in practice at least 3 times faster than PostgreSQL 7.1. If you applications needs the extra speed MySQL can give, PostgreSQL is not an option.

    According to what I know, the InnoDB transaction handling engine in MySQL is at least as good as the PostgreSQL transaction engine. (I would argue that is even better, as you never have to run a 'vacuum' on InnoDB!)

    My simple message is that both MySQL and PostgreSQL has a place. One can't generally say which is better, in the same way you can't say if a hammer or a screw driver is the right tool, if you don't know what it should be used for. For a lot of real world applications, MySQL is simple the best choice. The same is true for PostgreSQL.

    Regards, Monty
    CTO of MySQL AB

  43. New Slogan? by Toddarooski · · Score: 2

    "MySQL: When your data doesn't matter that much"

    Ehhh... needs some work.

    --

    "Do you expect me to talk?" "No, Mr. Bond. I expect you to die!"

  44. Re:MySQL is far easier and faster than PostgreSQL. by Wdomburg · · Score: 2

    >But the fact is, MySQL simply kills it in
    >performance. Which is usually the number one
    >issue with any kind of database. That isn't to
    >say that PostgreSQL is bad. It just isn't as
    >fast. That's all. Here's a benchmark [mysql.com]
    >of MySQL versus other databases... including
    >PostgreSQL.

    Their posted benchmarks are for SINGLE threaded access. Unless you're using it for one of the very few niche applications that require this, the benchmarks are *useless*.

    MySQL has a major problem with heavily concurrent access, particularly in instances where you are doing a lot of updates.

    At work I'm migrating from MySQL to Postgres for precisely this reason. Performance has been going majorly downhill as the utilization has grown. And now its not uncommon to see as many as 50-60 threads stalled waiting for a table lock .

    Yes, I'm aware that alternate table types exist for MySQL that implement finer grained locking. The problem is they are fairly new, and are in use on only a small portion of the MySQL installations out there; hence, they are nowhere near as well tested as Postgres.

    Also, the benchmarks published on InnoDB are extremely poor. The comparison to Postgres suffers from the same single thread test only problem I mentioned and is far from comprehensive. The rest of it is even worse - the test for concurrency impact only shows results up to 50 threads for inserts, and shows a major dropoff in performance of selects between 50 and 100 rows. And he actually admits to poor methodology on the test against a commercial database.

    Matt

  45. Re:GPL by Michael+Widenius · · Score: 2, Informative

    The author apparently misinterpreted Marten Mickos statement. (That's
    the problem with news stories that you are not allow to check before they are published).

    You will find a lot of good GPL information at:

    http://www.gnu.org/copyleft/gpl-faq.html

    Regards,
    Monty

  46. Re:Wow! by Decibel · · Score: 2
    Row-level locking is available in mysql by using a third-party table type [innodb.com]...As are transactions, and page-level locking.

    The point is that any organization that promotes ideas such as "table level locking is superior to row level locking because it's faster" obviously has little understanding of what kind of features are needed for a robust database. That kind of attitude raises all kinds of questions about everything from their high level design down to the code. Data integrity isn't something that you tack-on to a database engine as an afterthought, it's something that should be designed in from the start. Have they ever thought about things such as data integrity problems caused by re-ordered writes by the filesystem? Probably not because it's not much of an issue if you don't provide transactions. (Yes, I know there are 3rd party add-ons that provide transactions)

    It's encouraging to see 3rd parties adding sorely missing features to MySQL, but the point is that MySQL's developers should have at least realized what kind of things MySQL needs to be more than a glorified flat file handler. If they don't want to add these features that's their call, but it's a real disservice when they bash features they don't want to impliment because they see no use for them. If there was no use for them, then Oracle, IBM, Sybase, Microsoft, and countless other companies wouldn't have spent a lot of money developing them.

  47. Re:MySQL is far easier and faster than PostgreSQL. by Wdomburg · · Score: 2

    >MyISAM tables are not good in an environment
    >where you are doing a lot of long running
    >updates and selects on the same tables.

    Unfortunately MyISAM is still the best backend that has a widely deployed long-standing backend.

    >The benchmarks on the www.mysql.com page are
    >still single users, but we are working on an
    >open source multi user tests that will show how
    >the different table handlers MySQL provides
    >works under heavy multi-user load.

    I applaud the effort. That doesn't change the fact that the current benchmarks have major deficiencies.

    >The single user benchmarks does however show the
    >top speed for a database and the strength and
    >weakness for each database, so they are still
    >very useful on their own.

    It shows the top speed for a database under conditions almost never found in production environments and hides the weaknesses of MySQL by doing so. They are very much NOT useful to most people.

    Matt

  48. Re:Wow! by Nugget · · Score: 2

    I don't think it's fair to characterize a third-party developer's efforts to compensate for a noticeably lacking feature in mysql as "Row-level locking is available in mysql", especially when the mysql documentation still goes out of its way to justify the reliance on table locks in the platform.

    The bottom line is, mysql lacks row-level locking. It's not in the product. Moreover, the mysql developers defend this omission and claim it was a conscious decision which they attempt to justify in the documentation.

    I'm pleased that the innodb folks have seen fit to try to overcome this liability in mysql, but let's not get carried away by describing it as a native feature.

  49. Oracle and MySQL? Man, that's a SMALL toolkit. by emil · · Score: 2

    Might I suggest some additions:

    • linux.sybase.com - has all the fancy triggers and stored procedures, and the binary license is free (for the 11.0.3.3 release). Sybase is also very close in syntax and behavior to MS-SQL Server (they were the same codebase to release 4.8), so it's a good Linux evangelist tool for MS shops. They also have a 64-bit version for Alpha. On the downside, it's not very ANSI-SQL 92 compliant.
    • Postgres - getting more of the fancy features everyday, and support within RedHat is very strong - no need to recompile the webserver to use it. I have never understood why RedHat doesn't include DBD:Pg, though. Does Postgres have foreign keys yet?

    These are all really great tools; why leave them out? I like Oracle too, but $10k per processor is pretty steep. Hey, it's big and slow, but at least it's expensive!

  50. Why use any DBs at all? by deblau · · Score: 2, Interesting

    Wearing my programming hat, I have to use the right tool for the job. If I don't need lots of nifty DB features, I'll use my native filesystem structure to store data, or even a flat file. Remember those? If I need bells & whistles, I'll choose a DB that has just what I need, and no more. Why waste cycles (or licensing fees) on worthless features? If I need transactions (for example), and I don't want to spend $$ on proprietary DB licenses or on man-hours trying to figure out a complicated open-source DB (remember TCO?), I'll code it myself with something simple like MySQL on the back end. If I do need scalability/lots more features/whatever, I'll pony up the time/money for the big boys.

    Right tool, right job.

    --
    This post expresses my opinion, not that of my employer. And yes, IAAL.
  51. Postgres will fall flat on its face too... by emil · · Score: 2

    Try throwing 20 million rows in and out of the server everyday. Big RDBMSes still have a place. Write portable SQL as much as you can.

  52. Oracle killer? NOT! by emil · · Score: 2

    Nobody, but NOBODY, will challenge Oracle with a database unless SAP and PeopleSoft port to it.

    I wish RedHat had understood this. RedHat might have been better off bundling SAP-DB and selling an SAP-optimized version.

  53. MySQL is good but can be better. Why wait? by MattRog · · Score: 2, Informative

    I will agree that for 99.9% of MySQL users MySQL runs just fine. They don't need, nor care about, sub-selects, row-locking, triggers, etc.

    We used to run MySQL but found that it died *horribly* on heavy multiuser loads. (e.g. 500 concurrent users, all updating/insert/etc.)

    I investigated the problem and found out that table locking really, really sucks. Last summer when we had this problem we didn't have the luxury to mess around with pre-alpha table structures and spend countless hours poking around with settings.

    I carefully explored the other RDBMS's out there and eventually picked Sybase ASE 11.9.2 for Linux as the best choice. I can say it was hands-down the best choice we made. Now we're at 12.5 which supports SSL, XML, etc. and a host of other features MySQL hasn't even thought of.

    Instead of 'dealing' with MySQL we're making money with something else.

    So here it is:
    If you are having problems with MySQL - DON'T PUT UP WITH IT. There are many other fish in the sea that will better fit your application. Simply because it is 'free' or 'popular' does not make it better for your application.

    As someone else said, I always follow the 'pick the best tool for the job' test. If it is out of our price range, we either find a way to buy it or move on to the next item on our list.

    I think far too often people perform the 'open source' or 'free' litmus test first -- leading to major headaches down the road.

    If we were in this situation today I think we'd rather have picked Postgres, simply because it was a lot cheaper and offers many of the performance-enhancing features as the 'big three'! :)

    --

    Thanks,
    --
    Matt
  54. You have to laugh by ErikZ · · Score: 3, Informative

    I keep on seeing the same statement, over and over, saying:

    "I don't understand why MySQL is so popular, the only thing it has going for it is tha it's easier to install!"

    Answer...staring...right...at...you.

    --
    Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
  55. Big differences by StrawberryFrog · · Score: 2
    If the changes aren't that major

    But they are

    then you are saying that the gap between the two products isn't that big.

    I'm not saying that. It's a big gap, and not likely to close anytime soon.

    That those features of PostgreSQL that have been around for years aren't anything to shout about.

    That means that they are tested and proven. And work reliably now. That's worth shouting about.

    Is it that hard for you to imagine that the everyone else is getting along fine with what mySQL has to offer?

    If they understand the alternatives, and really only need a fast, small but junior leauge DB like MySQL, then no problem. If they are just ignorant, then I suggest trying harder.

    --

    My Karma: ran over your Dogma
    StrawberryFrog

  56. Re:MySQL is far easier and faster than PostgreSQL. by Decibel · · Score: 2

    Also, my guess is that they didn't bother turning off all kinds of features in the other databases in order to put them on equal ground with MySQL. Features such as transactions, row-level locking, etc.

    It's amazing how much faster a database runs when it doesn't have to worry about such 'niceties'.

  57. Re:Wow! by tzanger · · Score: 2

    Well 1 year ago no one in his right mind would touch PostgreSQL as it was buggy and slow as hell.

    <cough>bullshit. I've never had stability problems on Postgres, and if you turned off fsync-after-every-write (default on) your performance was actually pretty decent. Postgres was (is) always faster than MySQL for any type of query other than straight SELECT x from y where [simple clause].

    At the same time MySQL was always rock solid and fast as hell but missing lots of features.

    <cough>more bullshit. We ran MySQL as the backend for a RADIUS server for our growing ISP about 12-18 months ago; it crashed regularly (MySQL, which took down RADIUS). We're now using Postgres for the backend and moved to GNU-RADIUSd and it's yet to die (the backend; the RADIUS server has an "every x months" bug that's hard to duplicate)... This is with 8x the load now, too.

    You're right though, two radically different philosphies. Postgres is an RDBMS; MySQL was an SQL interface to a flatfile/hashed system. I'm watching MySQL to see how these new changes (transactions and ACID-compliance in general) are going to affect it, but it's got a ways to go before trumping Postgres, or any other RDBMS for that matter.

  58. Re:What's so major? by tzanger · · Score: 2

    I've found postgres to be nothing but a pain in the @$$.

    Care to cite a few examples? I'm curious to see what has caused you so much grief. I've found a few things with Postgres which pained me but MySQL would have fallen flat on its face long before I'd have encountered the problems.

  59. Re:I tried to buy PostgreSQL tonight... by Russ+Steffen · · Score: 2

    I just purchased a CD using Konqueror on Linux. There was clearly a submit button on every page. I don't know what the hell you're talking about.