39

In the phpMyAdmin relation view, there is a column for "internal relation" right next tor "foreign key constraint". I know what foreign keys are used for in mySQL, but I've never heard of internal relations.

Is this a phpMyAdmin thing?

Nanne
  • 64,065
  • 16
  • 119
  • 163
Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196

1 Answers1

59

This is a phpmyadmin internal mechanism to manage relationship between tables.
This feature is actually useful for MYISAM tables which don't support foreign keys and constraints.
By defining internal relations in phpmyadmin you link tables together which otherwise can't be linked. These information are stored in a phpmyadmin specific table inside your MySQL server (phpmyadmin.PMA_relation).

However this is just a phpmyadmin internal definition and has no effect on mysql itself (no foreign key constraints or referential integrity are enforced).

See here for additional information.

Community
  • 1
  • 1
Ümit
  • 17,379
  • 7
  • 55
  • 74
  • 16
    As a complement of information, beware that internal relations for MyISAM, although useful, cannot be exported (except as comments). So database migration or restoration will not import them back. – dbernard Aug 28 '12 at 21:14
  • If you're using InnoDB exclusively, you can disable the 'relation' setting in config.inc.php to get rid of the pointless clutter that this feature adds to the UI. – Daniel Beardsmore Apr 19 '17 at 10:40