Re: Referential Integrity
Posted by: Michael G. Zinner
Date: June 01, 2005 04:48PM

The MS Access ODBC driver does not support this functionality.

I have added direct selects to the MS Access System Tables to retreive the information. It is included in the patch below.

ftp://ftp.mysql.com/pub/mysql/download/mysql-migration-toolkit-1.0.7-patch-for-mssql.zip

Please extract them to .\bin\windows\java\com\mysql\grt\modules and overwrite the existing files there.

Please make sure to enable full access to the Access system tables like explained in the documentation.

To check the the foreign keys are migrated, press the [Advanced >>] button in the Manual Editing page and select a migrated table (you may need to change the Filter to Show All Objects). Then you can inspect the SQL command. Example:

CREATE TABLE `NordwindEx`.`Artikel` (
`Artikel-Nr` INTEGER(10) NOT NULL AUTO_INCREMENT,
`Artikelname` VARCHAR(40) NULL,
`Lieferanten-Nr` INTEGER(10) NULL,
`Kategorie-Nr` INTEGER(10) NULL,
`Liefereinheit` VARCHAR(25) NULL,
`Einzelpreis` DECIMAL(19, 4) NULL,
`Lagerbestand` SMALLINT(5) NULL,
`BestellteEinheiten` SMALLINT(5) NULL,
`Mindestbestand` SMALLINT(5) NULL,
`Auslaufartikel` TINYINT(1) UNSIGNED NOT NULL,
PRIMARY KEY (`Artikel-Nr`),
INDEX `ArtikelKategorie-Nr` (`Kategorie-Nr`),
INDEX `Artikelname` (`Artikelname`),
INDEX `KategorienArtikel` (`Kategorie-Nr`),
INDEX `Kategorie-Nr` (`Kategorie-Nr`),
INDEX `LieferantenArtikel` (`Lieferanten-Nr`),
INDEX `Lieferanten-Nr` (`Lieferanten-Nr`),
CONSTRAINT `LieferantenArtikel` FOREIGN KEY `LieferantenArtikel` (`Lieferanten-Nr`)
REFERENCES `NordwindEx`.`Lieferanten` (`Lieferanten-Nr`)
)
ENGINE = INNODB;

As you can see, this CREATE TABLE statement features a CONSTRAINT.

Mike

Michael Zinner, Team Lead, Developer Tools
MySQL AB, www.mysql.com

Are you MySQL certified? www.mysql.com/certification



Edited 1 time(s). Last edit at 06/01/2005 04:49PM by Michael G. Zinner.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.