Commits

Anonymous committed ccf8c41

move qdb.html etc. to qfm

Comments (0)

Files changed (9)

Makefile

-XSLTPROC=xsltproc
-
-# SQL database schemas from XHTML via OWL, using GRDDL
-# Fri, 07 Jan 2005 15:32:50 -0600
-# http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2005Jan/0000.html
-OWLSQL=../owlsql
-
-
-qfm/models.py: qdb.owl $(OWLSQL)/owl2django.xsl
-	$(XSLTPROC) --novalid -o $@ $(OWLSQL)/owl2django.xsl qdb.owl
-
-qdb.sql: qdb.owl $(OWLSQL)/owl2sql.xsl
-	$(XSLTPROC) --novalid -o $@ $(OWLSQL)/owl2sql.xsl qdb.owl
-
-qdb.owl: qdb.html $(OWLSQL)/grokDBSchema.xsl
-	$(XSLTPROC) --novalid -o $@ $(OWLSQL)/grokDBSchema.xsl qdb.html
-

qdb.html

-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<title>Quacken Database</title>
-</head>
-<body>
-
-<h1>Quacken database</h1>
-
-<p>see also: trxht.py</p>
-
-<table border="1">
-<tbody>
-<tr>
-<th>Table</th>
-<th>Field</th>
-<th>Datatype</th>
-<th>ref</th>
-<th>Description</th>
-</tr>
-</tbody>
-
-<tbody>
-<tr>
-<td>Account</td>
-<td>id</td>
-<td>int</td>
-<td></td>
-<td>and categories</td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>name</td>
-<td>text</td>
-</tr>
-<tr>
-<td></td>
-<td>parent</td>
-<td>int</td>
-<td>Account</td>
-<td></td>
-</tr>
-</tbody>
-<tbody>
-<tr>
-<td>Job</td>
-<td>id</td>
-<td>int</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>name</td>
-<td>text</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-</tbody>
-<tbody>
-<tr>
-<td>Transaction</td>
-<td>id</td>
-<td>int</td>
-</tr>
-<tr>
-<td></td>
-<td>acct</td>
-<td>int</td>
-<td>Account</td>
-</tr>
-<tr>
-<td></td>
-<td>date</td>
-<td>date</td>
-</tr>
-<tr>
-<td></td>
-<td>payee</td>
-<td>text</td>
-</tr>
-<tr>
-<td></td>
-<td>num</td>
-<td>text</td>
-</tr>
-<tr>
-<td></td>
-<td>ty</td>
-<td>text</td>
-</tr>
-<tr>
-<td></td>
-<td>memo</td>
-<td>text</td>
-</tr>
-</tbody>
-
-<tbody>
-<tr>
-<td>Split</td>
-<td>id</td>
-<td>int</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>trx</td>
-<td>int</td>
-<td>Transaction</td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>acct</td>
-<td>int</td>
-<td>Account</td>
-</tr>
-<tr>
-<td></td>
-<td>job</td>
-<td>int</td>
-<td>Job</td>
-</tr>
-<tr>
-<td></td>
-<td>clr</td>
-<td>text</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>memo</td>
-<td>text</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>subtot</td>
-<td>float</td>
-<td></td>
-<td><em>hmm... decimal?</em></td>
-<td></td>
-</tr>
-</tbody>
-<tbody>
-<tr>
-<td>Payee</td>
-<td>id</td>
-<td>int</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-<tr>
-<td></td>
-<td>name</td>
-<td>text</td>
-<td></td>
-<td></td>
-<td></td>
-</tr>
-</tbody>
-</table>
-
-<p>Per <a
-href="http://www.twistedmatrix.com/documents/current/howto/policy/coding-standard#auto15">twisted
-conventions</a>, <q>Database tables will be named with plural nouns</q>.
-Hmm... seems to conflict with <a href="http://www.djangoproject.com/documentation/0.96/tutorial02/">django admin</a> defaults.
-</p>
-
-</body>
-</html>

qdb.owl

