CPSC 343 Database Theory and Practice Fall 2008

Drawing ER Diagrams with VioletER


Violet is a simple, free, and attractive editor for UML diagrams. (Many editors are lacking in one or more of these qualities!) Since ER diagrams are a lot like UML diagrams except for the notation being different, I've added basic support for the ER diagrams you'll be drawing in this class.

Running VioletER


/classes/f08/cs343/violet/run-violeter &

into your shell. You should get a splash screen, followed shortly by either a rather Windows-like display allowing you to select a drawing type or a recent file, or the editor window itself.

If you get the Windows-like display, choose an existing file you want to open or select "ER Diagram" to create a new ER diagram.

Using VioletER

There's not much to using VioletER:

  1. Click on the desired diagram tool (right side of the window).
  2. Click in the drawing area to place a thing or click-and-drag from one thing to another to place a connecting line.
  3. Right-click on the thing or line you've just placed to configure its options (including naming it, making an entity weak, an attribute a key, etc).
  4. Save when you are done.
  5. Maybe print your diagram, too.

The specialization node lets you configure two fields when you right-click - set only the kind and ignore the "ignoreThis" field.

For ER diagrams, there are three types of connectors:

Note: There are (currently) no checks that your drawing follows legal syntax. If you want to use a plain connector to connect entities and relationships or a participation connector to connect attributes or any kind of connector to connect two entities, Violet won't stop you.

Note #2: Weak key attributes are (currently) denoted with the solid underline also used for (regular) key attributes, instead of a dashed underline. It should not be difficult to recognize weak key attributes, however, because they are attributes connected to weak entities.

Using VioletER Outside the Lab

I've found Violet to be pretty much unusable when run over the network (i.e. displayed on a machine other than the one where it is running). If you want to use it on your own computer:

There may be occasional updates to VioletER. An announcement will be posted if there's a new jar available.

Valid HTML 4.01!