database in python ?
Andy Dustman
farcepest at gmail.com
Thu Apr 14 18:46:16 EDT 2005
Mage wrote:
> Andy Dustman wrote:
>
> >
> >Transactions available since 3.23.17 (June 2000)
> >
> >
> Transactions only supported on slow database types like innodb.
>
> If you ever tried it you cannot say that mysql supports transactions.
No.
> Last time when I tried mysql 4.x did explicit commit if you simply
> disconnected inside a transaction block. It was a year ago, but I
will
> never forget it.
You know that the default server setting has autocommit on, right?
> >>foreign keys,
> >>
> >>
> >
> >Foreign keys available since 3.23.44 (Oct 2001)
> >
> >
> They are syntactically accepted but not forced.
http://dev.mysql.com/doc/mysql/en/innodb-foreign-key-constraints.html
http://dev.mysql.com/doc/mysql/en/error-handling.html
# Error: 1215 SQLSTATE: HY000 (ER_CANNOT_ADD_FOREIGN)
Message: Cannot add foreign key constraint
# Error: 1216 SQLSTATE: 23000 (ER_NO_REFERENCED_ROW)
Message: Cannot add or update a child row: a foreign key constraint
fails
# Error: 1217 SQLSTATE: 23000 (ER_ROW_IS_REFERENCED)
Message: Cannot delete or update a parent row: a foreign key
constraint
fails
Foreign keys work. Prior to 3.23, it was just syntactical support. But
that was 5 years ago.
> I have seen real benchmarks. MySQL 5 is slower than postgresql and
it's
> also slower than firebird if you do some real work.
So use the database that works best for your application. MySQL is not
a panacea, but there are a lot of applications it works well for.
More information about the Python-list
mailing list