CPSC 343 | Database Theory and Practice | Fall 2008 |
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.
Type
/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.
There's not much to using VioletER:
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:
Use the "Attribute connector" for connecting attributes to entities and relationships, and for connecting components of a composite attribute to the main attribute. It's just a basic line with no configurable properties.
The "E-R connector" is for connecting entities and relationships when you want to use the single/double line notation to indicate whether an entity's participation in a relationship is total. It also lets you specify a role and a maximum cardinality.
The "E-R connector [(min,max notation]" connector is for connecting entities and relationships when you want to use the (min,max) notation for showing cardinality. It also lets you specify a role.
The "Is subclass of" connector is for connecting an entity type to a superclass or one of the round specialization nodes. You need to drag from the subclass to the superclass/specialization node when you create the line. You can specify a defining predicate.
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.
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:
You'll need Java 6 update 10 installed on your computer. (Run java -version to see what version you have - it should be jdk1.6.0_10.) Earlier versions of Java 6 can be used to create and save diagrams, but you won't be able to print. (download Java 6)
Copy /classes/f08/cs343/violet/violeter.jar and /classes/f08/cs343/violet/run-violeter to your own computer (via scp - ask if you don't know how to do this).
Edit run-violeter, changing /classes/f08/cs343/jdk1.6.0_10/bin/java to the path of your Java 6 installation, and changing /classes/f08/cs343/violet/violeter.jar to the path of where you put violeter.jar.
Make run-violeter executable:
chmod +x run-violeter
will do it if you are currently in the directory where you copied it.
Run run-violeter.
There may be occasional updates to VioletER. An announcement will be posted if there's a new jar available.