Using FreeMind as a Schema Development Tool
In the early stages of planning a database design, I prefer a tool that lets me capture my thoughts as they flow without getting in the way. FreeMind is that tool.
My tool of choice when working on a brand-new project is FreeMind, an open-source mind-mapping tool.
What I like about mind-mapping tools, in general, is that it is very easy to add nested levels of details and then instantly fold them out of view so that you can zoom out and see the big picture.
What I like about FreeMind, in particular, is that it's:
- Free
- Blazing fast
- Has intuitive keyboard shortcuts
Installing FreeMind
Via Chocolatey, the Windows Package Manager
I use chocolatey, a Windows package manager, to install FreeMind:
choco install freemind
If you don't already have a Java runtime installed, you will need to do that separately. For non-commercial use, you can use the Oracle version via:
choco install javaruntime
Via the Microsoft Store
I haven't tried it, but apparently you can download and install FreeMind directly from the Microsoft Store. Looks promising.
Intuitive Keyboard Shortcuts
Keyboard shortcuts are very much a personal preference, so your mileage may vary, but all the basic navigation and node editing worked the way I would have expected. I didn't even bother looking up the shortcuts. I tried what I thought made sense and it just worked. Here are the shortcuts I use most often:
[Enter]
: Add another node at the same level[Insert]
: Add a new sub-node[Shift]+[Enter]
: Add a node at the same level but above the current node[Delete]
: Delete the current node[Shift]+[Insert]
: Add a node at a level between the current node and its parent[Space]
: Collapse or expand current node[F2]
: Edit current node's text
Designing Database Schemas
There are lots of good tools available for designing database schemas, including those that will generate SQL CREATE TABLE statements. However, when I'm first starting out, I prefer something less structured.
I don't want to have to decide whether every field should be required or not right away. If I know that a certain field should be required or optional, I like having the ability to indicate that. But if I want to put that decision off, I like being able to indicate that, too. Most purpose-built database schema design software only give you two options for a field: Required or Optional. But a third option–I-haven't-decided-yet–is my preferred default.
What I like about using FreeMind is that I can get a whole bunch of information out of my head and onto the screen with very little friction.
If I'm thinking of relevant sample data when I add a field, I just create a "Sample Data" subnode then add subnodes to that with the values I had in mind. I can even add subnodes to those values if I think they could use some further explanation. And when I'm done adding all that sample data, I select the field name node, press the space bar, and all of that detail collapses out of sight.
Custom Formatting Patterns
FreeMind includes predefined formatting patterns that you can apply to nodes. The software refers to these patterns as "Physical Styles." FreeMind allows you to customize the patterns via the Pattern Manager (Format > Physical Style > Manage Patterns...).
I have a couple of custom patterns that I use to format Table and Field names. I assign these styles to shortcut keys [F5]
and [F6]
, respectively:
[F5]
: Format node as a Table name[F6]
: Format node as a Field name
To apply these styles, you can download my patterns.xml file and save it to:
%UserProfile%\.freemind\
For example, on my computer the file is saved as:
C:\Users\Mike\.freemind\patterns.xml
Here is an excerpt of the file with the XML definitions of my two custom formatting patterns:
<pattern name="dbTable">
<pattern_node_background_color value="#99ccff"/>
<pattern_node_color/>
<pattern_node_style/>
<pattern_node_font_name value="Consolas"/>
<pattern_node_font_bold value="true"/>
<pattern_node_font_italic/>
<pattern_node_font_size value="14"/>
</pattern>
<pattern name="dbField">
<pattern_node_background_color value="#ccffff"/>
<pattern_node_color/>
<pattern_node_style/>
<pattern_node_font_name value="Consolas"/>
<pattern_node_font_bold/>
<pattern_node_font_italic/>
<pattern_node_font_size value="12"/>
<pattern_icon/>
</pattern>
Sample Usage
To get a feel for how I use this tool, here's an old brainstorming session from an ill-conceived payroll application I was going to write for internal use.
(PRO TIP: never write internal tools when there are commercial alternatives; it's always bad ROI ... [Narrator]: Mike learns lessons slowly; he will waste time writing internal tools in the future)
Cover image created with Microsoft Designer