Article: Crow's Feet Arrows in OpenOffice.org

I've spent much of my adult life designing and implementing relational databases for fun and profit. One of the most important aspects of designing a relational database is to fully understand the relationships between the various tables. The best tool for this is to develop a schema diagram that graphically illustrates these relationships using "crow's feet notation".

Crow's feet notation defines graphical three elements (O, dash and crow foot) that may be combined to define four possible constraints to a side of the relationship:

One and Only One One and Only One
Zero or One Zero or One
Zero through Many Zero through Many
One through Many One through Many

Let's say we have a very simple database to track contact information with the following conditions:

  • We rely on email, so each person MUST have at least one email address associated with him
  • Telephone is not so important, so each person may have several telephone numbers (office, home, cell, fax, etc)
  • Each person may more may not be associated with a company

The following diagram illustrates a database schema to meet these requirements:

Example schema

The phonetype and emailtype tables are static reference tables that would be preloaded with vlues like "Home, Office, Mobile, Fax", etc. For each contact in the "people" table there are "zero to many" telephone numbers and, conversly, for every telephone number there must be at least one person associated with it (for e.g. a business number or shared home number). Email addresses can not be shared, so for each email address there is one and only one person.

You get the idea...

I used to created these diagrams by hand, using trusty old pencil and paper. Recently I decided to give OpenOffice.org's Draw a try at this. One of the problems with Draw is the lack of these symbols as arrows for the connectors. Fortunately creating arrows in Draw is very easy. Simply define the graphic as a polygon and assign it to an arrow!

Crows_Feet_Arrows.odg is an OpenOffice.org file that contains polygon graphics of each of the crow's feet elements. If you're building a database schema diagram simply load this file into Draw and for each polygon select it then right-mouse-click and select the Line option from the context menu. In the Line dialogue select the Arrow Styles tab, click the Add button then enter a name for the arrow (e.g. Crow's Feet - Zero through Many) and click the OK button. Your new arrow will now be listed in the Arrow Style drop down list. Once you have them all set up you can save the arrow styles to the default standard.soe file and they will be there for you to continue using.

Arrow styles dialogue

Enjoy!

Jay MacDonald
June 2007


For more information on Crow's Feet notation and how they are used visit this page on Wikipedia. For more information on creating arrows in OpenOffice.org visit Solveig Haugland's blog page about it.


© 2005-2007 ThinkTek Solutions
3242 Tennyson Cres, North Vancouver, BC, Canada V7K 2A8
Tel: (604) 984-9573 Fax: (604) 984-9599 Mobile: (778) 386-9573
No portion of this site may be reproduced, duplicated, copied, sold resold or otherwise exploited for any purpose without the express written consent of ThinkTek Solutions.

This page conforms to the W3C XHTML 1.0 Transitional Specification and should be viewable in all browsers