Over a million developers have joined DZone.

PHPMyAdmin Designer View

DZone's Guide to

PHPMyAdmin Designer View

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

This week I've been using phpMyAdmin for what feels like the first time in years. I'm happier at the command line, but needed some graphical representation of information and easy ways to export example queries for the book I'm working on. I noticed that phpMyAdmin now has a Designer tab, which shows relationships between tables and allows you to define them.

If your table types don't support foreign keys, you can still draw links in here, and phpMyAdmin will show the id fields as links to the data they represent, which is quite a nice touch (MyISAM doesn't support foreign keys). If your database does support foreign keys, then I found this post which explained that you must have an index on the column that will be the foreign key as well as a primary key on the table it references in order to be able to create the foreign key. If you see a box like this:

then a "real" foreign key is being created. You can choose what happens when rows are created or updated in the table.

PhpMyAdmin has improved a lot since I last used it, and although I can't see me using this feature a whole lot I think it's a brilliant addition for people just starting out with databases. Being able to create a foreign key and then observe the effects, and also get a graphical representation of the structure they have represented can only help. I've always liked PhpMyAdmin for beginners because it shows what SQL it just ran and I think this feature is useful in the same sort of way. I had no idea it was here and got a few surprised responses when I tweeted about it - so I thought I'd share!

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}