
subgraph "logical_grouping" {
	style = rounded;
	bgcolor = gray95;
	color = gray;
	
	subgraph cluster_meta {
		label = <<b>schema versioning</b><br /> version: @@VERSION@@>;
		dbversion;
	}

	subgraph cluster_content {
		label = <<b>content</b>>;
		content;
		skipped_content;
	}

	subgraph cluster_directory {
		label = <<b>directories</b>>;
		directory;
		directory_entry_dir;
		directory_entry_file;
		directory_entry_rev;
	}

	subgraph cluster_revision {
		label = <<b>revisions</b>>;
		revision;
		revision_history;
		person;
	}

	subgraph cluster_release {
		label = <<b>releases</b>>;
		release;
	}

	subgraph cluster_snapshots {
		label = <<b>snapshots</b>>;
		occurrence;
		occurrence_history;
		snapshot;
		snapshot_branch;
		snapshot_branches;
	}

	subgraph cluster_origins {
		label = <<b>origins</b>>;
		origin;
		fetch_history;
		origin_visit;
	}

	subgraph cluster_entity {
		label = <<b>entities</b>>;
		entity;
		entity_history;
		entity_equivalence;
		listable_entity;
		list_history;
	}

	subgraph cluster_metadata {
                label = <<b>metadata</b>>;
                metadata_provider;
                origin_metadata;
		tool;
	}

	subgraph cluster_statistics {
                label = <<b>statistics</b>>;
                object_counts;
	}

	{
		edge [style = dashed];

		# "rtcolN" identifies the N-th row in a table, as a source
		# "ltcolN" identifies the N-th row in a table, as a destination
		"directory_entry_dir":rtcol2 -> "directory":ltcol1;
		"directory_entry_file":rtcol2 -> "content":ltcol2;
		"directory_entry_file":rtcol2 -> "skipped_content":ltcol2;
		"directory_entry_rev":rtcol2 -> "revision":ltcol1;
		"directory":rtcol2 -> "directory_entry_dir":ltcol1;
		"directory":rtcol3 -> "directory_entry_file":ltcol1;
		"directory":rtcol4 -> "directory_entry_rev":ltcol1;
		"occurrence":rtcol3 -> "revision":ltcol1;
		"occurrence_history":rtcol3 -> "revision":ltcol1;
		"release":rtcol2 -> "revision":ltcol1;
		"revision":rtcol9 -> "directory":ltcol1;
		"revision_history":rtcol2 -> "revision":ltcol1;
		"entity_history":rtcol3 -> "entity_history":ltcol2;
		"entity_history":rtcol10 -> "listable_entity":ltcol1;
	}
}
