The regular newsletter I get fromTara's outfit (as I like to call it ) included a link entitled "Don't use MySQL" - here's the link: grimoire.ca/mysql/choose-something-else
I found it a very interesting read ... you might like this snippet:
CREATE TABLE account (
accountid INTEGER
AUTO_INCREMENT
PRIMARY KEY,
discountid INTEGER
);
Query OK, 0 rows affected (0.54 sec)
INSERT INTO account
(discountid)
VALUES
(0),
(1),
(2);
Query OK, 3 rows affected (0.03 sec)
Records: 3 Duplicates: 0 Warnings: 0
SELECT *
FROM account
WHERE discountid = 'banana';
+-----------+------------+
| accountid | discountid |
+-----------+------------+
| 1 | 0 |
+-----------+------------+
1 row in set, 1 warning (0.05 sec)
Ok, unexpected, but there's at least a warning (do your apps check for those?) - let's see what it says:
SHOW WARNINGS;
+---------+------+--------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------+
| Warning | 1292 | Truncated incorrect DOUBLE value: 'banana' |
+---------+------+--------------------------------------------+
1 row in set (0.03 sec)
I can count on one hand the number of DOUBLE columns in this example and still have five fingers left over.
In case you were wondering SQL Server aborts the SELECT with:
Conversion failed when converting the varchar value 'banana' to data type int.
the article goes on to say:
Actually, you don't even need a table for this: SELECT 0 = 'banana' returns 1
We constantly bump up against competitors flogging MySQL based solutions, presumably using "free" versions of MySQL to shave some cost off ... my cries of "Its crap, don't trust your precious data to it" go unheeded of course ... nice to have a "You might like to read this thesis" line-to-shoot instead
Thanks Tara