On 9/12/06, William G. [email protected] wrote:
Austin Z. wrote:
SQL databases suck, but MySQL implements SQL so badly that it
shouldn’t even be called an SQL database.
I think we’re running into a terminology issue here. If we think
of MySQL as a data persistence and retrieval mechanism, it has
certain properties and is optimized for certain types of
applications.
You mean “applications where the integrity of the data is completely
irrelevant.”
The fact that it’s so widely used, and so effectively used by so
many people, argues that the design decisions embodied in MySQl
weren’t completely wrong.
If you’re trying to embody SQL database semantics, then said design
decisions are wrong. If you’re just trying to have something that’s
slightly more structured than flat files, then you’re right – they’re
not wrong. Otherwise, MySQL is crap. Utter and complete crap for which
I have no respect for its developers.
The fact that it’s an incomplete realization of Codd’s vision, and
has some interesting flaws from a data integrity perspective, means
that it isn’t good for other applications.
Stop. Right. There. (1) NO current SQL-based database realizes
Codd’s vision. Some come closer than others, but SQL databases aren’t
properly relational. See the discussions headed by Fabian Pascal and
Chris Date (of dbdebunk) for that. (2) MySQL doesn’t even implement
SQL database semantics properly. They pretend to, but they don’t
actually do it. Because they don’t support it, (3) a lot of developers
have assumed that if MySQL does it, it must be right. It isn’t. It
isn’t even close to right. I would argue that 90%+ of all the open
source database schema produced to work with MySQL take advantage of
MySQLisms and aren’t even first normal form.
There’s a place for big piles of data. But not in a SQL database or
a schema implemented on top of that database. I personally want RoR
databases to be well-designed databases, not the piles of utter crap
that you see from 99% of PHP developers who couldn’t tell data
modelling from a hole in the ground.
Yes, I have very strong opinions about data modelling. No, I don’t
think you can be a good developer if you don’t know data modelling
(more provocative: you can’t make a good object model if you can’t do
proper data modelling). Yes, I think you can create good databases
that will run on MySQL – but you have to do so despite MySQL’s
stupidities.
Generic statements like “MySQL is a big sticking pile that should be left
in the scrapheap” aren’t really useful at all.
When they’re accurate – as “MySQL is a big stinking pile…” is,
they’re quite useful. If you want to work with databases, work with a
real database. Postgres, for example. If you just need something
quick, use SQLite. Both will protect your data better than MySQL.
It’s unfortunate that MySQL has become the “preferred” database for
web work, because it’s complete crap.
-austin