Foreign Keys

From Hostek.com Wiki
Revision as of 16:44, 21 November 2012 by Davidd (Talk | contribs) (Are Foreign Keys Supported?)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Are Foreign Keys Supported?

Information regarding whether database system support foreign keys, and requirements(if any) for their use.

MySQL

MySQL supports foreign key relationships. However, they can only be created for InnoDB tables (not MyISAM tables, which are the default type).


NOTE:

If you are creating your tables with SQL queries, you would add TYPE=INNODB at the end of the table declaration to create the table as an InnoDB type.

If you are using phpMyAdmin, you would select InnoDB as the type when you create your tables.


MSSQL

Microsoft SQL Server supports foreign key relationships.


Microsoft Access

Microsoft Access supports foreign key relationships.