Slashdot Mirror


MySQL: Building User Interfaces

Craig Maloney writes "If you are a Windows programmer looking to create or move your stand-alone database applications away from Microsoft-specific tools such as Visual Basic, Visual C++, Access or SQL Server, MySQL: Building User Interfaces is written just for you." Read on for the rest of Craig's review. MySQL: Building User Interfaces author Matthew Stucky pages 632 publisher New Riders rating 4/10 reviewer Craig Maloney ISBN 073571049X summary MySQL and GTK+ are used to create cross-platform applications, with copious code listings.

What's in the book? The first chapter guides the reader through the basics of MySQL and how it compares to Access 2000 and SQL Server 97. Next, a code listing demonstrates the basics of connecting to MySQL via C using the MySQL C API. the book gives an all-too-brief whirlwind tour to the basics of MySQL. The next four chapters are a tutorial on how to use GTK+ and GLADE, focusing on how these toolkits are similar and different from their Visual Basic counterparts. GTK+ was chosen in this book because of its cross-platform compatibility with both Windows and Linux / UNIX operating environments. The second part of the book takes what was learned about MySQL and GTK+ with GLADE and uses it to create a stand-alone application (a real-world order-entry application). What's Good? Throughout MySQL: Building User Interfaces, Stuckey describes exactly what he is doing and why he is doing it that way. The introduction to GTK+ in the first part of the book describes just about every GTK+ widget available (menus, buttons, sliders, status bars, etc.), and creates a monster busy-box application (not to be confused with the busy-box application by Bruce Perens) demonstrating those widgets by themselves. Later in the book Stuckey uses Glade to put applications together, but not using Glade early on gives the reader a chance to see what is happening under Glade's abstraction. During the building of the order-entry application, Stuckey explains the design decisions behind the widgets. Each window of the application is introduced first with a diagram describing where the widgets will be followed by the code for each widget. The design looks like a Visual Basic application designed by a a programmer, with an eye toward the functional rather than the aesthetics of user interface design, but as an introduction to GTK+ programming it works well. What's Bad? If there was ever a book that required a CD-ROM to accompany it, this book gets my nomination. Authors have to walk a fine line between presenting code snippets that don't make sense by themselves, or risk boring readers with page after page of code that might confuse readers who aren't yet ready to view full code listings. MySQL: Building User Interfaces chose to include the full code listing for everything. This is both a blessing and a curse: readers have the code right in front of them and don't have to worry about being in front of a computer while reading the book, but the flow of the book is interrupted every time something is introduced.

The descriptions also suffer, because those code listings are expected to explain in more detail what is going on. In the GTK+ introduction, widgets are introduced with short paragraph introductions. The real-world application, which should be the focus of the book, reads like an assembly line: A screen is introduced, the widgets are placed, and the code is listed. Worse, files which make little sense without a computer (such as files generated by glade) are presented along with the code listings. This makes reading this book a chore. Thankfully, there is an FTP site with the code ready to use, but future versions of this book would be best served to include it on disc.

Perhaps a balance can be struck in a future edition where important code concepts are highlighted without sacrificing seeing the code in a meaningful context.

So, what's in it for me? Windows programmers who need a hand in getting their applications to Linux or UNIX may find this book helpful (but overwhelming) as they learn. This book stands out as a bridge for Windows programmers to make their transition to Linux and UNIX smoother, but the emphasis and amount of code listings in this book may make Windows programmers choose a different route.

You can purchase MySQL: Building User Interfaces from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

