|
Posted by Jerry Stuckle on 07/27/06 12:53
Erwin Moller wrote:
> Geoff Berrow wrote:
>
>
>>Message-ID: <44c89b83$0$4524$e4fe514c@news.xs4all.nl> from Erwin Moller
>>contained the following:
>>
>>
>>>>>A simple approach:
>>>>>(Postgresnotation, not mySQL which I avoid)
>>>>
>>>>Last time I checked it mysql was being used for tinyurl.com
>>>>
>>>>http://tinyurl.com/
>>>>
>>>
>>>So what?
>>>My choice of database is not based on tinyurl.com using something or not.
>>>;-)
>>
>
> Hi Geoff,
>
>
>>I know that, but it may have been seen as indicating that you thought
>>MySQL could not handle large numbers
>
>
> No, that was not what I ment.
> I just ment: if you start using a database, Postgres has (had) some
> advantages above mySQL.
>
Sure. And MySQL has advantages over Progress. Both are good
databases, with their own advantages and disadvantages.
>
>
>>>The reason I prefer Postgresql above mySQL has more to do with support of
>>>Foreign Keys (which failed silently in mySQL), transactions, etc.
>>>When I made my pick of prefered database a few years ago, mySQL was no
>>>comparision to Postgres.
>>
>>Not quite sure what you mean by foreign keys failing silently but
>>perhaps this is off topic for this group.
>
>
> Yes a little off topic, but that happens all the time in here. ;-)
>
> What I mean by 'failing silently' is this:
> create table tbluser(
> userid serial primary key,
> username text
> )
>
> create table tblarticle(
> articleid serial primary key,
> writtenby integer references tbluser.userid,
> title text,
> content text
> )
>
> and then:
> insert into tbluser (username) values ('Geoff');
>
> suppose the userid for that insert (serial/autonumber) is 1.
> Now with mySQL, if I insert an illegal value for writtenby in tblarticle,
> like this:
> insert into tblarticle (writtenby,title,content) VALUES
> (33, 'my title', 'bla');
>
> it just fails to check the contstraint, and boldly inserts 33 for writtenby,
> which should actually give an error (Foreign Key contraint violation, os
> something like that).
Not a failure. Documented operation when now using INNODB.
>
> I rather had mySQL say: "What does 'references' mean in your
> tabledefinition? I do not know that word."
> instead of pretending it understands, but never enforcing the constraint.
>
But REFERENCES is part of the SQL standard, and they are trying to
adhere to the standard.
> I had the same kind of trouble with transactions with mySQL, that is why I
> said it matured just a short while ago (with innoDB and imysql).
>
Again, documented operation.
> For simple datastorage, this presents no problem, but once your database
> gets more complex, you really want to be able to rely on FK constraints.
>
True. But the bottom line is - know your tools!
> Anyway, this is off topic indeed. :-)
>
> Regards,
> Erwin Moller
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|