[Lazarus] Lazarus, Jedi etc.
Michael Van Canneyt
michael at freepascal.org
Mon Jul 15 16:37:35 CEST 2013
On Mon, 15 Jul 2013, Henry Vermaak wrote:
> On Mon, Jul 15, 2013 at 02:49:06PM +0100, Graeme Geldenhuys wrote:
>> On 2013-07-15 13:43, leledumbo wrote:
>>> Or if they insist on using MySQL (compatible alternative): MariaDB
>> Nope, still not! I'll not touch MySQL, MariaDB or anything based on
>> those with a 10 foot pole! If you value your data, stay away from those two.
>> Another developer enlightened me on how bad MySQL really is, and I
>> confirmed what he said on two of my servers (Linux and FreeBSD).
>> Here is the simple test to show how bad MySQL/MariaDB is...
>> ---------[ Forwarded message ]-----------
>> This test was done on a newly setup FreeBSD server - no tweaking to
>> MySQL was done - just the default install.
>> mysql> create table a (b int not null, c int not null);
>> Query OK, 0 rows affected (0.17 sec)
>> mysql> insert into a (b) values (1);
>> Query OK, 1 row affected, 1 warning (0.03 sec)
>> As if the above was not miraculous enough, then you get:
>> mysql> select * from a;
>> | b | c |
>> | 1 | 0 |
>> 1 row in set (0.00 sec)
> Could you explain why the above is bad for those of us that aren't DB
> experts? To my untrained eye it looks fairly plausible, so I'm
> obviously missing something.
Simple. The statement
create table a (b int not null, c int not null);
creates a table called 'a', in which the fields b and c are required.
that is, they cannot be NULL.
mysql> insert into a (b) values (1);
Attempts to insert a record with value NULL for C, which is explicitly
forbidden by the definition of the table.
The definition of a RDBMS states that it must enforce all database constraints.
The above violates that.
The last statement then shows that MySQL has silently inserted 0 as a value for the field C.
That's even worse. It invents data.
(I could name more examples)
sqlite has the same problem, and even worse. It does not even enforce the correct type.
More information about the Lazarus