A week or so I got an unexpected email from Ludek Vodicka asking me to have a look at ORM Designer for creating and maintaining my database schemas for the Symfony projects I have been working on.  Up until now I have been using MySQL Workbench to create my ER-diagrams and maintain my database structure but I’ve come up against a few obstacles when trying to use it with projects using doctrine so I thought why now.

I fully expected ORM Designer to be a MySQL Workbench clone (and it’s obviously been a question that has been raised before – ORM Designer and MySQL Workbench comparison) but I must admit I was pleasantly surprised to find out is was not.  To try and break myself into it easily I opted to start working on the database schema for the re-build of Manage My Alerts which I have intended to re-build using Symfony for quite a while.

I was a little concerned as the re-build is using Apostrophe Now! and I was unsure how ORM Designer would interact with everything.  My first pleasant surprise was when I first opened ORM Designer and was presented with an option to “Import from ORM”.  This was ideal as Apostrophe Now! already have their own schema in place I obviously want to link my entities to the relevant user accounts using the pre-installed sfDoctrineGuardUser so I need to be able to interact with these entities even though they’re not being added by myself.

My second pleasant surprise was that when the schema files were imported they were sorted out into their relevant “regions” (or in my case plugins) so you could quickly see at a glance what belongs to what (sfGuardUser, sfGuardGroup etc all part of sfDoctrineGuardPlugin) and you also have a blank region set up for adding your own schema for your project.  With all that taken care for you, you can quickly jump in and start working, unlike with MySQL Workbench in which you have to shuffle everything around and sort it out into a logical order yourself before you can do anything.

It took me a little while to figure out everything I needed (Entities, setting onDelete actions, creating relations and getting them the right way round) but everything seems to be there and adding behaviours has been reduced to a point and click which is fantastic as I don’t have try and remember what they are called anymore!

The only con I can find with ORM Designer is that it had a €99 price tag attached and I’ve always been one for going for the free alternatives so normally MySQL Workbench would win over, however, in this case I am finding the benefits outweigh the cost and I am seriously considering switching when the trial period is up.

References

ORM Designer – Visual editor for PHP Doctrine, Doctrine2, Propel and CakePHP

MySQL Workbench – A cross-platform, visual database design tool developed by MySQL.

Apostrophe Now! – A content management system designed for maximum flexibility with a minimal learning curve.