Skip to content

3. Draw the shapes ​

A node shape describes a class: its attributes, its relations, and what counts as valid. The shapes supply the fields of the Properties panel and the tools of the palette.

The Book shape ​

  1. Select Shape in the palette and click an empty place on the canvas.
  2. Type Book and press Enter. The typed name also sets the target class.
  3. Click + attribute on the card. Type title for the path and keep xsd:string.
  4. Click the cardinality badge of the row until it says 1: a book has exactly one title.
  5. Add a second attribute publicationYear. Double-click the datatype pill and select xsd:integer.

The Author shape ​

  1. Create a second shape Author the same way.
  2. Add the attribute born with the datatype xsd:date.
  3. Hover the Author card and click the + on its right side. Select the Cities scheme as the target. The line goes to the imported scheme, and the path editor opens on it.
  4. Type city as the path and press Enter.

Connect the two ​

  1. Hover the Book card and click +.
  2. Select the Author shape as the target.
  3. Type author in the path editor of the new line and press Enter.

A line with the cardinality 0..* goes from Book to Author.

The Book and Author shapes with the Cities scheme

The palette now has a Book tool and an Author tool. Each tool creates an instance of the target class of its shape.

Next: Create instances.

AGPL-3.0-or-later