How to create relationship using navicat ?

HI

I am using navicat to create tables and its relationships but when I try to create a foreign key, navicat only creates an index but not the foreign key.

Regards
dimensionavAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nitinmehtaCommented:
I'm sorry if it sounds dumb but have you checked the engine of the table(s) created? Foreign keys are only possible with InnoDB and generally MySQL doesn't throw an error when you try to create them on.. say a MyISAM table.

Regards,
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dimensionavAuthor Commented:
nitinmehta:

I see, those tables are MyISAM, where can I change this on navicat?

And please, I am not that skilled on MySQL, would you mind to tell me why are different types of engines and what are those for?

Thanks!
0
dimensionavAuthor Commented:
0
nitinmehtaCommented:
I hope you've found the solution now but just to answer your questions,

1) You can run a simple command to change the engine:
ALTER TABLE table_name ENGINE=''InnoDB';

2) MySQL has this feature 'pluggable engine' which makes it possible for you to add the engine of your choice to work on different type of data and with diff type of applications. For ex MYISAM is very good for read-only applications because of the speed and because it's good for read-only, does not concentrate on transactions and thus no foreign keys and relationships and locks are at table level. Innodb is MySQL's transaction database and is more close to an RDBMS. MySQL has many more engine types and different use for all of them.

Hope that helps...

Regards,
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.