Entity-Relation Data Model

Layouts made with neato have the property that all edges tend to have about the same length (unless there is a manual adjustment). By default neato uses randomization, so it makes a different layout each time, but this particular example almost always look well. Edge labels are placed at the edge's midpoint.

[Input .gv File] [SVG] [Raster Image]

graph ER {
	node [fontname="Helvetica,Arial,sans-serif"]
	edge [fontname="Helvetica,Arial,sans-serif"]
	node [shape=box]; course; institute; student;
	node [shape=ellipse]; {node [label="name"] name0; name1; name2;}
		code; grade; number;
	node [shape=diamond,style=filled,color=lightgrey]; "C-I"; "S-C"; "S-I";

	name0 -- course;
	code -- course;
	course -- "C-I" [label="n",len=1.00];
	"C-I" -- institute [label="1",len=1.00];
	institute -- name1;
	institute -- "S-I" [label="1",len=1.00];
	"S-I" -- student [label="n",len=1.00];
	student -- grade;
	student -- name2;
	student -- number;
	student -- "S-C" [label="m",len=1.00];
	"S-C" -- course [label="n",len=1.00];

	label = "\n\nEntity Relation Diagram\ndrawn by NEATO";

Copyright © 1996 AT&T. All rights reserved.

Last modified October 2, 2022: consolidate-neato-gallery (6e3643e)