266 comments

  1. Try SQLite by hendridm · · Score: 4, Informative

    MS Access has the advantage (on Windows machines anyway) of being a stand-alone database without needing a service to be installed. For a app where you don't want to have to install MySQL server and have it waste resources, you might consider SQLite. Unlike MySQL embedded, it's release under the public domain. MySQL Embedded is licensed under the GPL and has the following requirement:

    ... any program which includes, by linking with libmysqld, the MySQL source code must be released as free software (under a license compatible with the GPL).

    Although, depending on what you want to do with the software, this may not be a problem. I'm all for free and open source software, but a brother's gotta eat too.

    1. Re:Try SQLite by Anonymous Coward · · Score: 2, Interesting

      Can someone expand on the difference between a stand-alone db and one that needs a service to be installed? I just don't understand what the differences are between Access and other databases such as mySQL...

    2. Re:Try SQLite by man_of_mr_e · · Score: 3, Informative

      Access is simply an application. When you open the database, it's just like opening a file in a word processor.

      MySQL is a service that runs seperately from the application and must be started and stopped seperately. In most cases, the service is started at boot time and runs all the time, wasting resources unless you manually stop it.

    3. Re:Try SQLite by cscx · · Score: 3, Insightful

      An Access database (usually a .mdb file) is just a binary file. Your application uses the Access DB driver to read/write to this file.

      MySQL on the other hand (which may consist of multiple binary files) has to run a daemon (i.e., server) to be accessed. Your application uses the MySQL driver to talk to the MySQL daemon, either through TCP/IP or a local socket.

      This is why MySQL will *never* be a replacement for Access, despite what I often see on slashdot. You can fit a small Access database on a floppy. Conversely, you may need a full fledged DBA to run MySQL.

    4. Re:Try SQLite by Mod+Me+God+Too · · Score: 4, Informative

      I do a little DB development. The basic difference is a DB system like MySQL, Oracle or SyBase is that the 'DB' is the back-end (indeed it is a server-type process) which is interrogated by SQL statements (the front end may be built in C++, VBA, whatever), whereas something like Access is an all-in-one solution with the back-end and the front-end in the same app mish-mashed together (it may purport to be SQL-like, but only from within the app, not as a server) - I think MS still provide Foxpro as Access simple can't hack really big work. So an SQL-type database is the classic client-server, Access and Paradox don't seperate front and back ends (they say they can be split, but that is a bit of a bodge job).

      Wikipedia has a more thorough discussion here (for SQL) and here (databases in general but quite a read)

      --
      --

      It is not the commies, the government, the nigger, nor the corporates. It is your paranoia.
    5. Re:Try SQLite by gandy909 · · Score: 2, Interesting

      I suppose the app could easily be written to start the server when it starts and shut the server down when it ends, thus not wasting resources all the time...couldn't you? Not that mysqld is a resource hog anyway...

      --

      (Stolen sig) Remember: it's a "Microsoft virus", not an "email virus", a "Microsoft worm", not a "computer worm
    6. Re:Try SQLite by Anonymous Coward · · Score: 0

      MySQL is a service that runs seperately from the application and must be started and stopped seperately. In most cases, the service is started at boot time and runs all the time, wasting resources unless you manually stop it.

      I'd remove the "wasting resources" part from that description, because it's behaving like any server process does in that regard. Your SMTP server and HTTP server are also "wasting resources" while they're sitting there waiting for inbound connections.

      A typical use for a database such as mySQL or postgres is as the back end for some CGIs, such as a message board or shopping cart, and the way to do that is to have them running as server processes. Of course, most message boards and shopping carts are a complete waste of resources, so maybe that's an accurate description after all.

    7. Re:Try SQLite by ninejaguar · · Score: 1
      I'm not familiar with MySQL. Is it possible to start and stop the service from your application, as your application loads and unloads? I mean, even if there's a delay in starting MySQL (MS SQL starts and stops very quickly), it should be possible to do it in the background as your application loads without much (if any) delay from the user's perception.

      I've been thinking of trying that with FireBird.

      = 9J =

    8. Re:Try SQLite by hendridm · · Score: 2, Insightful

      > I suppose the app could easily be written to start the server when it starts and shut the server down when it ends

      True, but besides being sort of hokey, the requirement of having MySQL installed might not be ideal if your target audience isn't savvy enough to install it, or perhaps don't want extra, normally unnecessary, stuff on their computer. I guess it all depends on your needs and target audience.

    9. Re:Try SQLite by jcoleman · · Score: 5, Funny

      I'm all for free and open source software, but a brother's gotta eat too.

      Hope you like Indian food!

      Coleman

    10. Re:Try SQLite by laird · · Score: 1

      "I'd remove the "wasting resources" part from that description, because it's behaving like any server process does in that regard. Your SMTP server and HTTP server are also "wasting resources" while they're sitting there waiting for inbound connections."

      Good point. I'll elaborate in case someone doesn't get the point -- under UNIX (or Linux) there's essentially zero system cost to having a server running if it's not active -- it just gets swapped to disk by the OS' virtual memory system, and doesn't take up any CPU time unless it's called, so all CPU and RAM resources are available to other applications. So unless you _really_ care about a few MB of disk space, or a second or two of boot time, you'd never notice that MySQL is running.

    11. Re:Try SQLite by Frymaster · · Score: 4, Funny
      he service is started at boot time and runs all the time, wasting resources unless you manually stop it.

      right. think "daemon".

      microsoft just uses the word "service" because sco owns the word "daemon".

    12. Re:Try SQLite by AndroidCat · · Score: 2, Informative

      Hmm. Access is an application which uses the underlying MSJET engine. Anything that can create an ADO object (or OLEDB or DAO...) can use that engine without Access running. The engine also handles reference counts so that if more than one program is using it, it won't load multiple copies and it won't unload until the last one closes it.

      --
      One line blog. I hear that they're called Twitters now.
    13. Re:Try SQLite by Anonymous Coward · · Score: 0

      Ah, Wikipedia, ever trusty. Surprised you refer to Paradox though, havn't seen that in years!

    14. Re:Try SQLite by laird · · Score: 2, Insightful

      "This is why MySQL will *never* be a replacement for Access, despite what I often see on slashdot."

      That's true -- it would be more accurate to describe DBM as a replacment for Access, and MySQL or PostgreSQL as a replacement for SQL Server.

    15. Re:Try SQLite by cscx · · Score: 3, Informative

      Actually, I think you may have been mislead if I read you correctly. Another person in the thread was correct when they said that Access is a front-end to the actual Access database. You can run SQL queries against an Access database... the functionality is built into the driver.

    16. Re:Try SQLite by cscx · · Score: 1

      Hmm, does DBM allow you to run SQL queries against it?

      Often I've seen Linux users suggest using PHP + MySQL as a drop-in replacment to Access. That is really way off base.

      Does DBM have a GTK/Qt interface, or is it only through a Perl CGI?

      Access' main advantage is that the interface can run as a standalone app.

    17. Re:Try SQLite by P-Nuts · · Score: 1
      An Access database (usually a .mdb file) is just a binary file. ... You can fit a small Access database on a floppy. ...

      Are you aware that the data in a MySQL database can be ripped out to a file with the mysqldump command? Okay, perhaps passing it through bzip2 or similar will improve the odds of fitting it on a floppy.

      And an Access database in an MDB file is hardly standalone, you still need a machine running Access to get much use out of it.

    18. Re:Try SQLite by Mod+Me+God+Too · · Score: 1

      Yes, you are quite correct, infact I've been using ADO ad-hoc in Excel VBA for a couple of months (it was not a pleasant experience, but VBA never is).

      [slaps wrist]careless![/ceases slapping wrist]

      --
      --

      It is not the commies, the government, the nigger, nor the corporates. It is your paranoia.
    19. Re:Try SQLite by cscx · · Score: 3, Insightful

      Are you aware that the data in a MySQL database can be ripped out to a file with the mysqldump command? Okay, perhaps passing it through bzip2 or similar will improve the odds of fitting it on a floppy.

      Well obviously, I too can do a text export of Access and gzip it as well! But that doesn't, uh, help the situation.

      And an Access database in an MDB file is hardly standalone, you still need a machine running Access to get much use out of it.

      Wrong. You don't need Access to create/update/use an Access database. The functionality it built into Windows (actually part of a bigger module called Jet).

    20. Re:Try SQLite by cscx · · Score: 1

      And an Access database in an MDB file is hardly standalone, you still need a machine running Access to get much use out of it.

      Actually let me expound on this a bit further... you can write a VBScript in your favorite text editor to do SQL operations on an Access database... just use an ADO object...

    21. Re:Try SQLite by AndroidCat · · Score: 1
      Do they actually include Jet as part of Windows now? It used to be that you needed an app that installed the engine. (Like Office, duh! :)

      Well, that would make my installation much easier if I just use it as the default db... (he said as he slides further into Microsoft's trap...)

      --
      One line blog. I hear that they're called Twitters now.
    22. Re:Try SQLite by w00t_sargasso · · Score: 2, Interesting

      So... You are telling me that Microsoft Access, or at least that part of it _necessary_ to read mdb's will fit on the floppy as well?

      I like MySQL because it _is_ a server -- You can create any application in (almost) any language on any platform (think php) to interface with a MySQL database. Try telling me that you can do that with access.

      And you _can_ also fit a SQL db on a floppy.

      To sum:
      -You cant fit M$ Access on a floppy, but you can a db.
      -You cant fit MySQL on a floppy, but you can a db

      -MySQL is free (and all applications do remain PROPRIETARY provided they dont modify the MySQL source in any way -- Read the licence properly dudes.
      -M$ Access is NOT Free in ANY interpretation of the law (to test, try telling Microsoft that it's free...)

    23. Re:Try SQLite by torok · · Score: 2, Informative
      MySQL will *never* be a replacement for Access

      I am in complete agreement.

      I write small DB apps for small businesses. My clients all have MS Access installed. I would love to be able to use all open-source tools to develop these apps, but so far nobody can show me something that's as simple for my computer-illiterate clients to install as "Here, copy this .mdb file to your hard drive and double-click on it". Installing one more piece of software wouldn't be hard either, but if I have to say "Here, install OpenOffice first, then install MySQL, make sure it's running, then run this script to put the right data in MySQL, then make sure you have the right MySQL drivers installed, THEN double-click...." You get the idea.

      Most people have a hard enough time with "Copy the .mdb file to c:\dbprogram". Requiring them to install a service with appropriate drivers on their old PentiumII running Access2k is a nightmare and suicidal for a small software company.

    24. Re:Try SQLite by ttfkam · · Score: 1, Informative

      It's not like you can just drop an *.mdb file onto a box and use it. Access still needs to be installed. This puts it on about equal footing with MS Access in that even though MS Access is more common, MySQL is a free download if the system you're on doesn't have it. Of course, that assumes your office is running MS Windows. (Not a bad assumption, but good to keep in mind.)

      Along those lines, you shouldn't be coding directly to MS Access anyway. Writing your stuff to an ODBC datasource is a much better choice. Luckily, every popular database in existance has an ODBC driver. With ODBC (or ADO) and a client-server database, you can have the database local to you for initial development and then move it off to a dedicated server without changing a single line of code. With a MS Access database, you can have a dedicated fileserver, but locking issues between clients get really hairy after more than a couple of people connect and work at the same time.

      SQLite is great if memory constraints are very tight and you probably won't move to a client-server model in the future. How much is a 256MB DIMM these days? 256MB is enough for most relational databases to have a field day with the datasets that MS Access is used to. And memory's only getting cheaper. Make sure that you have a real need to constrain yourself to the in-process model before jumping in.

      Also note that if you use an ODBC datasource, you can use the comparatively wonderful Access frontend and have a real data store in the background doing the heavy lifting.

      But then, if you really wanted to do it right, you'd use something better than MySQL on that backend like MaxDB, Firebird, or PostgreSQL; Same cost, more features, scale better with concurrent writes, and safer for your data (actually tells you when crap data is trying to find its way in) than MySQL. Remember, if you're talking about replacing MS Access, you're probably not talking about a web environment anymore. Chances are that it's not 99% reads.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    25. Re:Try SQLite by spasm · · Score: 1

      "You can fit a small Access database on a floppy. Conversely, you may need a full fledged DBA to run MySQL."

      On the other hand, my current fieldwork database (at the point we were switching from access to mysql) was a 50mb Access file, but a 200kb mysql dumpfile.

      I could refresh remote copies of the mysql version over a 56k dialup (or by floppy) no problem, but duplicating the access db (don't even talk to me about 'sync' - I lost count of how many rollbacks to backup I had to do after using sync. one of the reasons we migrated) was impossible without boradband or cd burning.

    26. Re:Try SQLite by Anonymous Coward · · Score: 0

      I don't, but once in awhile I pass around the peace pipe for good measure...

    27. Re:Try SQLite by delus10n0 · · Score: 1

      Actually, all you need is the Microsoft Data Access Components installed ( http://msdn.microsoft.com/data/ ) if you wish to just read/write to the Access database.

      And as a side note, if you're doing any sort of development in Access, your database shouldn't even be in the Access file. You're much better off using a real database, like MS SQL or MySQL/etc. to handle the data storage, and link to that through ODBC or ADO (I prefer ADO, but whatever.) Also, your program's logic (especially when it's complex) should be contained server-side, in the form of a stored procedure in the database. Anything else is asking for trouble.

      --
      Not All Who Wander Are Lost
    28. Re:Try SQLite by cscx · · Score: 1

      Try telling me that you can do that with access.

      In a word, yes.

    29. Re:Try SQLite by ncc74656 · · Score: 1
      MySQL is free (and all applications do remain PROPRIETARY provided they dont modify the MySQL source in any way -- Read the licence properly dudes.

      Your app only remains proprietary until you decide to distribute it. If you distribute an app that uses MySQL APIs, either (1) you have to GPL your app or (2) you have to pay MySQL if you don't want to GPL your app. It doesn't matter if your app is to be BSD-licensed, closed-source, or whatever...if it's not GPL'd, you have to pay MySQL if you distribute your app.

      --
      20 January 2017: the End of an Error.
    30. Re:Try SQLite by millahtime · · Score: 2, Interesting

      wait, who still uses a floppy. The only time I have used one of those in the last 4 years is an ftp install of reebsd. other then that, what use is there?

    31. Re:Try SQLite by man_of_mr_e · · Score: 1

      Resources does not simply mean CPU time. It also means memory. Further, it's another process in the process table, and unless you ahve the O(1) scheduler running, it increases the amount of time the scheduler takes to run new processes.

      Now, all of those things take only a fraction of a microsecond to accomplish, but it's still "wasted" if you're not using it.

    32. Re:Try SQLite by man_of_mr_e · · Score: 2, Informative

      Everything that you said is true, but MSJET doesn't run as a service. It's just DLL's that get loaded into the applications process space and execute in the context of the application.

    33. Re:Try SQLite by man_of_mr_e · · Score: 2, Informative

      Not exactly true. While it's true that the service won't use many (if any) CPU cycles while waiting, it will use memory.

      You're incorrect that this memory will get swapped to disk, since that will only happen if memory becomes low.

      The problem with this is that Linux (as do many OS's) has a system of buffers and caches which use unallocated memory to speed up the OS. Having a bunch of memory allocated (but not enough to swap them out to disk) lowers the number of buffers and caches available to the OS, thus decreasing performance.

      Finally, whether or not the memory is swapped out to disk, it's still resources, and it's still wasting them if the service isn't being used.

    34. Re:Try SQLite by joggle · · Score: 1
      Do they actually include Jet as part of Windows now?

      I'm pretty sure it comes standard with Windows. I know it has been a free download from microsoft.com for quite some time (at least several years).

    35. Re:Try SQLite by ttfkam · · Score: 1
      You're much better off using a real database, like MS SQL or MySQL/etc. to handle the data storage...
      ...
      Also, your program's logic (especially when it's complex) should be contained server-side, in the form of a stored procedure in the database.

      As MySQL doesn't support stored procedures, these statements are incompatible. But then you knew that didn't you, you cheeky bastard. ;-)
      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    36. Re:Try SQLite by Narcissus · · Score: 3, Informative

      MySQL Connector/C++ (the C++ API from MySQL) is LGPL.

      So long as you link it correctly, you do not need to release the source code to your application: no matter how confusing the licencing on the MySQL website is...

    37. Re:Try SQLite by dolmen.fr · · Score: 1

      Do they actually include Jet as part of Windows now?

      Yes, they do. Jet was even used in Windows services in Windows NT 4.0 Server, such as DHCP or Winbind even if the the database didn't had a .mdb extension. I don't know if it is still the case in Win2k.

      The lastest version MSJet can be installed with Microsoft Data Access Components : http://www.microsoft.com/data/

    38. Re:Try SQLite by stephanruby · · Score: 1
      This is why MySQL will *never* be a replacement for Access, despite what I often see on slashdot.

      It's all a matter of perspective. To a programmer, Access is the means of a cheap no-frills datasource that can be served as a service on the internet or an intranet. So in that sense, MS Access is already being replaced in that area. And to some extent, even SQL Server 2000 is starting to be replaced by MySql in some instances. And no, I'm not just trolling. And yes, I do realize that SQL Server is still much easier to use, especially now that the .NET studio does most of the work for you. But just to give you an example, my favorite host CrystalTech, which used to be very windows-centric, is now pricing MySql way below SQL Server and suggesting MySql for some jobs that SQL Server can't handle.

    39. Re:Try SQLite by dolmen.fr · · Score: 1

      Yes. Microsoft Access stores the application code, forms and all in the .mdb file with the data.

    40. Re:Try SQLite by ttfkam · · Score: 2, Insightful

      Even with an O(n) scheduler, an idle daemon is nothing. While some others may be impressed with your use of Big-O notation, many of us are not. Even an O(n^2) algorithm isn't that bad if your dataset is sufficiently small. The O(1) scheduler is a glorious thing only because the number of processes (forks, threads, etc.) reaches very high amounts on a large, loaded system. At hundreds of thousands of processes/threads, the choice of scheduler makes a big difference in overhead. And for that matter, if the number of processes without an idle RDBMS running is 100,000, and the RDBMS pushes it to 100,005, the scheduler isn't going to care. It'll be highly unlikely that you could reliably measure a difference.

      At smaller numbers (one or two hundred), who cares? Your server isn't using 100% of your resources (CPU or otherwise). They are just going to waste if there's no RDBMS loaded. ;-)

      This argument is old. It's like the assembly vs. C debates in the seventies. ...and just as clear cut. "Premature optimization is the root of all evil." Works for system administration as well as software engineering. The real question isn't "which is more efficient?" The real question is "which gets the job done faster?" If I can start a RDBMS and walk away, that constitutes "faster" to me.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    41. Re:Try SQLite by smchris · · Score: 1

      I'm all for free and open source software, but a brother's gotta eat too.

      Nonsequitor.

      MySQL and PostgreSQL are Mozilla-license.

      Write great server code, write a great Windows client for it and sell the package as you desire.

    42. Re:Try SQLite by YrWrstNtmr · · Score: 1

      An Access .mdb can hold both the 'back end' tables/views, and the 'front end' GUI, code, SQL statements, procedures, reports, etc.

      Although, a better way to deploy an application in Access is two mdb's. One containing the backend table structure & data, and one containing the front end GUI. That way, when you want to implement new features in the GUI, you don't have to screw with the data. Simply delete the prev version front end, ad drop in the new one. Via code, this can be automatic & seamless to the user.

    43. Re:Try SQLite by YrWrstNtmr · · Score: 1

      n the other hand, my current fieldwork database (at the point we were switching from access to mysql) was a 50mb Access file, but a 200kb mysql dumpfile.

      You are talking about two different things. How large would the Access mdb be if it were only the table structure and data? Your 50mb Access file presumably contained all the front end junk as well. Which can be quite large. Especially if you don't Compact once in a while.

    44. Re:Try SQLite by drdreff · · Score: 1

      This is why MySQL will *never* be a replacement for Access

      The moment you want to share a database between multiple users simultaneously you need to replace Access. In one deployment I have taken the half step of using Access as the front end for MySQL using ODBC.

      We don't lose data and the DB doesn't crash any more. The front end is still a pain to administer, but what the customer wants...

      You can fit a small Access database on a floppy.

      Is that a tremendous floppy or a uselessly small DB? In my experience, as soon as an Access DB becomes useful, it becomes unstable.

      --
      As seen on Wired: Get a free desktop PC
    45. Re:Try SQLite by laird · · Score: 1
      "Does DBM have a GTK/Qt interface, or is it only through a Perl CGI?"

      DBM is a C library, so it's trivial to use from C and C++, and has API's for Java, Perl, Python, PHP and Tcl. It doesn't have a GUI, unless you consider an IDE a GUI :-). So you could write GTK/Qt code to talk to DBM, but it's not tied to any particular GUI. So it's not a drop-in replacement for Access -- it's 100x smaller and 100x faster (YMMV), but requires you to write code. The parallel with Access would be that it's an embedded filesystem-based database, as opposed to a stand-alone database server (a la SQL Server, MySQL, etc.).

      "Hmm, does DBM allow you to run SQL queries against it?"

      Nope, and they'd call that an advantage -- dbm is an extremely small and efficient C library -- making your app generate SQL, then pass the SQL to the database to parse out your meaning would just add complexity and slow things down. Of course, there are times when SQL is important, but for straightforward applications where efficiency is critical (i.e. when you need a database embedded in an application, not for use as a general database) dbm is a nice way to go.

      If you want to use SQL, you can uselibmysqld. It's not as efficient as DBM, of course, but it does give you full SQL, which has a lot of value, too.

    46. Re:Try SQLite by IANAAC · · Score: 1
      microsoft just uses the word "service" because sco owns the word "daemon".

      Apparently SCO scared RedHat too :-)

      /sbin/service mysqld stop

    47. Re:Try SQLite by sparkane · · Score: 1

      Access is a funny thing: it's actually four programs in one.

      a) Jet database/sql engine.
      b) forms engine.
      c) reports engine.
      d) visual basic scripting (only differs from normal VB in that it doesn't use the same forms engine and can't compile standalone code).

      I don't count macros. Never have. :)_

    48. Re:Try SQLite by Anonymous Coward · · Score: 0

      I thought that was "Dameon"

    49. Re:Try SQLite by Saint+Stephen · · Score: 1

      Thanks, I'll give it a try. However I prefer rolling my own with libXML and gnomes GtkTreeViewModel -- use libXML for serializing the data, and keep the entire database in-memory in a GtkTreeViewModel.

      It's perfect for single-user, small, personal databases. No binary interfaces to fail. Transactional consistency is a snap -- you commit all changes in one fell swoop.

      It's good enough for 1mb databases. If I need more, I'll use a "real SQL".

    50. Re:Try SQLite by mabhatter654 · · Score: 1
      The bigger draw for Access is that MS allows program makers to redistribute the access core program for their front-end to use. the advantage is that "headless" Access can be included with whatever app you're setting up for your users. It still requires having the same resources available that you'd need to run the full program...and the MS office version compatibility problems!

      the problem with MySQL is that you HAVE to get the USER to install the full verson of MySQL on their station if you want to use it...you can't use embedded without paying seperately for it. It's not any better or worse than MS, but the loophole in using MySQL is to create your program completely independant outside MySQL [that's how PHP handles things] and simply let the User get and agree to the license seperately. unfortunately that's really disruptive to IT oranizations to install 2 seperate programs...as well as training users in somewhat advanced [starting services rather than clicking icons] computer operations! Compariblity to Access is an issue MySQL needs to address publicly...requiring people to GPL everything just to have an app USE MySQL is not a valid answer...they need some "guidelines" similar to the "arrangement" with the PHP guys because it's the same issue. Or, adjust their program to be more "invisible" to regular users...although on windows the installer is pretty good...but programs have to be able to start and stop MySQL services independantly...without violating GPL.

    51. Re:Try SQLite by mabhatter654 · · Score: 1
      Not really, while some apps use the .mdb file type what's really happening is that MS has just bundled the Access "program" executable with your program when you compiled it and created the package. If you can see the access file type under the create new menu, you've got a "headless" version of access installed..complete with Office extensions and exes!

      Certian apps can "connect" to an access file type independantly...just like reading a file. What MySOL should do is create a Mini-MySQL file type and give it access-like properties...while still keeping it a seperate program...rather than embedded. Their GPL-only stratagy is shooting them in the foot here frankly. Or rather, they're not getting good info & samples out there about how to get MySQL to be more Access-like.

      or perhaps...somebody else needs to go after access...Unfortunately there's not a large market. If your using Linux, you can get pre-installed MySQL in most distros now...you just have to use it! so there's no need for Access on linux. If you have an app to run on windows, you can just set up full MySQL [again for free] and it will work like on linux. The only real problem is in creating apps for OTHER people..particularly on Linux for windows users. Even then, MySQL is fairly small and the installer quite good...if there was just a more "legal" way to bundle it with your program and not violate GPL..while setting it up automatically from inside your app..or a properly GPL'd helper app.

    52. Re:Try SQLite by cookd · · Score: 1

      A bit over-simplified, but one way of looking at it is whether the database engine runs in the same process as the application that uses the database.

      A metaphor may be useful here. You could consider it the difference between grabbing a meal in your own kitchen or getting take-out. Making a meal in your own home doesn't really take any coordination from anybody, and you can just take care of it yourself -- you just have to have your own food and your own kitchen appliances. If you want to order out, you have to look up the restaurant's phone number, call, make an order, pick it up, and pay for it, but you don't have to have your own food or your own appliances.

      In a standalone database, the database engine runs in the same process as the application (i.e. you eat in your own house). You "start" the database engine by running the app (the kitchen is only producing food when you want to eat). This is simpler because there is just one program to manage, the data storage acts just like any other file you want the application to open, and the database engine is just another module the application uses.

      In a service (or client/server) architecture, the database runs as a separate process (the restaurant is a separate establishment). The database engine is one program that can start and stop by itself (the restaurant opens at 9:00am and closes at 10:00pm), and the application is another program that can start and stop independently. This is a bit more complicated because the application has to make sure the engine is running, connect to it, and authenticate to it.

      The advantage of the standalone database is simplicity and efficiency in the single-user or single-computer scenario. If you only have one client accessing the database, there is no need for authentication, interprocess communication, locking, etc. The database is just another file to be opened, edited and closed.

      If a standalone database is used by multiple clients at the same time, things start to break down (too many cooks in the kitchen at once). The advantage of the standalone database was the simplicity of having only one program to worry about, but if there are multiple clients, that is no longer the case. The different client programs now have to coordinate their access to the database. This is not necessarily hard to do, but it isn't very efficient or scalable. Your kitchen just isn't designed to allow 400 individuals to make their own meals every day. People are going to fight over who gets to use the oven next, somebody is invariably going to leave a mess and not clean it up, and you're probably going to run out of food (who ate my cheese?).

      When there are many clients, it is better to just have one database engine servicing all of them, so you create a service that starts and stops independently of the clients. A single process is in charge of providing the data (i.e. a single establishment is dedicated to the task of providing food). This would be wasteful if only one person were to eat there each day, but it is much more efficient if many eat there every day.

      --
      Time flies like an arrow. Fruit flies like a banana.
    53. Re:Try SQLite by w00t_sargasso · · Score: 1

      So we have established the need then for MySQL to clean their licence up a bit?? I mean, with so many interpretations bouncing around, their bound to lose money...

    54. Re:Try SQLite by man_of_mr_e · · Score: 1

      Funny, but I don't consider shutting off a service you're not using to be "premature optimization". Not only is it pointless to run the process, a waste of resources (no matter how insignificant you might think they are), but it's also a security risk.

      Frankly, I can't believe any Linux enthusiest would advocate running services without need. That's stupid.

    55. Re:Try SQLite by man_of_mr_e · · Score: 1

      Actually, the biggest draw to access is that everything (outside of the runtime) is encapsulated in one single mdb file. All your forms, queries, data, etc... Just click and go. Various frontend tools for MySQL (or any client/server database for that matter) mean seperating your data from your application, which is more sound, but nowhere near as convenient. As we know, convience rules the retail market.

    56. Re:Try SQLite by AVee · · Score: 1

      So we have established the need then for MySQL to clean their licence up a bit??

      True. I've heard so many versions about when you need a license and when not that it makes one thing perfectly clear, it unclear.

      I mean, with so many interpretations bouncing around, their bound to lose money...

      Well, i doubt that. A lot of bussinesses might you buy a license, just to be sure. Clearing the matter up might just be not in the interest of MySql A.B.

      The server is licensed GPL, so anyone can download and install that. As soon as you modify the server you will need to release that changes, but you often would you want to have to maintain your own version af a database server... The client libs are where it get's interesting. These are mainly GPL, wich means you can't link closed-source software against them. Yet some of them are LGPL in wich case you can link your closed-source software against it.

    57. Re:Try SQLite by dave420-2 · · Score: 1

      Wasting resources? I've got a windows box here serving a floor of sales consultants, letting them mix-up packages in real-time for customers, and it's currently using 15megs of memory, and about 0.1% cpu time. That's hardly wasting resources, seeing as it's instantly accessible.

    58. Re:Try SQLite by Geccie · · Score: 1

      "... any program which includes, by linking with libmysqld, the MySQL source code must be released as free software (under a license compatible with the GPL)."
      This does not appear to be a problem. It says that you must release the MySQL source code, not the code that links with it.... Aside from having to maintain and offer a copy of the MySQL code, I dont see a problem.... Rebut? - Geccie

    59. Re:Try SQLite by Fulcrum+of+Evil · · Score: 1

      So long as you link it correctly, you do not need to release the source code to your application: no matter how confusing the licencing on the MySQL website is...

      Personally, I'd prefer to avoid the issue entirely and use something that is more explicit about not claiming my code. After all, who's to say that the MySQL guys interpret their license the same way you do?

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  2. more sellers by tedtimmons · · Score: 3, Informative

    amazon link

    isbn.nu link

    half.com link

    No affiliate tags are used above. But here's the amazon link with my tag, if you feel generous.

  3. My opinion by W32.Klez.A · · Score: 2, Informative

    I have read this book, and used it to my advantage. However, they don't properly explain some parts about what you're doing, and why you're building the interface. I was hard pressed to find the exact reasoning they used for some of the things they did, but other than that, it's a great resource for mysql developers such as myself.

    1. Re:My opinion by sentanta · · Score: 1

      Dude - the picture at your sig is really foul. I'll need a few more beers to wipe that from my memory, just like that girl in . . . never mind.

      --
      The Big Yuan - tracking mainland China
  4. MySQL Feature Set by Saeed+al-Sahaf · · Score: 4, Insightful

    Before all the naysayers start in on what a flaky database MySQL is, how it doesn't do this or that, that it just a toy, please visit their web site and see what its current feature set is.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:MySQL Feature Set by Anonymous Coward · · Score: 0, Funny

      Nah, it still sucks... Use Postgres

    2. Re:MySQL Feature Set by Anonymous Coward · · Score: 3, Informative

      another interessting read is here.

    3. Re:MySQL Feature Set by Anonymous Coward · · Score: 0

      Hey, this is /.. Knocking MySQL's features are like complaining that Debian is out of date and ships with an old new kernel. It's all part of being an arrogant geek - what I do is obviously better than what you do!

    4. Re:MySQL Feature Set by w00t_sargasso · · Score: 1

      Damn straight!

      MySQL -> More stable than Access More accessible than Access (Think TCP\IP interface) More extensible than access


      And it's open source! (Although, if you modify the source, any apps you create that interface with it become open source too...)

      Access == Microsoft
      :therefore Access != Cheap
      :ALSO therefore Access != Stable

    5. Re:MySQL Feature Set by Mitleid · · Score: 1

      Question...

      What if I use Access to build a crude front-end to a MySQL server (which I am painfully drudging through right now...) Do I need to liscence MySQL, or am I just commiting a cardinal sin, asking for the universe to collapse in all around me? ...As far as GPLing my code, hell, I don't care who looks at my MS Access VB. It's a mess. Ha. But seriously, if I'm going to deploy this setup in a small bidness, what do I need to consider...?

      I've been wondering all this for a while, but it came up here so I thought I might as well ask. Hope I'm not OT.

      --

      --
      Is it me, or did it just get fatter in here?
    6. Re:MySQL Feature Set by w00t_sargasso · · Score: 1

      So long as you don't modify MySQL, I BELIEVE you should be fine. Try checking the licence on MySQLs Website

    7. Re:MySQL Feature Set by Geccie · · Score: 1

      Ha. But seriously, if I'm going to deploy this setup in a small bidness, what do I need to consider...?

      Spelling :)

  5. Make sure you use MySQL version = 4.0 by spun · · Score: 4, Informative

    Before that, the dang thing doesn't support nested subqueries, or any kind of subqueries on inserts and deletes. Found that out the hard way recently (the docs don't make it very clear) and had to rewrite a bunch of elegant SQL as less elegant Perl loops and wacky joins.

    Still, I love MySQL. Postgres is more full featured, but for the smallish web-based applications I write, it's overkill.

    --
    - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
    1. Re:Make sure you use MySQL version = 4.0 by blackrat · · Score: 1

      Exactly, MySQL is lean and mean and usually competent enough to solve the DB stuff at least in my applications/web sites. But as you say, the pre-4 versions do not support nested sub-queries -- also had to make some kludgy PHP constructs and quite a few not too nice join statements recently just due to this annoying fact. Unfortunately, upgrading to v4 was not option. :-/

    2. Re:Make sure you use MySQL version = 4.0 by _fuzz_ · · Score: 2, Insightful

      Actually, subqueries are only supported in 4.1, which is not considered production level. So there still isn't a production-quality MySQL server that supports subqueries.

      --
      47% of all statistics are made up on the spot.
    3. Re:Make sure you use MySQL version = 4.0 by ttfkam · · Score: 5, Insightful
      And it provides so little in the way of data integrity, that you'll have to spend that much more time adding the necessary functionality into your app layer.

      Example? Okay, whip out your MySQL client and type with me...

      CREATE TABLE test (
      id INT NOT NULL AUTO_INCREMENT PRIMARY_KEY,
      num1 INT,
      num2 INT NOT NULL,
      num3 INT
      price NUMERIC(4,2),
      code VARCHAR(8),
      );

      INSERT INTO test VALUES (
      0,
      99999999999999,
      NULL,
      'A quick brown dolphin...',
      21474.83,
      'ABCDEFGHIJK'
      );

      ...now after this, it should have given you a message like:
      "Query OK, 1 row affected"

      Seems to me that the data was a collection of square pegs to round holes, but MySQL never even dropped a warning.

      So let's check out that table again:

      SELECT * FROM test;

      1 row with the following is returned.

      id: 1
      num1: 2147483647
      num2: 0
      num3: 0
      price: 999.99
      code: ABCDEFGH

      Now stop. Take another look at the table definition. Take another look at the inserted data. Take another look at the output. Take another look at what has been stored in your database. Let's sum up: your primary key (your lookup key!) is not what you expected, the numbers are all different from what you entered, the price does not conform to your data schema (should be a maximum of 99.99), and your character string has been truncated...ALL WITHOUT AN ERROR OR WARNING.

      More examples at MySQL Gotchas. All of this in MySQL v4.0 and above. None of this crap happens in Firebird 1.5, PostgreSQL 7.x, or any popular closed source relational database.

      ...and it is crap. You have crap data in your database, and MySQL never let you know. For those of you out there who never ever write code with bugs, there's no problem; Go on ahead using MySQL. (Then again, you're in high demand for senior, very well paying jobs using Oracle or DB2 in Fortune 100 companies if that's the case.) For all the other folks out there (which includes everyone out there doing web development with dynamically typed languages like Perl and PHP), MySQL will happily insert crap data.

      And yes, there's a PostgreSQL Gotchas page. Tables are lowercase by default, and it requires the "AS" keyword for column aliases. Look at that list for PostgreSQL. Look at that above example. Can someone say with a straight face that these lists are comparable? Can someone say with a straight face that they want to explain to the computer-phobe why they got 2147483647 in their data? Can someone say with a straight face to their boss that these errors are acceptable in a production environment?

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    4. Re:Make sure you use MySQL version = 4.0 by Delirium+Tremens · · Score: 1
      Thanks a bizillion times for those links!
      You have succesfully scared me away from MySQL...

      Next time I start a new project that requires persistence, I am dicthing MySQL.

    5. Re:Make sure you use MySQL version = 4.0 by skiflyer · · Score: 1

      I have enough gripes with MySQL... but subqueries are not one of them. They're highly overrated, and nine times out of ten the correct joins will run circles around them performance wise.

    6. Re:Make sure you use MySQL version = 4.0 by chromatic · · Score: 1

      You failed to quote the third sentence of the PostgreSQL gotchas page:

      This is work-in-progress; a few more gotchas will follow as time allows.

      Use what you like, but comparing a list of twenty gotchas to a page clearly labeled "not finished yet" seems a little bit unfair. (Your claim that "professional" companies only use statically typed languages also seems rather unfounded.)

    7. Re:Make sure you use MySQL version = 4.0 by Anonymous Coward · · Score: 2, Insightful

      Who writes INSERT statements without giving field names? And if you don't know your table structure and what you are putting into it, then you deserve the anquish to come.

      I do database work with MySQL and SQL Server 2000. All functions I write check that the data I'm getting or putting to the database matches the data type. It's a little extra legwork, but I don't carry a pager for dumb mistakes that can be avoided either.

      Never throw data at your DB like as parent poster describes above.

  6. I'd give it at least an 8 by Anonymous Coward · · Score: 2, Interesting

    I've been working through this book for quite some time, and now that I've extracted all i can I have to declare myself delighted with it. The examples are good, deep enough to convey the lessons but shallow enough that not too much is irrelevant. I now have, as the author promised, several applications that will compile easily under both linux and win32. If i can fault the book at all , my only reservation is that is would have been nice to see all the necessary software included on the cd. Downloading all of the required applications and libraries (particularly for windows) led to a treasure hunt accross the web. That aside I would recommend this book to anyone who is not new to programming and databases, a little prior knowledge will be required as this is definately not a complete beginners book.

  7. Interesting Book by saberworks · · Score: 5, Insightful

    I read most of this book (maybe an older version?) last year. I found it very interesting because it basically gave me the idea to let the staff members of my web site update the site through a windowed interface as opposed to a web interface. MySQL doesn't have to be running on the same computer as the program is running on, so this would be simple. That way you could provide a rich client (for staff members, not end-users) to update a web site based on MySQL.

    I know, it's not an original idea, but it's interesting because the book was a nice, step by step guide to doing just this. For what it's worth, I enjoyed it.

    On the other hand, I ended up spending time with XUL instead.

    1. Re:Interesting Book by gbrayut · · Score: 2, Insightful

      Just wondering why you wanted to get away from the web interface? If done correctly, isn't a web interface much better then a client/app, since it provides a single interface that works on all operating systems and from all locations?

    2. Re:Interesting Book by saberworks · · Score: 1

      There are a few problems. There are tree structures that are hard to reproduce on a web interface (think of a directory tree in Windows Explorer with collapsable nodes) [note: I said hard not impossible]. There are also other widgets (like select boxes that also allow you to type values, and rich text editing widgets) that are only reproducable using javascript/dhtml. Most of the 3rd party widgets out there require certain version of Internet Explorer, and while the visitors to my site are mostly all Windows users, most of the staffers don't use Windows, and if they do, certainly don't use IE.

      On top of that, I wanted to do some experimenting (just for fun). We're not really a business or anything like that, so there was no real business decision made for it.

    3. Re:Interesting Book by EastCoastSurfer · · Score: 1

      Web interfaces work great for read-only content. Complex UI for data entry is a PITA on the web though.

      If your app has a ton of content that is read-only(ie. a reporting app of some sort) and only a few people doing the updating then it makes sense to have a fat client for data entry and a web interface for everyone else.

    4. Re:Interesting Book by Stinking+Pig · · Score: 1

      probably because that "if done correctly" part can be really hard.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    5. Re:Interesting Book by gbrayut · · Score: 1

      It is actually pretty easy to create tree strucures using the CSS Display property and simple javascript commands. It also allows for more complex trees that contain text,radio or other user input. We use them all the time in PHP and ASPX, and they are a great way to create compact interfaces.

      I have always thought that while web applications are harder to implement they usually pay off in the long run, since they are easier to update and (for the most part) side-step any OS compatability issues.

      Of course I'm a web programmer, so my opinion might be bias :-)

    6. Re:Interesting Book by gbrayut · · Score: 1

      Yeah, but the ease of updating and ablility to scale makes the initial investment worth while. When working at a large company it can be quite a hassel to update a client/application on every computer.

    7. Re:Interesting Book by Stinking+Pig · · Score: 1

      of course. I was just trying to answer your question, not defend the answer :-)

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
    8. Re:Interesting Book by saberworks · · Score: 1

      Notice I said "hard to reproduce" not impossible. We have a solution that does just that, with javascript, and works on virtually all recent browsers. That doesn't solve the rest of the problems though (like a rich text editor or a combo box that can be typed in).

      I'm also a web programmer and I do my best to stay away from javascript. The reason is that browsers implementations are so different that it's a huge pain to get it working correctly and similarly in all browsers. For back-end stuff (that only staffers can access), it's fine, but for the rest of our visitors, I stay as far away from javascript as I possibly can. Hell, it's abused across so many web sites that it's completely turned off on my browser!

  8. Kexi is also worth checking out. by anonymous+coword · · Score: 4, Informative

    It is an open source program similar to Microsoft Access. It works with MySQL too. It even runs on Windows.

    1. Re:Kexi is also worth checking out. by DukeyToo · · Score: 1

      And its version 0.1 beta 2, which makes it practically vaporware in my book.

      Thats a little harsh of course... I am sure it will be available eventually (the screenshots look very promising) but at this stage it is only an interesting sidenote.

      --
      Most writers regard truth as their most valuable possession, and therefore are most economical in its use - Mark Twain
    2. Re:Kexi is also worth checking out. by Anonymous Coward · · Score: 0

      For `typical' users this may look like vaporware indeed, so we've added the info in the announcement:

      Kexi Beta 2 is a Preview Release, mostly for developers, to show that there is active development.

      --
      regards & see you later on /.

      Jaroslaw Staniek
      Kexi Team

    3. Re:Kexi is also worth checking out. by Anonymous Coward · · Score: 0

      Even in its .1 Beta 2 (The windows binaries are installed as 1.0 b2) version its not vapor but its not real usefull yet either.

      If the goal is to make a Access/Pardox Like App it needs to come with designable forms and it needs to install (at least the Windows install) with Kugar for reports.

      Also the Installer for WinBloat does not work right at least on 9X machines. It places half the Dlls in the wrong directory. Only a somewhat determained and advanced WindBlows user would be able to figure that out and fix it. The Helpfiles need some real work also... They aren't real helpfull.

    4. Re:Kexi is also worth checking out. by Anonymous Coward · · Score: 0

      Please report me (js at iidea.pl) what is your win32 config: Is the drive C: acts as a system partition or not? Where is that wrong place the files are copied?

      The installer already works in _most_ configurations; more fixing is dependent on users feedback.

      --
      regards,
      js
      Kexi Team

  9. Greater than or equal to, I mean by spun · · Score: 1

    The > in the title disappeared.

    --
    - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
  10. Silly comment by Rosco+P.+Coltrane · · Score: 2, Insightful

    MySQL: Building User Interfaces chose to include the full code listing for everything. This is both a blessing and a curse: readers have the code right in front of them and don't have to worry about being in front of a computer while reading the book

    Since when do people read computer books on the throne? I would think anybody who's interested in this book (yes, you two hiding at the back!) would be reading it in front of a computer, trying out the sample code to learn what's going on.

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    1. Re:Silly comment by Anonymous Coward · · Score: 0

      It depends upon how you treat the book. For a professional who specializes in migrating from Windows to Linux it may be something that you read at a computer and try everything. I personally read computer books differently. I read them with the thought that they are a reference. If a concept is explained well, I can always look up the details of the implementation later.

      This is especially true when the activity is merely a sideline aspect of a larger, more complex job. For example, I do not claim to be a Windows expert, but I am versed well-enough with Windows to be able to do the basics (like user management), some more advanced things that are specific to my job (like write and compile crappy little C++ hacks), and lookup rare but complex topics in books if needed (like configuring a distributed Active Directory hierarchy).

    2. Re:Silly comment by Anonymous Coward · · Score: 0

      "Since when do people read computer books on the throne?

      Shouldn't the question be: when do people stop reading computer books on the throne?

      And the answer is: since the doctor diagnosed them with haemorrhoids.

    3. Re:Silly comment by saberworks · · Score: 1

      On the contrary, I read most of my books through on the throne, in bed, on the ferry, etc., before I ever go to the computer. Especially tutorial type books. I like to read them through first and then try out the stuff later, using the book then as more of a reference.

    4. Re:Silly comment by kfg · · Score: 1

      Since when do people read computer books on the throne?

      Since the last time I went to the throne? I also read them in the park, while in waiting rooms of various kinds and in bed.

      Sometimes it's ok just to think about the content.

      KFG

    5. Re:Silly comment by Anonymous Coward · · Score: 0
      Since when do people read computer books on the throne?

      I grab something from my bookshelf every time I pay a visit. You think people sit in front of computers _reading_ books? Sure I reference the occasional book but you think anybody with any computing ability actually sits repeating exercises from a text book unless they are struggling with a specific problem? GTK/MySQL & glade reference manuals and sample code would be much faster for 90% of what you need create your first app.

    6. Re:Silly comment by dj_cel · · Score: 1

      I do some of my best manual reading while dominating the throne, its somehow relaxing and contemplative. :)

      --
      Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    7. Re:Silly comment by glitch23 · · Score: 1

      throne + laptop + book = hours in the bathroom away from family

      --
      this nation, under God, shall have a new birth of freedom. -- Lincoln, Gettysburg Address
    8. Re:Silly comment by harikiri · · Score: 1

      I read tech books all the time on the loo.

      Who doesnt? /boggle

      --
      Man watching 6 MSCE's around a sun box, looks alot like the opening scene's of 2001:space odyssey...
    9. Re:Silly comment by BoringNickName · · Score: 1

      You know I just don't get the whole idea of reading *anything* in the john. If I need to 'make a donation' I want to get it over with as quickly as possible. Get in then get out. Dunno, I just can't get into any kind of book while I'm breathing the healthy aroma of a fresh dump.

      And I sure as hell don't have computer books on my mind while I've got my drawers around my ankles.

  11. Re:Suprised that the Review didn't mention this by Negative+Response · · Score: 3, Funny
    From the story:
    Thankfully, there is an FTP site with the code ready to use, but future versions of this book would be best served to include it on disc.

    Did you read the second half of the sentence, but failed to notice the first half?

  12. I read this book by Anonymous Coward · · Score: 3, Informative

    Recently I had to write a mysql demo for a tradshow. I had
    never worked with mySQL before. I got this book and was
    able to complete a full fledged demo in a matter of three
    days, working part time. The book is very well organized,
    easy to read and understand and best of all the examples
    work without modifications. I highly recommend this book
    for beginners. I would have done so for all levels but
    I'm not an advanced user of mySQL.

    If you're thinking of getting started on mySQL this is the
    book.

  13. Good book by TechnologyX · · Score: 3, Funny

    I have this book on my desk currently, its definitely a good resource on using MySQL for programs. The only gripe I had with it was that it didn't come with the source code, like was said in the review. I like how it focuses on converting the VB programmer over to GTK conventions.

    Maybe someone should send Mike Rowe a copy after he gets out of Redmond-Training.

    --
    Slashdot sucks
  14. Yes but... by anonymous+coword · · Score: 2, Insightful

    Would you *reallY* like users installing MySql on their machines with the easiest to use options (read:insecure options) by default? GUIs are much worse. Best to stick with raw SQL and text files, that way you *have* to learn to secure the system.

    1. Re:Yes but... by Anonymous Coward · · Score: 0

      God, if there was a "-1 Nazi" mod option, I'd used it by now.

      Then again, now that I posted to this discussion, so I can't mod it anymore. Um, have you ever thought you can get through the can't-mod-discussion-you-participate-in just logging out to post as AC?

    2. Re:Yes but... by kiddygrinder · · Score: 1

      That's crap, a well designed gui would allow a newbie to secure it more easily, your logic makes no sense. How does making something harder to configure make it easier to configure correctly? I still have no idea how to set a root password on our dev mysql database through code, if I didn't have control center, it'd still be the default

      --
      This is a joke. I am joking. Joke joke joke.
  15. Locking Problem by stoolpigeon · · Score: 3, Interesting

    from the sql lite page it looks like multiple users can select silmultaneously but only write to the database one at a time. Locking for writes is not record level, page level or even table level - it is the whole database.

    Too bad- because MySQL really does not replace Access but neither does this- unless it will only run internally to one user.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    1. Re:Locking Problem by hendridm · · Score: 1

      Umm, wasn't the book/review about creating stand-alone applications? I'd dare to say that most of them only have one user connecting to them at once anyway, right? If you have multiple users connecting, it makes sense to use the full-blown MySQL!

    2. Re:Locking Problem by ahdeoz · · Score: 1

      I believe Access locks the entire database for writes too. Just like any other regular file.

    3. Re:Locking Problem by stoolpigeon · · Score: 1

      I just got real interested when it was presented as a replacement for Access- because MySQL is not. If I'm going to go to run and actual database server I'll use postgres. But I'm looking for something that is just like Access but will run on linux.

      So I'm not really responding so much to the book review as to the parent post. that's all.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    4. Re:Locking Problem by stoolpigeon · · Score: 2, Interesting

      No. You can have multiple concurrent users doing all kinds of crap and the locking granularity can be down to the record level if you write your code correctly.

      Now the one thing that is bad with access is that if a user drops their connection in the middle of something it has a tendency to blow up. If you have a lot of people using an Access file over a network- you are going to need to compact & repair every so often. But I've seen stuff go strong for a while with 30-70 users hitting the same .mdb for 10 hours a day and it worked pretty well.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    5. Re:Locking Problem by Anonymous Coward · · Score: 0

      Access isn't really designed for multiple users either. Sure, it will work, but can easy be overworked.

    6. Re:Locking Problem by LuxFX · · Score: 2, Insightful

      from the sql lite page it looks like multiple users can select silmultaneously but only write to the database one at a time.

      I don't see this as a problem, because at least I see SQLite as more of a portable pre-packaged data structure, rather than a traditional multi-user database. I haven't had a chance to use it yet myself, but I look forward to using it in stand-along applications where I need good data structure and the ability to filter and search for specific data. I'm a fair hand with MySQL, so having all of this wrapped up into a SQL-compatible package is exactly what I need.

      It means I get to concentrate on what I find more exciting about programming -- rather then spend a load of my time on file structure and data processing.

      --
      Punctanym: alternate spelling of words using punctuation or numerals in place of some or all of its letters; see 'leet'
    7. Re:Locking Problem by Anonymous Coward · · Score: 0

      Not true -- PC systems like Windows, Novell, and Linux are designed to support record-level file locking specifically for multi-user suppport for file databases like Access.

  16. Depends on perspective by Moth7 · · Score: 2, Insightful

    But do we really want the book to only scratch the surface in many languages rather than give it thoroughly indepth with a single language? I often find it frustrating when chapter upon chapter is dedicated to a language I'll never use. If however you want lots of other languages covered, the MySQL Cookbook by O'Reilly has good scenario based discussions of using MySQL with PHP, JSP (as you wanted) as well as Python and Perl.

  17. Java + JDBC + GUI builder? by Kunta+Kinte · · Score: 1
    I'm sure the GTK and Glade solution works fine. But wouldn't Java, JDBC, plus a GUI builder ( even a freely downloadable Borland JBuilder Personal or now Eclipse.org has a GUI Builder ) be a lot more crossplatform and mature solution?

    There are also quite a few over the over-the-shelf Java JDBC components and tools that you can buy as well in case you're building a commercial application.

    To each his own I guess.

    --
    Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
  18. The PostGres Fanboys/Trolls should read this too. by anonymous+coword · · Score: 1, Troll
  19. Re:windows developers by Anonymous Coward · · Score: 0

    Plleeeaassseee... BBeee moooreee ssseennnsssiiiittttiiivveee.....

    Iii aaaammm aaaa hhaannnddiicaapppedd mmaaannn.

  20. Where's the delphi love? by Anonymous Coward · · Score: 0

    Right out of the box you can connect to mysql, nothing else required.

  21. Re:windows developers by BinaryCodedDecimal · · Score: 4, Insightful

    if you are a windows programmer then you must be retarded

    I know many retarded people that would be offended by that statement.

    Seriously though, making sweeping statements like that just makes it obvious that you were never good enough for the high school debating team...

  22. A possible alternative - Delphi? by dpeters · · Score: 1

    As a self-employed database developer (for 10 years) I've been using Borland's Delphi to talk to MySQL.

    Although Delphi is not open source, I prefer it to the typical MS Access / VB answer for Windows platforms, and Delphi has a very mature IDE (developer interface) which is most important when building lots of applications.

    1. Re:A possible alternative - Delphi? by Anonymous Coward · · Score: 0

      You forgot to mention that you have to know Pascal!!!!

    2. Re:A possible alternative - Delphi? by Anonymous Coward · · Score: 0

      There are quite a few databases that are tailored to Delphi. One I know of (www.advantagedatabase.com) has free local (or non client-server) access and then if you want a database server configuration, you can purchase one later ($2000ish for 100 users)

    3. Re:A possible alternative - Delphi? by name773 · · Score: 0
      Delphi has a very mature IDE (developer interface)

      you mean a text editor? Linux has a lot of mature "IDE's" like vi or emacs or joe

    4. Re:A possible alternative - Delphi? by cruachan · · Score: 1

      Borland's implementation of Pascal in Delphi is so close to C that it should only take a competant C coder about a week to be up and running to a good standard.

      Actually calling Borland's implementation of Pascal in Delphi Pascal is a bit of a streatch IMHO. The language is now so far removed from classic pascal that apart from the bare bones there's not a lot in common.

    5. Re:A possible alternative - Delphi? by certsoft · · Score: 1
      You forgot to mention that you have to know Pascal!!!!

      Lot's of people know Pascal, especially Europeans, where it is far more popular than in the states.

    6. Re:A possible alternative - Delphi? by TimTheFoolMan · · Score: 1

      Hear, hear!

      Shy of Multiple Inheritance (which can be a virtue or vice, depending on your perspective), there isn't much that Delphi lacks in comparison to C++. However, it leaps past C++ in terms of production cycles centered around Test Driven Development or XP, and it gives up nothing to VB in any category except marketing muscle and unwashed hordes of users.

      Yes, Delphi is Pascal, but it is so much more than that.

      Tim

    7. Re:A possible alternative - Delphi? by fiftyfly · · Score: 1

      Plus a component system that makes activeX objects look, well, let's just say I can't think of an apropriate adjective for polite company. Object pascal is very clean OO/procedural language that remains extreamly self consistant and is small enough to learn quickly. If I were building windows GUIs or DB frontends or pretty much anything focused largely on an event handler model my first choice would be delphi.

      --
      "Sanity is not statistical", George Orwell, "1984"
    8. Re:A possible alternative - Delphi? by gringo_l_amigo · · Score: 0

      As a guy who uses Delphi for 2 years, and who recently had to transfer a database from access to mySQL, I would like to know, which component do you use to connect to MySQL? I use Zeos which is open and going pretty well, but maybe there is a better (faster) alternative.

      --
      Wise men make proverbs, but fools repeat them. - Samuel Palmer
  23. A bit easier than programming GTK directly... by tcopeland · · Score: 3, Interesting

    ...might be to use a higher level language wrapper like Ruby/GTK.

    Prototyping an app will probably take less time if you don't have the compile/link cycle... worth a try, anyhow.

    1. Re:A bit easier than programming GTK directly... by Anonymous Coward · · Score: 0

      Prototyping an app will probably take less time if you don't have the compile/link cycle... worth a try, anyhow.

      Actually, it's even easier if you just use fucking libglade. That way, the .glade file is kept as a separate xml UI definition file, and you don't need to compile the whole program when you need to change some widget properties.

      Code generation wigh Glade is stupid. libglade + glade is the way to go, and it's the preferred method used in gnome development. So please, avoid glade code generation like plague (code generation won't be available in glade 3 anyway).

  24. Access 2k? SQL Server 97? by lawpoop · · Score: 2, Insightful

    Couldn't the author have made a little more recent comparison to database technologies? AFAIK, SQL server is at version 2k, and Access at version 2k3.

    --
    Computers are useless. They can only give you answers.
    -- Pablo Picasso
    1. Re:Access 2k? SQL Server 97? by geoffspear · · Score: 2, Insightful

      That would be easier if the reviewer wasn't reviewing a book that was published 3 years ago.

      --
      Don't blame me; I'm never given mod points.
    2. Re:Access 2k? SQL Server 97? by pballsim · · Score: 1

      Access and SQL are completely different as databases are concerned. Access uses the Microsoft Jet database (free), while MS-SQL is a very powerful database tool. MS-SQL blows away MySQL in terms of speed, design, transactional logs, backup/restore, XML support, etc. Of course MS-SQL is $5000.

      I've worked on MySQL, Oracle, Access, MS-SQL and some other databases and I prefer MS-SQL.

    3. Re:Access 2k? SQL Server 97? by iffycompe · · Score: 1

      Not only that, but there is no MS-SQL Server 97. There's 6.5, 7.0, and 2000. I'll just assume whoever first wrote it meant 7.0. There's also MSDE (Sql Server Desktop Edition) which is free. Sure it doesn't support some of the enterprise features of it's bigger brothers, but all the stuff you would expect from vanilla MS-SQL Server is there, only in connection limited form.

    4. Re:Access 2k? SQL Server 97? by Anonymous Coward · · Score: 0

      Actually there is no such thing as SQL Server 97(the original writer must be on crack), and the MSDE is free. MSDE is SQL Server throttled down to five connections and limited to 2GB databases. mySQL is a very nice personal/workgroup solution for databases. very fast.

  25. Re:windows developers by Carl+T · · Score: 3, Insightful

    Don't confuse stupidity with lack of political engagement / ethics / knowledge / possibilities. I know quite a few people who are more or less stuck with Windows for various reasons (the main one being their employers' decision to - willingly or not - support Microsoft), but who would like to learn more and be able to break free. If a book like this can help even a few people gain some of the skills they need to migrate, it's a good thing.

    --

    This signature is not in the public domain.
  26. Why does OSS love MySQL? by t_pet422 · · Score: 4, Insightful

    I don't get why so many people are stuck on MySQL. It's lacks some very, very basic features: Views, Triggers, Stored procedures, nested selects. Sure, they promise support for all this in future version, but PostgreSQL supports it NOW. If you want a full-featured open source database, don't use MySQL, use Postgres.

    1. Re:Why does OSS love MySQL? by SomeOtherGuy · · Score: 1

      MySQL to Postgres is akin to the whole MP3 to OGG OR VHS to Beta.

      Sometimes technically better does not win out over market hold and saturation. One could (I am sure) publish a whole book on how MySQL got entrenched over a more feature laden database.

      --
      (+1 Funny) only if I laugh out loud.
    2. Re:Why does OSS love MySQL? by Tassach · · Score: 4, Insightful
      I too wonder about the inexplicable popularity of MySQL. It fills the microscopic niche between a lightweight ISAM database and a real full-featured relational database. I've yet to see MySQL used for something that couldn't have be done better with another tool.

      Postgres is pretty good, but still (IMHO) not yet up to the level of a commercial RDBMS. If you want a full-featured free-as-in-beer datacenter grade database, use Sybase 11.0.3.3. It doesn't come with source, but come on now, how many MySQL zealots have ever even compiled from source, let alone modified something?

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    3. Re:Why does OSS love MySQL? by w00t_sargasso · · Score: 1

      Err... I have compiled from source.

      Most people I know compile from source...

      Ah well, to each their own.

    4. Re:Why does OSS love MySQL? by JanneM · · Score: 2, Insightful

      Acutally, I have yet to need a "full-featured database". From what I've seen of various apps, neither do most other people. By and large, most apps needing a form of database storage usually get by with DBM or equivalent functionality. 'Real', big database applications that need the kind of stuff you mention are few and far between - and in those cases, there are plenty of alternatives anyhow, like you say.

      For me, MySQL is not a deficient implementation of the Likes of Oracle, but a full-featured, modern way of accomplishing what DBM did.

      --
      Trust the Computer. The Computer is your friend.
    5. Re:Why does OSS love MySQL? by MCZapf · · Score: 1

      I think it's because many people who use MySQL use it for simple data storage. They are quite thrilled that they don't have to write code to read and parse a bunch of text or data files; they just do a SELECT query from MySQL. They haven't yet moved on to the more advanced aspects of these kinds of databases.

    6. Re:Why does OSS love MySQL? by Anonymous Coward · · Score: 0

      I'm not a MySQL zealot if such a thing exists, but I compile from source link against a hacked glibc on most our production systems. You want to know why MySQL is so popular? Simplicity and speed of basic SELECT, pretty much all you need for 80% of a website or intranet app or it could just be that cool dolphin logo :-o

      I use Berkeley db for speed in more simple applications so your "other tool" observation appears to be bullshit.

    7. Re:Why does OSS love MySQL? by t_pet422 · · Score: 1

      So you're saying people who don't know any better use MySQL? I recently implemented a very small blog app. The query on my search page uses four nested SELECTs containing an INNER JOIN, an OUTER JOIN and a UNION. To me (someone who writes database driven apps for a living), that is a fairly basic query. Yes, I could have done it with temp tables in MySQL, but it wouldn't have been nearly as clean as my Postgres implementation. It would really stink to be a newbie, pick MySQL, then, as you learn more about the power of SQL, realize that your choice of database is limiting you.

    8. Re:Why does OSS love MySQL? by Khomar · · Score: 1

      At least for my company, the primary reason for using MySQL is the native support for Windows. These other solutions are only currently supported in Linux (Postgres supports Windows only through Cwgwin).

      --

      I believe in de-evolution. God made the world perfect, man fell, and its been going downhill ever since!

    9. Re:Why does OSS love MySQL? by Zaiff+Urgulbunger · · Score: 1

      Same here. I think MySQL is easier to install on Windows, and I think thats it! But at this point, MySQL has so much momentum, its difficult to see anything else getting a look in.

      Its a shame though -- not knocking MySQL, but isn't a replacement for anything even vaguely serious (e.g. MS SQL Server), but unfortunatly there are a lot of users who make noise about how great it is... which makes them look kind of like they don't know what they're talking about. Sigh!

    10. Re:Why does OSS love MySQL? by skiflyer · · Score: 1
      I second this... though Postgres has a team working on it, however slowly.

      MySQL wins again and again for 3 reasons...
      • It's good enough
      • It's cross platform
      • It works right out of the box
    11. Re:Why does OSS love MySQL? by vandan · · Score: 1

      MySQL is very fast and very easy to use.
      The support community is also very large and helpful.

      I've found Postgres to be very ... strange. It has too many idiosyncrasies ( yeah I can't spell it, I know ) and requires too much pissing around to get anything useful done. It also has some MAJOR bugs and missing features. For example, last time I checked, it couldn't change field types or add / delete fields once a table is created. That's backward.

      Postgres also isn't that fast. Nowhere near as fast as MySQL. Having triggers and stored procedures is good, but if it means taking a 50% performance hit, I'd rather stick with MySQL, especially since version 5.0.x is out which supports stored procedures now. By the way, MySQL-4.1.x supports nested selects too.

      The support community for Postgres also isn't as big as MySQL's. MySQL is just more popular. If you don't agree with the majority of OSS users on this one, then fine, use Postgres. I've used both and I'm not touching Postgres unless I have to. MySQL is just too good!

    12. Re:Why does OSS love MySQL? by timmarhy · · Score: 1

      err yes thats why yahoo use it for their accounting system. there are other big ones i can't think of off the top of my head. speed is where mysql wins. it's plenty good enough for 99% of database needs, and it's fast & stable. postgrsql might be very feature rich, but from what i've heard it's not the fastest tool in the shed so to speak.

      --
      If you mod me down, I will become more powerful than you can imagine....
    13. Re:Why does OSS love MySQL? by Space_Soldier · · Score: 0

      MySQL uses cygwin.dll too.

    14. Re:Why does OSS love MySQL? by tree_frog · · Score: 1

      Absolutely. At my work I do a lot of heavy duty simulation. Basically a whole bunch of writes to a database for a couple of days, then some queries. For the extra overhead of writing to a dtabase rather than flat files, we gain so much flexibility in looking at our data.

      Why MySQL? Because it is fast, and in our game, that's what matters.

      regards,

      treefrog

    15. Re:Why does OSS love MySQL? by Zaiff+Urgulbunger · · Score: 1

      err yes thats why yahoo use it for their accounting system. there are other big ones i can't think of off the top of my head.

      LOL! Yeah, I know that people use it and I didn't intend to imply that it wasn't useful. The thing about MySQL is that it gives up a lot of useful database features in the name of speed. Thats fine, but it makes it a niche product -- in the sense that it is specialised. So its good for areas where reads vastly out number writes.

      My point (and I think I worded it badly) was meant to be that its suprising and unfortunate that MySQL is as popular as it is. Why? Because as I say, MySQL is specialised for speed. Whilst I accept PostGre, etc are slower, how much does that affect 99.9% of MySQL users? Many of these people would've otherwise used Access -- and that ain't fast! But Access is fine for many peoples use (e.g. a cheap database usable by a few concurrent users with reasonable data storage).

      And going back to the "missing features", I know you can add a bunch of stuff to MySQL to make it more like other DB's, but it would be better if these features existed by default and you had the option to "optomise" for speed by disbling them [IMHO anyway!].

    16. Re:Why does OSS love MySQL? by Anonymous Coward · · Score: 0

      The one argument i came back to for postgresql over mysql is reliability. Pure and simple reliablity. I use both mysql and postgresql. 80% of my database, and all the bigger ones run on postgres. I have never had data courption of a postgresql database ever. Even on computeres with dodgy harddrives and mulitple cold power downs. But i have had myql databases frag themselves and tables vanish on a regular basis. Sure the features on postgresql are nice to but thats not why i use postgresql. I use postgresql because i can trust my data on a postgresql database and i know it will still be there. I can't say the same to mysql. I dont know what makes mysql so unstable but it doesn't sit well with me knowing that my mysql databases could die at any moment.

    17. Re:Why does OSS love MySQL? by Tassach · · Score: 1
      I'd disagree with on the key point: it's not good enough: it's either too good or not good enough.

      Everything that can be done with MySQL can be done better using something else. If you need a real multiuser ACID-compliant relational database, MySQL doesn't cut it. If you need a lightweight high-performance data store, MySQL is overkill. All MySQL is good for is teaching people bad habits.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  27. One minor correction by The+Bungi · · Score: 2, Informative
    There's no such thing as "SQL Server 97". There's SQL Server 6.5, 7.0 and 2000. Perhaps he's referring to 7.0? Well perhaps he should have referred to the newest version instead.

    Not that I'd be interested in a comparison between MySQL and SQL Server (midrange C/S replacement for Access/FoxPro - OK. Enterprise RDBMS? No)... but still.

  28. Um... there are 2 gotchas there... by Anonymous Coward · · Score: 2, Funny

    MySQL is listed with OVER 20.

    It's not about being a postgres fanboy/troll.. reality is that MySQL DOES NOT have features comparable to Oracle/PostgreSQL/SQL Server. When are you going to understand this??

    As a DBD (db developer) I CAN'T use MySQL - it's feature set is too WEAK. MySQL is starting to get some of these features now and good for them but the argument was always about the feature set.. fuck some of you are dimwits...

    And yes I've just fed a troll but fuck it, now im all pissed off and want another coffee..

  29. Move? by ClosedSource · · Score: 3, Insightful

    "If you are a Windows programmer looking to create or move your stand-alone database applications away from Microsoft-specific tools such as Visual Basic, Visual C++, Access or SQL Server, MySQL: Building User Interfaces is written just for you."

    Very few Windows applications are written in 'C' these days so converting an existing application to use MySQL would be pretty painful. You should have a better reason to port your code then simply avoiding MS tools.

    Perhaps the book is better suited for developers who wish to switch to Linux for future development.

    1. Re:Move? by Anonymous Coward · · Score: 0

      You should have a better reason to port your code then simply avoiding MS tools.

      Since buiding a simple database app in GTK and C will take about 100x longer than doing it in VB, the reason is obviously Job Security.

  30. Re:The PostGres Fanboys/Trolls should read this to by Anonymous Coward · · Score: 0

    Yes, and then compare the sheer volume of MySQL gotchas to Postgres gotchas.

  31. Both are replacements for MS SQL Server by ttfkam · · Score: 4, Insightful

    ...if you don't use transactions, stored procedures, triggers, views, sequences (read: real ones), or if you actually want your database to be typesafe and have your insert/update to throw an error (or at least a warning!) on invalid data. Otherwise MySQL is most certainly not a viable replacement, although the codebase which used to be called SAPDB is. Firebird also qualifies for a replacement.

    Also, if you need advanced XML querying tools for your database, none of the open source RDBMSs can currently act as a reasonable drop-in replacement for MS SQL Server.

    If you don't need any of those features (and especially haven't actually used any of them in existing code), then MySQL could be added to the list of open source RDBMSs that fit the requirements for your project.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:Both are replacements for MS SQL Server by EastCoastSurfer · · Score: 2, Insightful

      Also, if you need advanced XML querying tools for your database, none of the open source RDBMSs can currently act as a reasonable drop-in replacement for MS SQL Server.

      I have to agree here. I was using MSSQL the other day and was able to open an XML document inside a stored proc and query it like it was a table. All I could say was "Damn, that's pretty cool!"

      I had been using the FOR XML EXPLICIT quite a bit for output, but didn't (until recently) need to read XML back into the database.

    2. Re:Both are replacements for MS SQL Server by Valar · · Score: 4, Interesting

      MySQL has transactions. It has for QUITE awhile. In fact, I write code that uses MySQL transactions everyday. Stored procedures are availible (will be availible?) in version 5.

    3. Re:Both are replacements for MS SQL Server by damiena · · Score: 4, Funny

      Firebird? It can do databases, too?

      That browser can do everything!

    4. Re:Both are replacements for MS SQL Server by porter235 · · Score: 1

      check Berkeley DB XML http://www.sleepycat.com/products/xml.shtml if you want to do real XML work.

    5. Re:Both are replacements for MS SQL Server by skiflyer · · Score: 2, Interesting

      PostgreSQL was one of the two, and it has stored procedures, triggers, and views. I believe it has it's own version of sequences, just as MySQL does. (Which I personally prefer to MS SQL's)

    6. Re:Both are replacements for MS SQL Server by ttfkam · · Score: 3, Interesting

      For varying definitions of "quite a while." Other than that I would agree with you except for the fact that every table involved in the transaction must be an InnoDB table. Have a half-and-half setup? When that transaction rolls back, the InnoDB tables will remove the changes, but the MyISAM tables will still be changed. ...not that MySQL will tell you this. No. Once again, it will do it all silently without even a warning to let you know that you need to convert one more of your MyISAM tables to InnoDB.

      Which doesn't even cover the fact that if you are being hosted by an ISP, using their copy of MySQL, and you type in:

      CREATE TABLE foo (
      ...
      ) type=innodb;

      and they are either (a) running an older version of MySQL or (b) disabling support for InnoDB tables because of their noticeably higher overhead than MyISAM (yes, both cases happen quite regularly), you will be none the wiser.

      MySQL will not issue a warning, error, or valentine's day card for your troubles. So here you are, happily SQLing away without a care because you have InnoDB tables until you notice some strange data...because...you aren't running InnoDB tables after all.

      Be honest, how often do you run the following?

      SHOW CREATE TABLE foo;

      Everytime you create a table? No?

      How about the next statement? Here we attempt to give some users on Slashdot 10% more of a clue.

      UPDATE slashdot_users SET (clue = (clue * 1.1)) WHERE preferred_db = 'MySQL';

      and (oops!) something went wrong halfway through for some reason. Maybe someone killed the process. Maybe someone kicked a cord. Maybe you ran out of memory on the box and the process crashed. The world is an imperfect place. Back to work though: how many Slashdot users had their clues upped? If they were updating a MyISAM table that "didn't need transactions," we have no idea.

      Transactions aren't just BEGIN and END statements. They aren't just commit() and rollback() functions. They are intrinsic to a valid datastore. They are the Atomicity in ACID. That UPDATE statement was a transaction in all contexts used to describe databases.

      MySQL and transactions are like assembly language and for-loops. They can be made to go together, but they were not originally designed for such a task. In assembly, it's a set of well-placed jump (goto) statements. In MySQL, it's a set of table=innodb flags. Some people do it the hard way for no good reason even when easier, less error prone methods exist. For the rest of us, we use a higher-level language or -- in this case -- a higher-level database. If and only if we see a need to optimize do we drop down to assembly (MySQL). You don't start with assembly and then try to find rationales for a higher-level language.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    7. Re:Both are replacements for MS SQL Server by dodobh · · Score: 1

      How hard woiuld it be to do this in PostgreSQL with pl/perlu and the Perl XML modules?

      --
      I can throw myself at the ground, and miss.
    8. Re:Both are replacements for MS SQL Server by dodobh · · Score: 1

      Ack! I need to preview before I post.

      The word is "would". (and perlu stands for perl untrusted).

      --
      I can throw myself at the ground, and miss.
    9. Re:Both are replacements for MS SQL Server by EastCoastSurfer · · Score: 1

      No idea as I don't have much experience with PGSQL and perl. Check the MSSQL books online under OPENXML to see how simple it is though. I tried to post a snippet, but /. is telling me to use fewer 'junk' characters.

  32. I am a Windows programmer by Anonymous Coward · · Score: 0

    and I contemplated about my tardiness all the way to the bank

  33. Access Convert by w00t_sargasso · · Score: 1

    I once used access. Even tried to make a VB front end. Couldnt get the damn thing to work. So I stopped using dbs for a time. Then someone showed me the pure beauty of MySQL and PHP (Thanks Andrew!!!!!!!!!) and since, I have never looked back. I tried Postgre, and didnt like it. Feature overkill...

    Meh.
    "In technology, there will always be 2 people with 200 opinions"

    Hey, I just made a quote!

  34. Who mods this shit up? Check poster's history by Anonymous Coward · · Score: 0

    The parent is a content-free comment

  35. Re:The PostGres Fanboys/Trolls should read this to by gmhowell · · Score: 1

    Good point: mysql has 25 listed gotchas, whereas PostGreSQL has 2.

    (FWIW, I'm using mysql, but I suck.)

    --
    Jesus was all right but his disciples were thick and ordinary. -John Lennon
  36. Of course... by iSwitched · · Score: 1

    ...You are absolutely correct. As a matter of fact, I am currently engaged in doing exactly that.

    JDBC is an incredibly complete data access solution that is almost like using DAO or ADO or whatever Access guys use these days. Swing, as done in Java 1.4 is plenty quick for DB GUI's and JBuilder Foundation's GUI Builder is about what an access of VB form developer would expect. I'm using all of these with no complaints and my apps run without change or recompile on Windows, Linux, and OS X.

    In fact, in the time it'll take most to read this book and adapt the first tentative hello world project, I will have completed another third of my real project.

    But, since this is Slashdot: "Ooh how I hate Java!". (secretly returns to work making $$$ doing Java apps)

    --
    "That naive cube! How long must I suffer this!" --Sheldon J. Plankton
  37. Rekall by bstadil · · Score: 2, Interesting
    Rekall is another Access like Frontend that works with MySQL and a few others.

    They got shafted by TheKompany and need some help so download it a send a few bucks their way if you like it. Runs on Linux and Windows.

    --
    Help fight continental drift.
    1. Re:Rekall by Tracy+Reed · · Score: 1

      I have tried like heck to get Rekall working to no avail. With much effort I have twice gotten it to completely compile (once on debian and once on a RedHat system) and both times it comes up with an empty palatte and a Help menu pulldown at the top and nothing else. I'm not sure what went wrong but I would sure love to get this thing working because I could really use it. If anyone has any tips please email me or reply here.

  38. Access can be a front end to MySQL by HermanZA · · Score: 1

    MS Access can be usedeither as a standalone DB app or as a front end to a larger SQL DB. Obviously the advantage of a SQL DB is its ability to serve multiple users at the same time, which Access on its own, can't do. So, use the right tool for the right problem...

    1. Re:Access can be a front end to MySQL by son_of_asdf · · Score: 1

      That's not entirely true: you can use the Database Splitter in Access to dump your backend to a seperate file, which can be stored on a server that multiple front-end clients connect to. This isn't a viable way of doing things for more than 10-20 odd users at once, but for a small office situation where you can (more or less) trust your users, it works just fine.

      --
      Don't Panic!
    2. Re:Access can be a front end to MySQL by YrWrstNtmr · · Score: 1

      No. A single Access mdb can support mutliple users. More than about 10 or so concurrent users, though, and it starts to bog down.

      So, deploy multiple front ends, all talking to the central back end DB.

  39. I suppose this is flamebait or a troll but... by kahei · · Score: 2, Interesting

    ...wouldn't the effort be better spent in actually bringing mySQL up to the point where it *can* replace SQL Server?

    MySQL seems to occupy a rather subtle and narrow niche, perhaps the 'single smallish website' niche. I can't really imagine wanting to use it when most applications are liable to grow beyond that niche.

    PostgresSQL looks a lot more encouraging, feature-wise, although it doesn't seem to offer many concrete benefits over SQL Server. Still, to me, a book on migrating to PostgresSQL or another full-featured RDB would be more useful.

    --
    Whence? Hence. Whither? Thither.
    1. Re:I suppose this is flamebait or a troll but... by xutopia · · Score: 1

      you do have a good point, however have you ever tried to install PG on Windows? It's a bloody nightmare!

    2. Re:I suppose this is flamebait or a troll but... by puppetman · · Score: 1

      What are you talking about?

      MySQL and Postgres are both very good database technologies (and I'm an Oracle DBA, managing 3 high-availability Oracle installations).

      "MySQL seems to occupy a rather subtle and narrow niche"

      The website that you posted this comment to, that offered the review of this book, runs MySQL. You know - the website with it's own effect named after it, the one that handles the load of tens of thousands of geeks while the site they reference in a front-page-story crashes and burns when all /.'s readers go visit it.

      Oh yah, Yahoo runs on MySQL. I wouldn't say Yahoo is a small niche; it's a large one, all by itself.
      With the InnoDB database engine, you have the same row-locking, ACID trasactions that you get with the big databases. Both Slashdot and Yahoo use the InnoDB database engine in MySQL.

      You don't have stored procedures, triggers, or views, but as an Oracle DBA who has 12,000 lines of proprietary Oracle-PL/SQL on just one of my three databases, I can say that they cause more problems than they are worth. A nightmare to write, debug, and maintain.

      But never the less, views, stored procedures, and all those other features are due out in 4.1 and 5.0.

      As for SQL Server, I do know it runs only on Windows (at least Oracle supports Linux, Solaris and Windows as first-tier platforms). MySQL runs well on all the *NIXs, and has had AMD-64 support for several months now via several production-ready versions of 64-bit-Linux. Microsoft has just managed to shlub out some half-assed public beta that won't be ready for general public consumption for 4-8 more months.

    3. Re:I suppose this is flamebait or a troll but... by bucknuggets · · Score: 1

      > You don't have stored procedures, triggers, or views, but as an Oracle DBA who has 12,000 lines
      > of proprietary Oracle-PL/SQL on just one of my three databases, I can say that they cause more
      > problems than they are worth. A nightmare to write, debug, and maintain.

      Sure stored procedures can get complicated, then again so can anything if you're fool. Most that I see written today are extremely simple. But anyone who's having nightmares from the complexity of views needs to step away from the keyboard slowly.

      > But never the less, views, stored procedures, and all those other features are due out in 4.1 and 5.0.

      Yep, and the core functionality *almost* works reliably. Really, views, etc are essential in a database - but they need to first clean up the silent errors in their core functionality.

      Don't take my word for us - read their manual (especially the "design issues" section), then apply all that invaluable Oracle dba experience to a few tests. You might be amazed at how often mysql corrupts your data. You just never realized it before because every time it hits something difficult, complex, confusing, etc it simply takes some weird default action. Isn't quite so bad for read-only applications, but anyone who writes valuable data to mysql without really understanding the product is a fool.

      Oh yeah, and the best part - it isn't free either.

    4. Re:I suppose this is flamebait or a troll but... by puppetman · · Score: 1

      "Sure stored procedures can get complicated, then again so can anything if you're fool. Most that I see written today are extremely simple. But anyone who's having nightmares from the complexity of views needs to step away from the keyboard slowly."

      We inherited our PL/SQL codebase from a consulting company that wrote it. They take Java objects, pass each member in as a parameter, and then almost each and every method passes back a generic-IO cursor. The dumbest thing I ever saw.

      Stored procedures are hidden logic. They are difficult to test. They are difficult to debug. If you change a table that a package relies on, you can invalidate the package, and not find out till exceptions start showing up in your logs.

      "Don't take my word for us - read their manual (especially the "design issues" section), then apply all that invaluable Oracle dba experience to a few tests. You might be amazed at how often mysql corrupts your data."

      Are you talking about "7.1.1 MySQL Design Limitations/Tradeoffs" or "7.4.1 Design Choices"? Both sections are MyISAM-specific. InnoDB is the only true database engine in the MySQL product. I've been subscribing to the MySQL mailing lists for about 18 months now, and the ten to twenty data-corruption issues I've seen have been with MyISAM (often running 3.23), when the server loses power with MySQL running. InnoDB has binary logs, redo capabilities, and transactions. There have been a few bugs that could potentially cause data-issues under rare circumstances with InnoDB, but we've had issues with Oracle as well (corrupt or invalid indexes, or rows that were no longer accessible).

      "You just never realized it before because every time it hits something difficult, complex, confusing, etc it simply takes some weird default action. Isn't quite so bad for read-only applications, but anyone who writes valuable data to mysql without really understanding the product is a fool."

      I've loaded one of our databases (about 4 gig) into MySQL (it was about a 2 hour effort to conver the data, and 2 hours to bulk-load it, including the 100 or so indexes and foreign keys). I've run some of the tougher queries that we use against it (10 table joines, 5 of them outer-joins, returning 2 million rows) and it worked fine. I've also loaded the key data from one of our other databases into MySQL, and run our nastiest queries against it, in a threaded environment, where each thread does multiple selects, updates and inserts very large rows with LOBS and the CPU stays pegged at 100% for 20 minutes. It finished in half the time of Oracle, and not a single hiccup.

      I've also loaded 40 meg of data via insert statements, including LOB fields, large numbers, and dates. No problems at all.

    5. Re:I suppose this is flamebait or a troll but... by Unordained · · Score: 1

      Tried Firebird at all? Feature set is pretty much like Postgres (minor variations in emphasis,) easy to install (both under windows and linux, particularly with the RPM, even under slackware) and it handles our load beautifully.

      I've got a few C++ programmers, writing a rather fat client (400 distinct screens, hundred or so reports beyond that) using Firebird on the server. Handles our forty or so users just fine, and unlike some other database servers (MySQL), it keeps our data safe.

      Also, as it is relevant to this story, Firebird has an embedded version. Same capabilities as the full server (SQL and all,) except that it's in a DLL you bundle with your application, a sort of single-user mode that doesn't require a service running in the background. That's a big advantage. You don't have to change any code for your app to run on the single-user version (but if you start there without planning for multi-user access, you might be in trouble scaling up!)

      Oh, and using Firebird doesn't require you to make your app open-source or free, ever. Even using the embedded server, shipping pretty much all of Firebird with your app, it's still free to use.

      It's based on Borland's Interbase, the fork occured at Interbase 6-open-source, and has been moving forward steadily. We're all waiting for Firebird 1.5 final (it's in late-stage release candidates, but they're very careful with it) for improved performance and features. But I've been using 1.0 in production environment for what feels like forever, and it's quite stable itself, and quite powerful. Check it out!

  40. Or... Revolution by Anonymous Coward · · Score: 1, Informative

    Check it out: www.runrev.com.
    Windows, Linux, MacOS 9/X.
    Looks much nicer than GTK or Java.
    Much easier to script.
    MySQL, Postgres, OpenBase, Oracle, ODBC, etc.
    Also works with Valentina- a pretty darn fast Mac & Windows embedded database engine.

    It's not for everything, but if you want cross-platform RAD, it should be in your bag of tricks.

    1. Re:Or... Revolution by Anonymous Coward · · Score: 0

      Looks like Hypercard

  41. Paradox by Pop69 · · Score: 1

    Anybody know if it's still on the go ? I remember thinking how great the windows versions were for programming compared to the early versions of access which were more likely to crash and corrupt your data than actually do anything useful.

  42. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  43. Use Access as a GUI for mySQL! by Mr.+Cancelled · · Score: 5, Informative
    For a content management system I've developed, I prototyped all of the basic functionality by using Access as a GUI for mySQL. And I loved it! I actually considered doing the whole thing this way for a bit as it offered so many of Access's strengths (quick and powerful GUI building, familiar environment, everyone has it, etc.), but was combined with mySQL's stability, scalability (Well... For the needs of my target audience at least), and versatility. All's you need to tinker with this is the free MyODBC package, and suddenly your mySQL database is seen as a standard ODBC one. You can build table relationships within Access using mySQL based source data. You can locate the mySQL server anywhere you want (local or remote), point Access at it, and there ya go. Additionally you can now use VBA within Access to take advantage of many Active-X components, as well as a wealth of freely available VB code. There were several reasons I went back to my original plan of just prototyping in Access, and deploying via a web-based setup:
    1. Obviously not everyone has Access. Many do, or have access to it via work or school (access to Access?!?)
    2. There were certain things that were easier to implement in an HTML-based setting (conversely, there's things I still can't equal that were accomplished easily using VB & Active-X. Things such as a customized file browser with a built in image viewer)
    3. While some of my VB code and Active-X'ing would have been transferable to the web, it would have required requiring that the user of my system use IE to administer it. Not gonna happen!
    4. I just don't like Microsoft enough to make my product only available to users of their software. The above IE example would have required my admins to IE; Access would require users to have Access; Having Access implies that the user must also run Windows (Wine just isn't there for Access usage I'm afraid. At least not for very advanced usage)
    But for other projects I have, who's target audience is Windows users, Access is a great way to quickly build some impressive mySQL-based applications. IMHO, of course. 8)=
  44. Open-Source Solution for Java/MySQL by Yoda2 · · Score: 1

    SwingSet is an open source toolkit for writing database-aware/enabled Swing applications.

  45. Almost right by ttfkam · · Score: 1, Informative


    So there still isn't a production-quality MySQL server.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  46. SQL is outdated by Tablizer · · Score: 0, Flamebait

    SQL is a crappy relational language. The industry should focus on finding a replacement rather then be stuck with the Cobol of relational languages.

    1. Re:SQL is outdated by Anonymous Coward · · Score: 0

      Sounds GREAT! why don't you write it. SQL has survived so long because it works. and it works well. Maybe you should try learning more than SELECT or a couple of DDL statements.

    2. Re:SQL is outdated by timmarhy · · Score: 1

      and just how does it suck? the reason it's stayed popular for so long is the basic's are so easy and logical. i mean i couldn't possibly think of an easier way to extract data

      --
      If you mod me down, I will become more powerful than you can imagine....
    3. Re:SQL is outdated by Tablizer · · Score: 1

      and just how does it suck? the reason it's stayed popular for so long is the basic's are so easy and logical.

      I think SQL stinks.

      I would personally like to see a more functional (FP) style that allows one to optionally name sections of a query rather than have one huge run-on sentence like SQL often becomes.

      BS-12 was an early example. And then there is Date's Tutorial-D language which appears more rational than SQL.

    4. Re:SQL is outdated by Jeddawg · · Score: 1

      ... i couldn't possibly think of an easier way to extract data ...

      Hmmm, how about opening the table directly (*gasp*) and applying a filter? Or setting an index order to active to sort the data? Or setting a scope to filter out data that's outside of the range?

      Yes, there are specific needs for which SQL presents itself as a solution; but not everything can be solved via SQL.

    5. Re:SQL is outdated by timmarhy · · Score: 1

      i never stated sql was a solution to EVERYTHING. and the examples you gave at NOT easier then SQL in my opinion. same shit different bucket

      --
      If you mod me down, I will become more powerful than you can imagine....
    6. Re:SQL is outdated by Tablizer · · Score: 1

      Hmmm, how about opening the table directly (*gasp*) and applying a filter?

      A view can do that, although currently it is something that the DBA has to do. User-defined views would be nice, but that is orthogonal to query language it seems.

    7. Re:SQL is outdated by Jeddawg · · Score: 1

      User-defined views would be nice, but that is orthogonal to query language it seems.

      I don't believe that is completely orthogonal to query languages. I think the navigational-level access is very complimentary to a query language interface.

      It comes down to a matter of using the right tool for the job. Some jobs are just easier with SQL; others are just easier with direct access to the table. (And, some jobs are best accomplished via an SQL query to generate the results, then the ability to apply a filter/index to that query result.

      Granted, I realize MS SQL doesn't support this; but other engines (like Advantage Database Server) can support both access methods while still maintaining security and data integrity.

  47. Not quite by ttfkam · · Score: 1

    In most modern operating systems, inactive processes can be swapped out in favor of disk buffers and the like as well. Besides that, the memory used by an inactive MySQL process is closer to "rounding error" than "waste of memory."

    But if you're still worried about it, an extra 256MB is hovering around $30 on Pricewatch.com. Hmmm... $30 and never having to worry about it or any other inactive daemons on my system again or...

    I don't know about you, but my time is worth more than that.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:Not quite by man_of_mr_e · · Score: 1

      It's not an issue with MySQL in particular. It adds up when you have lots of services you're not using. I don't care if I've got 10TB of memory in my system, it's still wasted if i'm not using it.

      Besides, having services you don't use in your startup takes longer to boot, and for most people, booting happens every day as they shut off their computers when they're not using them.

      Remember, we're not talking about a server in this thread.

  48. postgresql syntax conventions? LOL by kpharmer · · Score: 2, Informative

    ok, so postgresql has two issues with syntax, and mysql has dozens of situations in which it will silently fail.

    And that's comparable?

    If you want to read something amazing, go ahead and read the MySQL manuals, look for design deficiencies: http://www.mysql.com/documentation/mysql/bychapter /manual_Introduction.html#Bugs

    You'll see more than just minor syntax issues - you'll see that mysql spends most of its time in silent error mode.

  49. Re:test by Zaiff+Urgulbunger · · Score: 1

    Good point. All new users must be encouraged to test all their code before they deploy it!

  50. But isn't mysql a commercial database? by bucknuggets · · Score: 1

    I've seen the licensing fees - and if I remember right, they charge by concurrent user. So, if you want to support 1000 concurrent users @ $500/user on a mysql-based web portal, wouldn't that be something like $500,000? Sounds commercial to me anyhow.

    1. Re:But isn't mysql a commercial database? by Anonymous Coward · · Score: 0

      "The MySQL Server license is per database server (single installed MySQL binary). There are no restrictions on the number of connections, number of CPUs, memory or disks to that one database server."

      from http://www.mysql.com/products/pricing.html

      Where did you get $500 per user!!???

    2. Re:But isn't mysql a commercial database? by lostchicken · · Score: 1

      MySQL is GPL. You can use it just as you would Linux, or any other GPLed application. It's free. You can use it on a commercial site all you want.

      You can even modify it and distribute it in your own application. However, you've got to play by the rules of the GPL (you've got to release your code). If you don't want to play by the rules, you can buy a license, and pay to distribute whatever you want, without ever releasing code. It's really a great system.

      --
      -twb
    3. Re:But isn't mysql a commercial database? by jred · · Score: 1

      I think this is an aspect of GPL (& other OSS?) that should be emphasized more often. Especially given some companies' reluctance to use it, in fear that they'll be required to release *their* source, too. If they're worried, they can just buy a license that specifies that they have no legal obligation to do that.

      I'm all for OSS, but the fact is that most companies aren't going to open the source for products they are actively selling. They are still contributing to OSS, it's just a monetary contribution instead of a codetary :) contrib.

      (After typing all this up I realized I'm only assuming OSS stands for open source software. If it doesn't, just pretend it does)

      --

      jred
      I'm not a mechanic but I play one in my garage...
  51. and they mostly work by bucknuggets · · Score: 1

    you just need to know where to be careful, since when they fail they won't reliably tell you the way most other databases will. What they'll do, and what most of mysql will do is to do whatever will allow the operation to complete. So, as long as you know what & when to test - you get can good transaction support out of mysql. Not a big deal if you know what to look for and don't mind writing that code. Personally, I wish they'd get their shit together and fix this crap since I'm getting very tired of writing this kind of code.

  52. Thank you by YrWrstNtmr · · Score: 1

    Finally..some rational thought in here.

    I've used Access and/or VB to talk to a backend Oracle or SQLServer DB. Different office has needs for different views/functionality? Deploy them a different MDB, talking to the same tableset.

  53. MySQL doesn't have sequences by ttfkam · · Score: 1

    At least not ones that conform to the ANSI SQL definition of sequences.

    Sending a NULL to an AUTO_INCREMENT field is not the same as an SQL sequence.

    Can you skip numbers easily in MySQL (eg. tell the DB to continue from some arbitrary number next)? Can you put explicit values into the column without the AUTO_INCREMENT overriding you silently? (My favorite part: MySQL changing the values you enter without even telling you.) Can you tell a MySQL sequence to have a maximum value lower than the maximum value of the underlying datatype or a starting value of higher than 1? (No, multiple inserts and then deleting them after doesn't count.)

    The syntax may be different between all three, but when you pull back the curtain, the one in MySQL are a very different and limited beast.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
    1. Re:MySQL doesn't have sequences by skiflyer · · Score: 1

      I'm not saying MySQL's auto-increments are perfect... but at least get your facts straight. You can easily skip numbers, you can put explicit values in a column without being overriden and you can certainlly have a starting value higher than 1. I don't know if it can have a maximum value lower than the maximum value of the underlying datatype can't say I've tried that one... but all the rest I've just implemented within the last week so it's very doable.

  54. Re:windows developers by skiflyer · · Score: 1

    And don't forget those who are oh I dunno, concerned about selling their product. You don't go to a customer site and say, no no, you need to reformat and install Linux, you'll love it honest... your other programs? What no, you don't need those. Not a good way to make a sale.

  55. A lesson to an errant moderator by ttfkam · · Score: 1

    ...who modded me flamebait. Since I don't feel like reposting all of it, here's another one of my comments that covers this:

    An example of MySQL suckage

    Production quality doesn't just mean "doesn't crash." Production quality for a DB means "keeps my data safe."

    Once again, there still isn't a production-quality MySQL server.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  56. Re:windows developers by Green+Light · · Score: 1

    What's worse, his/her product "Jahshaka" runs on Windows...

    Go figure!

    --
    "Send an Instant Karma to me" - Yes
  57. Ease of Use by Ween · · Score: 1

    I hardly consider GTK+ + MySQL to even be in the same league as Access when it comes to ease of use and interface design. Sure, Access isnt that great of a program, but it is extremely easy to create a simple database+frontend in. Another nonfree alternative is Filemaker Pro. This is a very nice application.

    --


    Tis better to be silent and thought a fool, than to open your mouth and remove all doubt --Abraham Lincoln
  58. MySQL SUCKS by Space_Soldier · · Score: 0

    MySQL is just a package of different database engines. Now they have added SAP DB (Adabas) under MaxDB by MySQL, which is now marketed as the open source enterprise database. Before that MySQL was marketed as ready for the enterprise. Sometimes I wonder if the people behind MySQL ever write a line of code. They need to get rid of all the other stuff, and write their own database engine, if they want to be taken seriously. If I wanted an open source database, I would go for Postgresql or Firebird. Data corruption with MySQL is very common. As for those that talk about features, do you care more about the data or about one more feature on how to extract it? Now for desktop applications, you have to be a bloody idiot to use MySQL for that, Access is much better, or BerkeleyDB from SleepyCat. SQLite is a piece of crap. What kind of a moron thinks that the only type in database should be STRING? It is very slow on INSERT, but fast on SELECT. Access (Jet Database) is dying, it hasn't been updated in a while (2000). Longhorn and it's sql server file system over NTFS killed access. MySQL is a joke and it should be treated as such. If those PHP zealots would know a thing about databases it wouldn't be the "most popular open source database". There is a reason why IBM, Microsoft, and Oracle are the 3 standards.

  59. MS SQL vs MySQL? by James+Lewis · · Score: 1

    Could someone explain to me the difference between the two? (I've had a database course, so it's OK to get technical) There was that top 10 database article a while back, and while I saw MS SQL in there a few times I NEVER saw MySQL. What is MySQL better than MS SQL at, and vice versa?

    1. Re:MS SQL vs MySQL? by Anonymous Coward · · Score: 0

      MySQL is REALLY fast, weak on security, with no enterprise funtionality. Primarily built for website content presentation.

      SQL Server is quick, strong on security, high amount of enterprise functionality. Primarily for companies needing high end solutions with the money to pay for it.

      SQL Server has the capacity to cluster multiple servers into one virtual server for redundancy. you walk up, pull the power plug, and the data movement doesn't stop. I'm a DBA on SQL Server as a profession, so I understand how to implement SQL Server. The trick to determining which is "better", is to understand the needs of the solution. SQL Server is a very mature product. reliable; secure;and fast, but unfortuanally it follows Microsoft's thought to only be availiable for Microsoft platforms. I wish they would think more like our Linux comrades. MySQL can run on any flavor of Unix and with Cywin, it can run on windows.
      MySQL is a very good database program I have used it for a while. SQL Server is a good solution also, but since it is a enterprise class RDBMS, there will be a learning curve. You will definetly understand MySQL faster. Neither product is "better" than the other. Just different. Pick the right tool for the job.

  60. I'd like to run postgres on windows... by Phil+John · · Score: 1

    ...without downloading cygwin...native win32 support was meant to be in 7.4 but didn't make it. I deploy to FreeBSD but develop on windows (because some apps I rely on still don't run in Xover office and are too damn slow in vmware under linux). Don't get me wrong, it works fine in cygwin, but it doesn't sit well with me having to do that. Let's be honest here, PostgreSQL doesn't have an important feature of Oracle, the HAL (or whatever oracle call it), PostgreSQL has to be ported manually and it's taking a long time. True, it's a lovely system, but they need to sort this out before they start making even greater inroads. Also, visiting the PostgreSQL site doesn't sit well with PHB's. mysql.com looks very businesslike with licensing options and online stores, plus loads of documentation. Bring up postgresql's site and look at this message in the top right hand corner: "Tech Support requests to this address will be ignored! Please use the appropriate mailing list."

    That wouldn't fill me with enough confidence to ok deployment of a mission critial app if I didn't know what you and me both know, PostgreSQL kicks ass.

    --
    I am NaN
  61. Re:Suprised that the Review didn't mention this by Anonymous Coward · · Score: 0

    Dumbest. Post. Ever. If you're going to make a half ass attempt at cut and paste trolling, at least use something that isn't part of the freaking article! If you were making a serious post, you have the worst case of ADD I've ever seen.

  62. Now that's funny by ttfkam · · Score: 1

    Your claim that "professional" companies only use statically typed languages also seems rather unfounded.
    I'm looking at my previous post, but I can't seem to find that statement. Where did you see me write that? Nice misquote. You missed not only the spirit, but the letter of what I said. I only brought up Perl and PHP because those are examples of languages where many people are just starting out -- Perl was one of my first as well. I also brought those up because, unlike statically typed languages, errors can go through easily because there's no catch to say "this is supposed to be a number between 0 and 255" for example. Everything else you inferred was from your own defensiveness I think.

    As for the PostgreSQL gotchas page, as a user of PostgreSQL, I can safely say that I have not come across anything like what was found on the MySQL gotchas page; There was nothing even close with regard to scope. And in the event that some weird behavior comes up, I'm pretty sure that PostgreSQL will at least warn me about it.

    If the MySQL page were written with the rigor of the PostgreSQL page, there would be far more "gotchas" for MySQL. For example, the two PostgreSQL issues were differences with the official SQL spec -- not data consistency issues. If you were to include all of the aspects of MySQL that did not conform to the ANSI SQL standards (any of the ones over the years not to mention the most recent ones), the gotchas page would be about as long as the main MySQL documentation. Yes, it's that bad.

    Now then, as for the failure to quote the third sentence, I'd be very surprised to find that "a few more gotchas to follow" would come to equal the twenty seven gotchas that MySQL has. There are twice as many categories of gotchas in MySQL than there are total gotchas for PostgreSQL.

    But fair's fair. I'll add a few for PostgreSQL.

    "MySQL with MyISAM tables is faster for selects and mostly read-only databases." Then again, I haven't accurately benched it myself. When I make a database schema in PostgreSQL, it cannot be mapped to MySQL easily. The only way to make a comparison is to strip my PostgreSQL database of many of its advantages both in performance and maintainability like triggers, views, rules, stored procedures, foreign keys that actually prevent you from dropping related tables, domains, schemas, real SQL sequences, etc.

    Oh wait! MVCC (Multiversion Concurrency Control) doesn't apply when trying to check for duplicates with a SELECT followed by an INSERT. In other words, short of locking the table, you can't guarantee that if a SELECT comes up empty, that another client doesn't INSERT something before you get there. This of course is followed by an error as opposed to silent do-whatevers of MySQL coupled with the fact that MySQL can't do any better with this problem and frequently does worse.

    Here's one: PostgreSQL cannot restrict access to just a column. The only workaround is to make a view without that column and set the rights appropriately. Finally, a real issue. I should submit that one to the PostgreSQL gotcha page maintainer.

    Is PostgreSQL the end-all be-all? No, of course not. I never said it was. I only assert that MySQL is only fitting to a project with a very loose set of requirements -- requirements that don't include safety of your information, the raison d'etre of a RDBMS.

    So if you want to store data, be able to retrieve it quickly, don't do too many inserts or updates, only access from a limited amount of simultaneous clients, don't care too much about crap accumulating in the tables, and have a good reason to eshew a custom data storage structure tailored to your specific needs, then by all means, MySQL is the database for you!

    Use what you like, but choosing a toy (Yes! I'm calling it a toy!) to a real RDBMS seems a little bit unfair.
    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  63. Ahh, now I see by ttfkam · · Score: 1

    ...where you got that I thought "professional == statically typed." It was the comment about Fortune 100 companies wasn't it? Hmmm...

    No, that was not my intent. Truth be told, I doubt they are using Perl or PHP to any large extent. Or even C++ for that matter. Chances are that the workhorses for those companies predate the creation of Perl and PHP...probably even C++ in its CFront days. Those companies have tons of COBOL that, while it works, they will never ever mess with. If their infrastructure were written in Eiffel, it wouldn't be going anywhere. If it were written in BASIC, as long as it has worked for twenty years and continues to work, no one is touching it.

    Once again, I brought up those languages because of the legions of 31337 coders whose claim to greatness is a 500 character long, single line Perl script. They're not dumb or inferior. They just don't know any better yet.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  64. Your ID by Azghoul · · Score: 1

    No contribution to the story at large here, I just wanted to comment on your slashdot id. Excellent beer. :) Nice to see someone else knows what it is.

    Umm, unless you're really creative and that was the name of your last D&D character or something. :-P

  65. Consider other alternatives by Jeddawg · · Score: 1

    There are other alternative servers that allow access from other development platforms. The world does not boil down to M$ SQL and MySQL (and Postgres, etc.) as most of you seem to think.

    Take for instance, Advantage Database Server. Advantage supports development in Borland Delphi (and now Kylix), Borland C++Builder, as well as Java through the new Type 4 JDBC driver, php, Perl, and, yes, all Microsoft development environments, including .NET. In addition, the ODBC driver and OLE DB Provider open up tons of other development environments. (And, they have php, perl, and ODBC clients that work on Linux, so you can develop Windows or Linux clients.)

    In addition, the server supports Windows systems, Linux, and NetWare. So, there are a variety of development platforms, as well as server platforms. And, while it's not open-source (sorry), it comes at a fraction of the cost of Oracle or M$ SQL.

    Please remember that other options exist! (And, if you want a no-cost way to store data, Advantage has a Local Server dll [or .so] that can be used free of charge!)

  66. Why not use a web interface instead of GTK-LAMP by acomj · · Score: 1
    I've just built a database prototype for a client that uses
    LAMP (Linux-Apache-Mysql-Php). Oreily calls it the open source web platform and has a webpage about it. Why would you use GTK and limit your platform?



    Because its a server application the program doesn't have to be installed on different machines (except the web browser), which makes it easier to install. Programming some stuff in a web interface is tough, but not too too bad.


    I actually did the demo on an ibook (ran the database/webserver, client browser on one machine. . used fink to install MySql and a php package from entropy.net. So easy to install I was amazed. although if I deploy I'll compile myself to set the options exactly as I want.

  67. Python? by streak · · Score: 1

    People are talking about high-level Languages to interface to MySQL and other DBs yet no one has mentioned Python.

    It has connectors to MySQL, Postgres, Oracle, DB2, MSSQL (only if its hosted through IE I think :\)

    1. Re:Python? by Anonymous Coward · · Score: 0

      Py_what???
      Nobody, but geekest geek, use this language... Its a hell just try to find a (serious) isp that provide reliable hosting in python

  68. Yep. - it took all of six steps. by Slashamatic · · Score: 1
    1. browse to Cygwin d/l page
    2. CYGWIN SETUP
    3. Select install from Internet
    4. Open databases tree
    5. Select Postgress
    6. Install
    It doesn't get much easier.
  69. The DT's. by mypalmike · · Score: 1

    I'm pretty sure the beer was named after the medical condition.

    --
    There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    1. Re:The DT's. by Azghoul · · Score: 1

      Hey, whaddya know? :-D

  70. I am in awe by ttfkam · · Score: 2, Insightful
    I've just pointed out that the salad has roaches and rat feces in it and someone steps up to chastise me for using the wrong fork.

    INSERT INTO test
    (id, num1, num2, num3, price, code)
    VALUES (
    0,
    99999999999999,
    NULL,
    'A quick brown dolphin...',
    21474.83,
    'ABCDEFGHIJK'
    );

    Now the syntax should be kosher. ...and MySQL still acts like a brain dead cat on crack.
    All functions I write check that the data I'm getting or putting to the database matches the data type.
    And I applaud you for that. It's good to know that you never make mistakes, are always fully rested, are never up against a hard deadline, etc. I'm not questioning your coding skills or your intelligence. On the contrary, I think that extra checks are always worth it. What I am saying is that the database, the final repository for your data, should be making at least the same amount of effort.

    When the string 'A quick brown dolphin...' is passed to an integer field because I'm overly tired, a collegue hasn't been as rigorous as I usually am, some crack-smoking intern had a brain fart, or whatever, the fact remains that MySQL detected that it wasn't an integer. It didn't try to throw it in as the first 32-bits of the binary string. The table needed a number, MySQL had no idea what number you meant, and it decided to put in the default value for the column according to its datatype. In other words, it placed a value that I didn't explicitly specify through the client or schema and did not warn the client that it had done so.

    Imagine if all of those POSIX networking functions didn't return an error code. Why not? I'm sure there are folks out there who will say, "But my network is always up, the cables are of highest quality, and in all the time I've worked there, I have never had a socket connection fail; so why do I need the error code back?" No matter the preparation, no matter the training, no matter how good the conditions are, when the rubber hits the road, I would like to be able to see out of the windshield to see if I've spun out.

    This is the salient point that people (including the pager-adorned gentleman in the parent post) appear to blithely ignore. It's the giant pink elephant in the corner that everyone notices but no one wants to talk about.

    By all means, perform the extra checks. Perform a check at compile time, at deploy time, and at runtime. Why are MySQL folks so averse to having a check at insert/update time as well? Why is it such an affront to want your database to do its own data integrity checks? Why is it so horrible to expect a relational database to do its job!? I honestly want to know. I would very much like some insight into this rather than picking on my choice of salad fork.
    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  71. Open Source Access library by nut · · Score: 1

    I'm going to take this opportunity to plug Haccess, A set of fast, cross-platform, thread-safe C++ libraries for accessing Microsoft Access database files.
    So far written entirely by my friend Oliver, it badly needs some dedicated C++ programmers to help out. I believe it has already made its way into OpenOffice as a filter.

    --
    Never trust a man in a blue trench coat, Never drive a car when you're dead
  72. You might think... by Hecatonchires · · Score: 1

    but you'd be wrong. I often read huge swathes of text just before bed. I let it sink in. Then I try to implement, using teh book as a reference, but the initial thought process happened away from the screen.

    --

    Yay me!

  73. Since no one else asked by fataugie · · Score: 1

    WTF is SQL Server 97?
    Do you mean SQL Server 7?

    --

    WTF? Over?

  74. Re:windows developers by dave420-2 · · Score: 1

    Idiot.

  75. Embedded apps by Stone316 · · Score: 1

    Isn't sql lite for embedded apps? That would imply (to me) that its for PDA style applications. Which would mean that there would only be one users and database level locking wouldn't be an issue.

    --
    "Thanks to the remote control I have the attention span of a gerbil."
  76. Incorrect by Ryosen · · Score: 1

    Access is not a stand-alone database. It is a stand-alone database *file*. Too often, developers make the mistake of confusing Access files with an actual production-capable database. It's great for prototyping and for use as an embedded database, but that's about it. Some important things to understand.

    First, the term "Access" is a misnomer. Access is an application, part of the Microsoft Office suite. It is simply a front-end GUI to the JET database library.

    Second, interaction with a JET database is conducted on a pure file-base level. In a multiuser environment, each user accessing the database file must do so as if they were reading a simple file across a network. If you execute a query against that file, you must copy that file down into your local memory for manipulation. This is because there is no JET "Server" to marshall calls to the database file from multiple clients. If you want this functionality, you must develop a server process that listens for requests. If you're going this extra step, you might as well use a real database server (e.g. SqlServer, mySQL, Postgres, Oracle, etc). If you're not in the business of writing a database server, it's much better to let someone else do it.

    Third, JET files use a very primitive method of data locking. I might be a little behind in the current implementation, but as of Jet 3.5, you could not do row locking. Data in JET is managed in pages. IIRC, the page size is 4k. So, if you need to lock a row of data, you actually end up locking several rows, depending on the size of the rows involved. This creates greater data contention and impacts performance. Again, this might have changed recently, but it is still inefficient.

    Fourth, JET is very easy to corrupt. Since each client accesses the database file simultaneously, if one of those clients crashes, they can end up hosing the database. Contrast this with a server where if the client crashes, the database server can manage the crash, as it is an independant process.

    Five, JET does not have any ability to maintain itself. It cannot rebuild its own indexes, purge deleted rows or compress itself without manual intervention. Again, this is because there is no server. A maintenance scheme must be developed whereby these functions are performed on a periodic basis. For a database of appreciable size and use, this could be as frequent as hourly and as minimal as daily. In order to pack/compress the database, the maintenance program must have an exclusive lock on the entire database file. If you maintain a 24/7 system, this can have a severe impact. Plus, there is the issue of forcing client applications out of the database programmatically. Easy enough to set up, but still a pain in the ass.

    Full database servers perform these functions on their own, in real-time, without excluding the clients.

    There are still other reasons not to use JET for anything but the most trivial programs, but I think I've kicked it enough.

    So that I am not misunderstood, JET does have its uses. It's suitable for stand-alone applications where the maintenance processes can be integrated within the app itself. It's ubiquity on the Windows platform (since Win2000) allows you to minimize your installation package size and, of course, it's free. However, just like everything else, it's important to know what is appropriate and what should be left for more robust and capable solutions.

    Standard disclaimers apply, IMHO, YYMV, yadda yadda.

    --

    Ryosen
    One man's "Troll, +1" is another man's "Insightful, +1".
    1. Re:Incorrect by scottj · · Score: 1

      Not trying to give M$ any props here or anything, but Access isn't just a frontend for JET. It can also, via ODBC, be a frontend for just about any other database, including MySQL. Sure, it's slow and feature-limited when using linked tables via ODBC, but it sure beats JET over a network.

      --
      .-.--
    2. Re:Incorrect by Ryosen · · Score: 1

      Yes, this is true, it can be used as a front-end for just about any ODBC datasource. However, the context in which it is being used here is its own "native" database. The database was once singular to Access itself, but with its inclusion with Visual Basic 3.0 in (approx) 1993, it quickly because associated with other applications. With Windows 2000 (possibly 98), it became included with the operating system. At that point, Access the program became detached from Access the database.

      --

      Ryosen
      One man's "Troll, +1" is another man's "Insightful, +1".
  77. Management doesn't like either by Stone316 · · Score: 1
    Cause they are cheap. Seriously, i've been a DBA for 8 years and just the mention of mysql or postgresql can cause involuntary flinching in management.

    Sad fact is a significant number of applications out there that can require a database could perform just as well using postgresql. (After reading the mysql gotcha's list and experimenting with it over the past week I don't think i'll be recommending that DB for awhile. Unless its for a website backend or something.) But for some reason management things they need to spend hundreds of thousands of dollars on a commercial DB.

    I try to stay away from licensing but yesterday I priced Oracle for a server were going to put in.. I almost fainted. With these up and coming OS databases the big boys are going to have to make some serious cuts to their pricing scheme or start releasing stripped down versions.

    --
    "Thanks to the remote control I have the attention span of a gerbil."
  78. PL/SQL is like any other language by Stone316 · · Score: 1
    If your a decent programmer you won't have any problems. Have you ever tried to debug a stored procedure in mysql? Last time I checked every line was stored in the DB as a single line. So an error on line 100 would return as error on line 1. That is a nightmare to maintain.

    Most real DBA's that I know of (and I know quite a few being one myself) don't understand why mySql is so popular. As mentioned numerous times above this thread, it allows you to insert crap into your database.

    Sure, for simple websites mysql or small startups without capital its fine but for the job i'm paid to do, I won't risk it on mysql.

    --
    "Thanks to the remote control I have the attention span of a gerbil."
  79. MySQL sucks, hands down by Anonymous Coward · · Score: 0

    Look let's get it straight once and for all. MySQL sucks, hands down, it is crap. MS Access sucks, hands down it is crap.

    If you want to Mickey Mouse your careers and use MySQL or MS Access to develope applications, then be my guess. A month after your done, your client will be hiring me to rewrite their application using MSSQL because your app can't handle then load.

    The bottom line is this, if you want to develope enterprise level applications, you have no choice but to use MSSQL, Oracle or Sysbase. Using MySQL shows how unexperienced you are as a developer.

    And don't get me started with the morons out there saying that they don't need triggers, stored procedure or views. Let me ask you this, morons: When you develope a database application, how do you start? Do you just start coding your application and build you database as you go along? Or do you actually sit down and design the database first, putting in all the referential integity and business rules in? If you take the first road, then idoit, answer me this. What happens when someone goes to enter data in directly into the database and not from you application, and this will and does happen. Your database is going to get corrupt because the person now can by pass all the your business rules that you, the wondeerful programmer that you are, coded into your PHP application instead of putting them into the database.

    I personally cannot stand people who think MySQL should even belong in the same product line as MSSQL or the other commercial, real, databases out that.

    We have an old saying in the windows world: "Friends don't let friends use Access." Which means Access is great for a personal, jerk off app, but if it will ever be commercial, you need to use MSSQL. I think you OSS people out there need a similar saying.

  80. IIRC by Phil+John · · Score: 1

    MSSql, Oracle and IBM's DB2 all come in a cut down version for around $5000 per processor. Ok, so you don't get some of the nice features like advanced clustering and replication, but if you absolutely have to have oracle (i.e., running something like SAP/3 for a small shop) then that's the way to go. The problem with Oracle and DB2 is that even once you've bought the products, you need to pay a DB guru to keep them ticking over, they can't just be setup and left, like PostgreSQL and MySQL. We use MySQL for a lot of simple websites. My companies flagship product however uses a database abstraction layer, so you can use it with any database that has the base requirements.

    --
    I am NaN
  81. My mistake by ttfkam · · Score: 1

    I stand corrected

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  82. UNION by jjga · · Score: 1

    Unions are not supported either in MySQL 3.x. It is easy to replace it with several queries, but not convenient when you have a lot of SQL code that relies on unions.