In the reverse engineering of the MySQL database, hintana cannot generate the primary-foreign key relationship.

Source: Internet
Author: User

When using myeclipse for development and reverse engineering of hibernate, we found that the one-to-one key relationship could not be generated, the explicit database has a primary-foreign key relationship. why is reverse generation unavailable?

There is no direct answer to the decisive search, but I still find some clues. "MyISAM database engine does not support transaction processing or foreign keys." I have a look at this sentence.

Query the current MySQL Database Engine

Show engines;

Indeed, the MyISAM engine was changed to the InnoDB type.

Alter table table name type = InnoDB;

The prompt is successful. But it still does not work. Check the database engine to find the problem. In the past, MySQL did not support the InnoDB database engine.

Why is it not supported? MySQL is of the InnoDB type by default. The cause is as follows:

Previously, to test some PHPProgramA one-click installation package for phpnow is provided. This package is green. so it seems quite useful all the time. mySQL installed on the computer enables me to start it manually. so the database I have been using has become the database provided in phpnow.

Innordb is much more powerful than myiasm, but the performance of innordb is much worse than MyISAM.

It took more than 500 seconds to import a database.

In addition, do not forget to change the database data engine. Because the import is still the original data engine, you need to manually change it.

Alter table table name type = InnoDB;

This article is from nabaichuan. Please indicate the source and corresponding link when reprinting.

Permanent link to this article: http://www.bicner.com/55.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.