Stormblade said:
> Ok. Love MySQL and I will be using it for my personal use and
> recommending it to clients as a lower cost alternative. I've only
> been using it for a very short time but there one major gripe I have
> with it and I believe it's just a design thing.
>
> MySQL seems to put the burden of error checking and such on the
> client.
>
> - All fields have a default value even when I don't tell it to?
> - Allow Null will only result in an error if I explicitly try to set
> the field to null.

Date fields allow invalid dates: 0000-00-00
Trailing spaces are silently discarded (fixed in 5)
Decimal fields are silently truncated if the inserted value is too long
etc.

http://sql-info.de/mysql/gotchas.html has a nice list.


> These are the two things that I really dislike. I think it's a poor
> design to rely on clients only for error checking. MySQL supports
> foreign keys.

To some extend. It is not enforced that the parent record is unique,
which is a requirement with foreign keys according to the SQL spec.


> I've only been working with MySQL for a little bit so this is just
> my first impressions. I'll be very happy to be told I'm wrong or
> that future updates (5.0 perhaps) will change some of the things
> I've mentioned.

They will eventually (not in 5). After all, if you read the todo list
carefully you will see that it says they strive to fully supporting
the SQL spec. Naturally this will break backwards compatibility in
many areas, so I am very curious how this will be implemented.


> Relying on clients for database integrity is a bad idea in my
> experience. --

Then you choose the wrong database.

Jochem





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to