Perhaps the discussion should move back towards how Tomcat interacts with
databases.

This thread seems to be damning MySQL for not having super advanced
features, some of which should perhaps not even be in the purview of the
database layer, but more appropriately belong at the application layer (ie.
Tomcat).

For example, I rewrote a report generator for my company.  The existing
generator, a PHP + MySQL setup, was insanely slow and difficult to maintain
being that it consisted of 1 php page containing hundreds of lines of code.
I rewrote it in jsp + POJO and the new version runs much faster, because it
doesn't have a single query with a JOIN clause in it.  The old generator had
super complex queries that took forever to run and placed an enormous amount
of load on the database server.  I achieved that same result of a JOIN by
pushing that functionality up to the Java layer.

Sure we can argue about which DBMS has the fastest JOINs but nonetheless it
remains that JOIN queries will always be computationally expensive compared
to single table queries.

Well thats my 2 cents :)

On Thu, Jan 22, 2009 at 7:39 AM, Jim Cox <shakahsha...@gmail.com> wrote:

> When creating tables with referential integrity in MySQL you still get gems
> like, e.g.:
>
>  mysql> create table jimtest ( colA  varchar(32) NOT NULL, CONSTRAINT fk1
> FOREIGN KEY(colA) REFERENCES jimtest2(colA) ON DELETE CASCADE );
> ERROR 1005 (HY000): Can't create table './test/jimtest.frm' (errno: 150)
>
> Same indecipherable error for non-existent referenced table, or column type
> mismatch, or a missing index. Admittedly, you learn what to look for after
> a
> while, but the error message sucks.
>
>
> On Wed, Jan 21, 2009 at 11:06 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Rusty,
> >
> > Rusty Wright wrote:
> > > I think the biggest gripe I've had with mysql is the problem where I
> was
> > > violating a unique constraint and it was giving me some generic
> > > (completely useless) error; HY001 I think.
> >
> > I've always found the error messages themselves very informative. For
> > instance, if I attempt to insert a record into a table with an FK that
> > doesn't match, MySQL's command-line interface gives me this message:
> >
> > ERROR 1452 (23000): Cannot add or update a child row: a foreign key
> > constraint fails (`database/target_table`, CONSTRAINT
> > `name_of_foreign_key_constraint` FOREIGN KEY (`column_name`) REFERENCES
> > `source_table` (`column_name`))
> >
> > Perhaps Connector/J doesn't give quite such useful error messages, but I
> > seem to recall something nice like "Foreign key constraint check failed".
> >
> > I have found that every database has stupid error codes and you
> > basically have to code your app around tables of db-specific error codes
> > if you want to give your users (or log files) anything better than the
> > driver-supplied error messages.
> >
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iEYEARECAAYFAkl38NUACgkQ9CaO5/Lv0PCwAgCggKgAfu/ZZ+ClRAGtEuM4+xyK
> > e7EAn0R/4fyPgBfhxSB51um5ZW63jZzL
> > =xo6L
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>

Reply via email to