-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alan Hodgkinson wrote:
Mark Matthews wrote:
[snip]
First, you need to use InnoDB tables to be able to extract foreign key
information.

Ah.. thank you. I had though that native tables in the newer MySQL version, stored and we able re-display, the foreign key definitions,
but that they didn't actually enforce them as constraints.

This means I MUST have 'type=innodb' in my create statements, right? That's a small inconvenience, but acceptable.
Yup (for now). MySQL 4.1 is supposed to support foreign keys for other table types.


Second, are you trying to use the JDBC:ODBC bridge (not recommended at
all), or the Type IV JDBC driver (MySQL Connector/J) to do this?

Type IV. I've been using: mm.mysql-2.0.14, which I beleive is the old version of Connector/J. You probably know more about that than me :)


Connector/J supports DatabaseMetaData.getImported/ExportedKeys().
The most solid implementation of this functionality is in the 3.0 series.


Cool! I'll upgrade.


THE MOST IMPORTANT QUESTION
---------------------------

Do you know which version of _MySQL_ supports the foreign key info?
Is it only in version 4.x or does the latest 3.32.x have it too?
The documentation and change log are relatively vague about it.
Any version that supports InnoDB supports foreign keys. The parser accepts foreign key information, but if the table type does not support it, it is not available via 'SHOW CREATE TABLE...'

-Mark
- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+A0butvXNTca6JD8RAu5rAKDCsxF81YGOEZw9b8cWxR/6DL9WGACfZfDH
k3T+nXqdVp+HaqdEzrL2u24=
=avTS
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to