Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: databases

by legLess (Hermit)
on Jun 03, 2002 at 19:09 UTC ( [id://171310]=note: print w/replies, xml ) Need Help??


in reply to Re: databases
in thread Which DB for Windows, and how to design music DB (was: databases)

What Abigail-II is trying to say, very circumspectly, is that MySQL is often thought not to be a full RDBMS (relational database management system). MySQL has intentionally left out some features that some people believe are (a) useful, or (b) necessary for a product to be a true RDBMS. Among (a) are subselects, stored procedures and triggers. Chief among (b) are transactions.

The most important criticism of MySQL is that it doesn't support transactions, although this is no longer strictly true. The current alpha has good transaction support (although the code is ... well ... alpha); version 3.23 and up support transactions on some table types.

Why should you care about transactions? Say that you're a bank, and each time a customer makes a purchase you (1) debit their account and (2) credit the merchant account. What if the power goes out (work with me here) in between (1) and (2)? Sounds like a nightmare to code, eh? Transactions are a way of letting the database keep track of this by wrapping up a number of operations into one transaction which either totally suceeds or totally fails (in the case of failure the already-executed parts are "rolled back").

MySQL's response is that they delayed implementing transactions because most people don't need them. This is true, and often overlooked by serious database people. Wittgenstein once said that what most philosophers think of as rigorous proof is like buying two copies of the morning paper and comparing them character-by-character before you believe that either is genuine. In short, don't let MySQL's lack of transactions scare you away. If your data's so important that you need transactions, you should be hiring a database expert anyway.

MySQL is reputed to run better than PostgreSQL under Windows.

Here's a pretty decent comparison of the two (note that it's by the MySQL team, but is pretty honest). Here's some good PostgreSQL and RDBMS documentation. Some of it is Linux-specific; most is agnostic. Here's also a good article on PHPBuilder comparing MySQL and PostreSQL. It's light on the PHP but very specific on the databases (in particular, speed).

Finally, the O'Rielly Perl DBI book is very good, but DBI isn't that complicated. I'd suggest getting a good SQL book instead and reading the man pages and online tutorials for DBI.
--
man with no legs, inc.

Replies are listed 'Best First'.
Re: databases
by Abigail-II (Bishop) on Jun 04, 2002 at 11:04 UTC
    Transactions give you many things. Isolation, duration, etc. But there is more missing from MySQL. Safe on-line backups. (No, just backing up the filesystem with the tables will not do if you want to keep data consistent). Triggers. Integrety checks. Nested queries.

    I strongly suggest reading http://openacs.org/philosophy/why-not-mysql.html. Only use MySQL if you truly understand the dangers.

    Finally, the O'Rielly Perl DBI book is very good, but DBI isn't that complicated.

    Most certainly. However, writing good SQL queries can be an art in itself. Many queries are simple, but when they get more complicated it's easy to write something that runs for 24 hours, while it could have been done in 5 minutes.

    Abigail, DBA in several former lives.

Re^3: databases
by dragonchild (Archbishop) on Oct 31, 2005 at 01:17 UTC
    It is necessary to point out, 3 1/2 years later, that MySQL 5.0 (which has just been released) has every single feature avaible in Oracle 10g, and then some. This includes the basics such as transactions, subselects, triggers, and stored procedures. It also includes the neato-keen features, such as clustering, replication, and multiple-indices-per-table-per-query.

    MySQL has certainly grown up.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://171310]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-26 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found