<?xml version="1.0"?>
<!--
SchemaGraph: Visualizing MySQL Databases in SVG
by Weston Ruter <http://weston.ruter.net/>
   Shepherd Interactive <http://www.shepherd-interactive.com/>
License: GNU GPL 2.0 <http://creativecommons.org/licenses/GPL/2.0/>
Inspiried by Schemaball by Martin Krzywinski <http://mkweb.bcgsc.ca/schemaball/>
 
Home page: http://weston.ruter.net/projects/schemagraph/
Source: http://shepherd-interactive.googlecode.com/svn/trunk/schemagraph/
-->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-500 -500 1000 1000">
<!--
There are 13 tables, with 44 foreign keys.
	
Tables:
 - language
 - license
 - ref
 - text
 - token
 - token_group
 - token_group_cluster
 - token_group_cluster_token
 - token_parsing
 - user
 - user_language
 - work
 - work_license
-->
	<title>SchemaGraph of open_scriptures</title>
	<style type="text/css">
		text {
			font-family:Arial,Helvetica,sans-serif;
			font-size:25px;
		}
		#tables circle {
			fill:red;
		}
		#tables path {
			stroke:#bbb;
			opacity:0.3;
			stroke-width:2px;
			fill:none;
		}
		#tables g:hover path,
		#tables g.hover path {
			stroke:blue;
			stroke-width:4px;
			opacity:0.6;
		}
		#tables path.incoming {
			stroke:lime;
			stroke-width:3px;
			opacity:0.6;
		}
		g#tables g:hover text,
		g#tables g.hover text {
			font-weight:bold;
		}
		g#tables g:hover circle,
		g#tables g.hover circle {
			fill:purple;
			opacity:1.0;
		}
	</style>
	<circle r="250" fill="none" stroke="black" stroke-width="2px" />

	<g id="tables" transform="rotate(90)">

								<g id="language" class="fk_text_language_code fk_token_parsing_language_code fk_user_preferred_language_code fk_user_language_language_code ">
								<circle id="c_language" cx="250" cy="0" r="6" />
				<text x="265" dy="6.25" transform="rotate(0)">language</text>
				<path id='fk_text_name_text_id' d='M 250 0 Q 0 0 30.1341700638 248.177218525' title='language.name ➡ text.id' />			</g>
											<g id="license" class="fk_work_license_license_id ">
								<circle id="c_license" cx="221.364006413" cy="116.180793011" r="6" />
				<text x="265" dy="6.25" transform="rotate(27.6923076923)">license</text>

				<path id='fk_license_name_text_id' d='M 221.364006413 116.180793011 Q 0 0 30.1341700638 248.177218525' title='license.name ➡ text.id' /><path id='fk_license_abbreviation_text_id' d='M 221.364006413 116.180793011 Q 10.1440133345 14.6961404624 30.1341700638 248.177218525' title='license.abbreviation ➡ text.id' />			</g>
											<g id="ref" class="fk_ref_parent_ref_id ">
								<circle id="c_ref" cx="142.016186683" cy="205.745966473" r="6" />
				<text x="265" dy="6.25" transform="rotate(55.3846153846)">ref</text>
				<path id='fk_ref_work_work_id' d='M 142.016186683 205.745966473 Q 0 0 142.016186683 -205.745966473' title='ref.work ➡ work.id' /><path id='fk_ref_name_text_id' d='M 142.016186683 205.745966473 Q 0 0 30.1341700638 248.177218525' title='ref.name ➡ text.id' /><path id='fk_ref_parent_ref_id' d='M 142.016186683 205.745966473 S 0 0 142.016186683 205.745966473' title='ref.parent ➡ ref.id' /><path id='fk_ref_start_token_token_id' d='M 142.016186683 205.745966473 Q 0 0 -88.6512217606 233.754060671' title='ref.start_token ➡ token.id' /><path id='fk_ref_creator_user_id' d='M 142.016186683 205.745966473 Q 0 -0 -88.6512217606 -233.754060671' title='ref.creator ➡ user.id' /><path id='fk_ref_modifier_user_id' d='M 142.016186683 205.745966473 Q 15.8117147438 -8.29862807221 -88.6512217606 -233.754060671' title='ref.modifier ➡ user.id' />			</g>
											<g id="text" class="fk_text_name_text_id fk_license_name_text_id fk_license_abbreviation_text_id fk_ref_name_text_id fk_text_source_text_revision_id fk_token_group_cluster_token_comment_text_id fk_user_name_text_id fk_work_name_text_id fk_work_abbreviation_text_id fk_work_copyright_text_id ">
								<circle id="c_text" cx="30.1341700638" cy="248.177218525" r="6" />

				<text x="265" dy="6.25" transform="rotate(83.0769230769)">text</text>
				<path id='fk_text_language_code' d='M 30.1341700638 248.177218525 Q 13.3662633602 11.84147604 250 0' title='text.language ➡ language.code' /><path id='fk_text_source_text_revision_id' d='M 30.1341700638 248.177218525 S 0 0 30.1341700638 248.177218525' title='text.source ➡ text.id' /><path id='fk_text_creator_user_id' d='M 30.1341700638 248.177218525 Q -0 0 -88.6512217606 -233.754060671' title='text.creator ➡ user.id' /><path id='fk_text_modifier_user_id' d='M 30.1341700638 248.177218525 Q -17.3382467398 4.27349400513 -88.6512217606 -233.754060671' title='text.modifier ➡ user.id' />			</g>
											<g id="token" class="fk_ref_start_token_token_id fk_token_group_cluster_token_token_id fk_token_parsing_token_id ">
								<circle id="c_token" cx="-88.6512217606" cy="233.754060671" r="6" />
				<text x="265" dy="6.25" transform="rotate(110.769230769)">token</text>
				<path id='fk_token_work_id' d='M -88.6512217606 233.754060671 Q 0 0 142.016186683 -205.745966473' title='token.work ➡ work.id' />			</g>
											<g id="token_group" class="fk_token_group_cluster_token_group_id ">

								<circle id="c_token_group" cx="-187.127687043" cy="165.78066456" r="6" />
				<text x="265" dy="6.25" transform="rotate(138.461538462)">token_group</text>
				<path id='fk_token_group_creator_user_id' d='M -187.127687043 165.78066456 Q -0 -0 -88.6512217606 -233.754060671' title='token_group.creator ➡ user.id' /><path id='fk_token_group_modifier_user_id' d='M -187.127687043 165.78066456 Q -17.3382467398 -4.27349400513 -88.6512217606 -233.754060671' title='token_group.modifier ➡ user.id' />			</g>
											<g id="token_group_cluster" class="fk_token_group_cluster_token_token_group_cluster_id ">
								<circle id="c_token_group_cluster" cx="-242.735454357" cy="59.8289160719" r="6" />
				<text x="265" dy="6.25" transform="rotate(166.153846154)">token_group_cluster</text>
				<path id='fk_token_group_cluster_token_group_id' d='M -242.735454357 59.8289160719 Q -0 0 -187.127687043 165.78066456' title='token_group_cluster.token_group ➡ token_group.id' /><path id='fk_token_group_cluster_creator_user_id' d='M -242.735454357 59.8289160719 Q -0 -0 -88.6512217606 -233.754060671' title='token_group_cluster.creator ➡ user.id' /><path id='fk_token_group_cluster_modifier_user_id' d='M -242.735454357 59.8289160719 Q -15.8117147438 -8.29862807221 -88.6512217606 -233.754060671' title='token_group_cluster.modifier ➡ user.id' />			</g>

											<g id="token_group_cluster_token" class="">
								<circle id="c_token_group_cluster_token" cx="-242.735454357" cy="-59.8289160719" r="6" />
				<text x="265" dy="6.25" transform="rotate(193.846153846)">token_group_cluster_token</text>
				<path id='fk_token_group_cluster_token_token_group_cluster_id' d='M -242.735454357 -59.8289160719 Q -0 0 -242.735454357 59.8289160719' title='token_group_cluster_token.token_group_cluster ➡ token_group_cluster.id' /><path id='fk_token_group_cluster_token_token_id' d='M -242.735454357 -59.8289160719 Q -0 0 -88.6512217606 233.754060671' title='token_group_cluster_token.token ➡ token.id' /><path id='fk_token_group_cluster_token_comment_text_id' d='M -242.735454357 -59.8289160719 Q -0 0 30.1341700638 248.177218525' title='token_group_cluster_token.comment ➡ text.id' /><path id='fk_token_group_cluster_token_creator_user_id' d='M -242.735454357 -59.8289160719 Q -0 -0 -88.6512217606 -233.754060671' title='token_group_cluster_token.creator ➡ user.id' /><path id='fk_token_group_cluster_token_modifier_user_id' d='M -242.735454357 -59.8289160719 Q -13.3662633602 -11.84147604 -88.6512217606 -233.754060671' title='token_group_cluster_token.modifier ➡ user.id' />			</g>
											<g id="token_parsing" class="">
								<circle id="c_token_parsing" cx="-187.127687043" cy="-165.78066456" r="6" />
				<text x="265" dy="6.25" transform="rotate(221.538461538)">token_parsing</text>

				<path id='fk_token_parsing_token_id' d='M -187.127687043 -165.78066456 Q -0 0 -88.6512217606 233.754060671' title='token_parsing.token ➡ token.id' /><path id='fk_token_parsing_language_code' d='M -187.127687043 -165.78066456 Q 0 -0 250 0' title='token_parsing.language ➡ language.code' /><path id='fk_token_parsing_work_id' d='M -187.127687043 -165.78066456 Q -0 -0 142.016186683 -205.745966473' title='token_parsing.work ➡ work.id' /><path id='fk_token_parsing_creator_user_id' d='M -187.127687043 -165.78066456 Q -0 -0 -88.6512217606 -233.754060671' title='token_parsing.creator ➡ user.id' /><path id='fk_token_parsing_modifier_user_id' d='M -187.127687043 -165.78066456 Q -10.1440133345 -14.6961404624 -88.6512217606 -233.754060671' title='token_parsing.modifier ➡ user.id' />			</g>
											<g id="user" class="fk_ref_creator_user_id fk_ref_modifier_user_id fk_text_creator_user_id fk_text_modifier_user_id fk_token_group_creator_user_id fk_token_group_modifier_user_id fk_token_group_cluster_creator_user_id fk_token_group_cluster_modifier_user_id fk_token_group_cluster_token_creator_user_id fk_token_group_cluster_token_modifier_user_id fk_token_parsing_creator_user_id fk_token_parsing_modifier_user_id fk_user_creator_user_id fk_user_modifier_user_id fk_user_language_user_id fk_user_language_creator_user_id fk_user_language_modifier_user_id fk_work_creator_user_id fk_work_modifier_user_id ">
								<circle id="c_user" cx="-88.6512217606" cy="-233.754060671" r="6" />
				<text x="265" dy="6.25" transform="rotate(249.230769231)">user</text>
				<path id='fk_user_name_text_id' d='M -88.6512217606 -233.754060671 Q -34.6764934795 8.54698801027 30.1341700638 248.177218525' title='user.name ➡ text.id' /><path id='fk_user_preferred_language_code' d='M -88.6512217606 -233.754060671 Q 0 -0 250 0' title='user.preferred_language ➡ language.code' /><path id='fk_user_creator_user_id' d='M -88.6512217606 -233.754060671 S 0 0 -88.6512217606 -233.754060671' title='user.creator ➡ user.id' /><path id='fk_user_modifier_user_id' d='M -88.6512217606 -233.754060671 S 0 0 -88.6512217606 -233.754060671' title='user.modifier ➡ user.id' />			</g>
											<g id="user_language" class="">
								<circle id="c_user_language" cx="30.1341700638" cy="-248.177218525" r="6" />

				<text x="265" dy="6.25" transform="rotate(276.923076923)">user_language</text>
				<path id='fk_user_language_user_id' d='M 30.1341700638 -248.177218525 Q -0 -0 -88.6512217606 -233.754060671' title='user_language.user ➡ user.id' /><path id='fk_user_language_language_code' d='M 30.1341700638 -248.177218525 Q 0 -0 250 0' title='user_language.language ➡ language.code' /><path id='fk_user_language_creator_user_id' d='M 30.1341700638 -248.177218525 Q -2.15244071885 -17.7269441803 -88.6512217606 -233.754060671' title='user_language.creator ➡ user.id' /><path id='fk_user_language_modifier_user_id' d='M 30.1341700638 -248.177218525 Q -4.30488143769 -35.4538883606 -88.6512217606 -233.754060671' title='user_language.modifier ➡ user.id' />			</g>
											<g id="work" class="fk_ref_work_work_id fk_token_work_id fk_token_parsing_work_id fk_work_license_work_id ">
								<circle id="c_work" cx="142.016186683" cy="-205.745966473" r="6" />
				<text x="265" dy="6.25" transform="rotate(304.615384615)">work</text>
				<path id='fk_work_name_text_id' d='M 142.016186683 -205.745966473 Q 0 0 30.1341700638 248.177218525' title='work.name ➡ text.id' /><path id='fk_work_abbreviation_text_id' d='M 142.016186683 -205.745966473 Q 17.3382467398 4.27349400513 30.1341700638 248.177218525' title='work.abbreviation ➡ text.id' /><path id='fk_work_copyright_text_id' d='M 142.016186683 -205.745966473 Q 34.6764934795 8.54698801027 30.1341700638 248.177218525' title='work.copyright ➡ text.id' /><path id='fk_work_creator_user_id' d='M 142.016186683 -205.745966473 Q 0 -0 -88.6512217606 -233.754060671' title='work.creator ➡ user.id' /><path id='fk_work_modifier_user_id' d='M 142.016186683 -205.745966473 Q 2.15244071885 -17.7269441803 -88.6512217606 -233.754060671' title='work.modifier ➡ user.id' />			</g>
											<g id="work_license" class="">

								<circle id="c_work_license" cx="221.364006413" cy="-116.180793011" r="6" />
				<text x="265" dy="6.25" transform="rotate(332.307692308)">work_license</text>
				<path id='fk_work_license_work_id' d='M 221.364006413 -116.180793011 Q 0 -0 142.016186683 -205.745966473' title='work_license.work ➡ work.id' /><path id='fk_work_license_license_id' d='M 221.364006413 -116.180793011 Q 0 -0 221.364006413 116.180793011' title='work_license.license ➡ license.id' />			</g>
						</g>

	<script type="text/ecmascript" xlink:href="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" />
	<script type="text/ecmascript">
	<![CDATA[
	
	//Highlight incoming foreign key dependencies when hovering over a table
	var constraints;
	var selectedTable;
	$('#tables g').mouseover(function(e){
		var tokenlist = this.getAttribute('class').replace(/^\s*|\s*$/g, '');
		if(!tokenlist){
			constraints = [];
			return;
		}
		
		constraints = tokenlist.split(/\s+/);
		$(constraints).each(function(){
			var path = document.getElementById(this);
			if(path)
				path.setAttribute('class', 'incoming');
		});
		selectedTable = this;
		
	}).mouseout(function(e){
		selectedTable = null;
		
		$(constraints).each(function(){
			var el = document.getElementById(this);
			if(el)
				el.setAttribute('class', '');
		});
	});
	
	var tables = document.getElementById('tables');
	var rotate = parseInt(tables.getAttribute('transform').match(/rotate\((-?\d+(?:.\d+)?)\)/)[1], 10);
	
	//Rotate the graph when it is clicked
	$(document.documentElement).click(function(){
		rotate += 10;
		tables.transform.baseVal.getItem(0).setRotate(rotate, 0, 0);
	});
	
	]]>

	</script>
</svg>
