Skip to content

Commit 786aa21

Browse files
author
Richard Jones
committed
gadfly backend docco
1 parent 38d4f94 commit 786aa21

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

doc/gadfly.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
==============
2+
Gadfly Backend
3+
==============
4+
5+
This document outlines the design and implementation of the Gadfly (relational
6+
database) backend.
7+
8+
9+
About Gadfly
10+
============
11+
12+
Gadfly is a collection of python modules that provides relational
13+
database functionality entirely implemented in Python. It supports a
14+
subset of the intergalactic standard RDBMS Structured Query Language
15+
SQL.
16+
17+
18+
Basic Structure
19+
===============
20+
21+
Roundup supports a dynamic schema, something which doesn't map very well to a
22+
relational database table schema (or at least, it's frowned upon :)
23+
24+
Approaches:
25+
26+
1. Map roundup classes to relational tables. Automatically detect schema
27+
changes and modify the gadfly table schemas appropriately. Multilinks
28+
(which represent a many-to-many relationship) are handled through
29+
intermediate tables.
30+
Journals are stored adjunct to the per-class tables.
31+
2. Map roundup classes to relational tables. Automatically detect schema
32+
changes and modify the gadfly table schemas appropriately. Multilinks
33+
are handled with string representations of the id lists.
34+
Journals are stored adjunct to the per-class tables.
35+
3. Four tables:
36+
37+
- classes: class id, name
38+
- properties: class id, property id, name, type, options
39+
- nodes: class id, node id, property id, value (one row per multilink value)
40+
- journals: class id, node id, event, description
41+
42+
The classes and properties tables will need to be kept in sync with the
43+
roundup schema.
44+
4. Two less efficient tables:
45+
46+
- nodes: class, property, node id, value (one row per multilink value)
47+
- journals: class, node id, event, description
48+
49+
The classes and properties tables will need to be kept in sync with the
50+
roundup schema.
51+

0 commit comments

Comments
 (0)