db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hlavatý <hla...@code.cz>
Subject Re: Integrating Derby and Hibernate - name length limits
Date Sat, 18 Sep 2004 18:27:34 GMT
Hash: SHA1

Joel Rosi-Schwartz wrote:
> The issue is the length limitation of 18 characters that Derby imposes on
> foreign key constraint names. This is not an issues if one is writing a new
> schema, but existing schemas and hibernate's auto generation of FK names do
> cause a problem. Is there anyway to adjust this dynamically (I rather doubt
> it) or is this essentially a enhancement request?  The IBM Cloudscape
> Reference Manual indicates that a similar 18 character limit applies to
> index, function and trigger names. Are these also areas that might cause
> portability issues?

SQL standards impose an upper limit of 128 characters on any schema object identifiers.
18 seems unreasonably small. Only reasons for existence of this limit is, as always, politics.
These are limits of DB2. Cloudscape has been squeezed to fit the DB2 limitations, so that
you can
upgrade to DB2 from it and not be suddelny surprised by its limitations ;-)

See definition of DB2_MAX_IDENTIFIER_LENGTH18 in org.apache.derby.iapi.reference.DB2Limit

I wonder what practical purpose might constraining identifier to max 18 characters have?
It feels funny - like the other day when I learned that SAP DB had maximum index key length
under 255, all key components added together. In that case, it was because their BTree
implementation was unable to handle composite keys, and had this limit on maximum key length.
Combined with other shortcomings in collation sequences, taking 4 bytes per character,
it ended up limiting whole key all components included to like 62 characters. Totally unusable
I hope Derby will be better than that ;-)


Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


View raw message