To formally specify an initial database schema, I decided to try a promising tool by the MySQL Workbench team. I had tried this tool several versions ago, but was plagued with errors that were far to frequent to use for a project. I thought I’d give it another trying seeing it had been so many releases ago, and to my pleasant surprise it was working much better. It is unfortunate that tools sometimes become more troublesome than the problem they were trying to solve, but now that I’ve been running bug free for 3-4 sessions I definitely feel MySQL Workbench has left those days behind itself.
I actually started building the EER diagram after Day 1′s post on Software Requirements and while writing Day 2′s Contemplating Data Design. The EER diagramming tool actually helped me discover some of the planned data issues I had drawn up on the white board originally. After creating the table structure in the table editor, the diagram editor provided options for defining these identifying relationships and setting whether each relation was necessary to the existence of the linking table. This really forced me to think about what the data actually was intended to mean (This is one of my favorite characteristics of contextual tools, they promote conventions specific to their domain helping novice developers discover best/good practices).
After hours of painless data entry into MySQL Workbench, my first iteration EER diagram was completed.
If you haven’t already, I highly recommend downloading this free tool and trying to design a simple database. This tool also has a bunch of other features to connect to MySQL databases and generate SQL to create your schema. I’ve also commonly used Open Model Sphere 3 to design data models, but found it much less intuitive and tedious to create schema. I”m sure there are plenty other tools out there, including many great commercial products so give it a Google if you’re interested in other diagramming tools.
Lucky for me, today’s post was primarily based on work I’d already completed :P. Guess I get to be lazy this time, tomorrow let us look at considering a technology to actually build our application on top of this data model.