-<?xml version="1.0"?>
-<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:s="http://www.w3.org/2000/01/rdf-schema#" xmlns:dt="http://www.w3.org/2001/XMLSchema#" xmlns:owl="http://www.w3.org/2002/07/owl#">
-  <owl:Class r:ID="Account">
-    <s:label>Account</s:label>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#id">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
-            <s:comment>and categories</s:comment>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#name">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:ObjectProperty r:about="#parent">
-            <s:comment/>
-          </owl:ObjectProperty>
-        </owl:onProperty>
-        <owl:allValuesFrom r:resource="#Account"/>
-      </owl:Restriction>
-    </s:subClassOf>
-  </owl:Class>
-  <owl:Class r:ID="Job">
-    <s:label>Job</s:label>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#id">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#name">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-  </owl:Class>
-  <owl:Class r:ID="Transaction">
-    <s:label>Transaction</s:label>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#id">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:ObjectProperty r:about="#acct">
-            <s:comment/>
-          </owl:ObjectProperty>
-        </owl:onProperty>
-        <owl:allValuesFrom r:resource="#Account"/>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#date">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#date"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#payee">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#num">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#ty">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#memo">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-  </owl:Class>
-  <owl:Class r:ID="Split">
-    <s:label>Split</s:label>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#id">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:ObjectProperty r:about="#trx">
-            <s:comment/>
-          </owl:ObjectProperty>
-        </owl:onProperty>
-        <owl:allValuesFrom r:resource="#Transaction"/>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:ObjectProperty r:about="#acct">
-            <s:comment/>
-          </owl:ObjectProperty>
-        </owl:onProperty>
-        <owl:allValuesFrom r:resource="#Account"/>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:ObjectProperty r:about="#job">
-            <s:comment/>
-          </owl:ObjectProperty>
-        </owl:onProperty>
-        <owl:allValuesFrom r:resource="#Job"/>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#clr">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#memo">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#subtot">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#float"/>
-            <s:comment>hmm... decimal?</s:comment>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-  </owl:Class>
-  <owl:Class r:ID="Payee">
-    <s:label>Payee</s:label>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#id">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-    <s:subClassOf>
-      <owl:Restriction>
-        <owl:onProperty>
-          <owl:DataTypeProperty r:about="#name">
-            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
-            <s:comment/>
-          </owl:DataTypeProperty>
-        </owl:onProperty>
-        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
-      </owl:Restriction>
-    </s:subClassOf>
-  </owl:Class>
-</r:RDF>

qdb.sql

-CREATE TABLE Accounts (
-  id INTEGER PRIMARY KEY 
- ,   name TEXT 
- ,   parent INTEGER 
- );
-CREATE TABLE Transactions (
-  id INTEGER PRIMARY KEY 
- ,   acct INTEGER 
- ,   date DATE 
- ,   payee TEXT 
- ,   num TEXT 
- ,   ty TEXT 
- ,   memo TEXT 
- );
-CREATE TABLE Splits (
-  id INTEGER PRIMARY KEY 
- ,   trx INTEGER 
- ,   acct INTEGER 
- ,   cat INTEGER 
- ,   clr TEXT 
- ,   memo TEXT 
- ,   subtot FLOAT 
- );
-CREATE TABLE Payees (
-  id INTEGER PRIMARY KEY 
- ,   name TEXT 
- );
-CREATE TABLE Classes (
-  id INTEGER PRIMARY KEY 
- ,   name TEXT 
- );
+XSLTPROC=xsltproc
+
+# SQL database schemas from XHTML via OWL, using GRDDL
+# Fri, 07 Jan 2005 15:32:50 -0600
+# http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2005Jan/0000.html
+OWLSQL=../../owlsql
+
+
+models.py: qdb.owl $(OWLSQL)/owl2django.xsl
+	$(XSLTPROC) --novalid -o $@ $(OWLSQL)/owl2django.xsl qdb.owl
+
+qdb.sql: qdb.owl $(OWLSQL)/owl2sql.xsl
+	$(XSLTPROC) --novalid -o $@ $(OWLSQL)/owl2sql.xsl qdb.owl
+
+qdb.owl: qdb.html $(OWLSQL)/grokDBSchema.xsl
+	$(XSLTPROC) --novalid -o $@ $(OWLSQL)/grokDBSchema.xsl qdb.html
+
  
     parent = models.ForeignKey('self', null=True)
  
