Skip to content

ER diagram

Generate a Mermaid entity relationship diagram. Classes become entities, slots ranging over types and enums become their attributes, and slots ranging over classes become relationship lines.

Terminal window
ohi get w3c/prov-o
ohi linkml to er-diagram --pruning-mode schema \
--to prov-o.mmd prov-o.linkml.yaml
Try it in the playground, with PROV-O
optional_markerbooleandefault true
CLI --optional-markerScala optionalMarker

Whether to mark optional attributes with a ? after their type. Mermaid supports this from version 11.16 and rejects the whole diagram in older versions.

pruning_modePruningModedefault schema
CLI --pruning-modeScala pruningMode

The elements of the schema to include in the output.

  • tree_root The elements reachable from the tree root class. Without a tree root, the same as schema.
  • schema Everything defined in the root schema, and every element reachable from it. This leaves out the unused parts of imported schemas, such as most of linkml:types.
  • skip Every element of the root schema and of all its imports.
tree_rootstring
CLI --tree-rootScala treeRoot

The class to use as the tree root, instead of the class with tree_root: true in the schema. Only for the tree_root pruning mode.