+    kind = models.CharField(maxlength=80, null=True)
+ 
 
     class Admin:
         pass
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>Quacken Database</title>
+</head>
+<body>
+
+<h1>Quacken database</h1>
+
+<p>see also: trxht.py</p>
+
+<table border="1">
+<tbody>
+<tr>
+<th>Table</th>
+<th>Field</th>
+<th>Datatype</th>
+<th>ref</th>
+<th>Description</th>
+</tr>
+</tbody>
+
+<tbody>
+<tr>
+<td>Account</td>
+<td>id</td>
+<td>int</td>
+<td></td>
+<td>and categories</td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>name</td>
+<td>text</td>
+</tr>
+<tr>
+<td></td>
+<td>parent</td>
+<td>int</td>
+<td>Account</td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>kind</td>
+<td>text</td>
+<td></td>
+<td>AL=asset/liability (what quicken calls an "account") or<br />
+IE = income/expense ("category")</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>Job</td>
+<td>id</td>
+<td>int</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>name</td>
+<td>text</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>Transaction</td>
+<td>id</td>
+<td>int</td>
+</tr>
+<tr>
+<td></td>
+<td>acct</td>
+<td>int</td>
+<td>Account</td>
+</tr>
+<tr>
+<td></td>
+<td>date</td>
+<td>date</td>
+</tr>
+<tr>
+<td></td>
+<td>payee</td>
+<td>text</td>
+</tr>
+<tr>
+<td></td>
+<td>num</td>
+<td>text</td>
+</tr>
+<tr>
+<td></td>
+<td>ty</td>
+<td>text</td>
+</tr>
+<tr>
+<td></td>
+<td>memo</td>
+<td>text</td>
+</tr>
+</tbody>
+
+<tbody>
+<tr>
+<td>Split</td>
+<td>id</td>
+<td>int</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>trx</td>
+<td>int</td>
+<td>Transaction</td>
+<td></td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>acct</td>
+<td>int</td>
+<td>Account</td>
+</tr>
+<tr>
+<td></td>
+<td>job</td>
+<td>int</td>
+<td>Job</td>
+</tr>
+<tr>
+<td></td>
+<td>clr</td>
+<td>text</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>memo</td>
+<td>text</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>subtot</td>
+<td>float</td>
+<td></td>
+<td><em>hmm... decimal?</em></td>
+<td></td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>Payee</td>
+<td>id</td>
+<td>int</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+<tr>
+<td></td>
+<td>name</td>
+<td>text</td>
+<td></td>
+<td></td>
+<td></td>
+</tr>
+</tbody>
+</table>
+
+<p>Per <a
+href="http://www.twistedmatrix.com/documents/current/howto/policy/coding-standard#auto15">twisted
+conventions</a>, <q>Database tables will be named with plural nouns</q>.
+Hmm... seems to conflict with <a href="http://www.djangoproject.com/documentation/0.96/tutorial02/">django admin</a> defaults.
+</p>
+
+</body>
+</html>
+<?xml version="1.0"?>
+<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:s="http://www.w3.org/2000/01/rdf-schema#" xmlns:dt="http://www.w3.org/2001/XMLSchema#" xmlns:owl="http://www.w3.org/2002/07/owl#">
+  <owl:Class r:ID="Account">
+    <s:label>Account</s:label>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#id">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+            <s:comment>and categories</s:comment>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#name">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:ObjectProperty r:about="#parent">
+            <s:comment/>
+          </owl:ObjectProperty>
+        </owl:onProperty>
+        <owl:allValuesFrom r:resource="#Account"/>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#kind">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment>AL=asset/liability (what quicken calls an "account") or
+IE = income/expense ("category")</s:comment>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+  </owl:Class>
+  <owl:Class r:ID="Job">
+    <s:label>Job</s:label>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#id">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#name">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+  </owl:Class>
+  <owl:Class r:ID="Transaction">
+    <s:label>Transaction</s:label>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#id">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:ObjectProperty r:about="#acct">
+            <s:comment/>
+          </owl:ObjectProperty>
+        </owl:onProperty>
+        <owl:allValuesFrom r:resource="#Account"/>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#date">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#date"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#payee">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#num">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#ty">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#memo">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+  </owl:Class>
+  <owl:Class r:ID="Split">
+    <s:label>Split</s:label>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#id">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:ObjectProperty r:about="#trx">
+            <s:comment/>
+          </owl:ObjectProperty>
+        </owl:onProperty>
+        <owl:allValuesFrom r:resource="#Transaction"/>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:ObjectProperty r:about="#acct">
+            <s:comment/>
+          </owl:ObjectProperty>
+        </owl:onProperty>
+        <owl:allValuesFrom r:resource="#Account"/>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:ObjectProperty r:about="#job">
+            <s:comment/>
+          </owl:ObjectProperty>
+        </owl:onProperty>
+        <owl:allValuesFrom r:resource="#Job"/>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#clr">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#memo">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#subtot">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#float"/>
+            <s:comment>hmm... decimal?</s:comment>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+  </owl:Class>
+  <owl:Class r:ID="Payee">
+    <s:label>Payee</s:label>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#id">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#integer"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+    <s:subClassOf>
+      <owl:Restriction>
+        <owl:onProperty>
+          <owl:DataTypeProperty r:about="#name">
+            <s:range r:resource="http://www.w3.org/2001/XMLSchema#string"/>
+            <s:comment/>
+          </owl:DataTypeProperty>
+        </owl:onProperty>
+        <owl:cardinality r:datatype="http://www.w3.org/2001/XMLSchema#integer">1</owl:cardinality>
+      </owl:Restriction>
+    </s:subClassOf>
+  </owl:Class>
+</r:RDF>
+CREATE TABLE Accounts (
+  id INTEGER PRIMARY KEY 
+ ,   name TEXT 
+ ,   parent INTEGER 
+ );
+CREATE TABLE Transactions (
+  id INTEGER PRIMARY KEY 
+ ,   acct INTEGER 
+ ,   date DATE 
+ ,   payee TEXT 
+ ,   num TEXT 
+ ,   ty TEXT 
+ ,   memo TEXT 
+ );
+CREATE TABLE Splits (
+  id INTEGER PRIMARY KEY 
+ ,   trx INTEGER 
+ ,   acct INTEGER 
+ ,   cat INTEGER 
+ ,   clr TEXT 
+ ,   memo TEXT 
+ ,   subtot FLOAT 
+ );
+CREATE TABLE Payees (
+  id INTEGER PRIMARY KEY 
+ ,   name TEXT 
+ );
+CREATE TABLE Classes (
+  id INTEGER PRIMARY KEY 
+ ,   name TEXT 
+ );