Code

Fix typo in server address (bug #822967).
[roundup.git] / doc / gadfly.txt
1 ==============
2 Gadfly Backend
3 ==============
5 This document outlines the design and implementation of the Gadfly (relational
6 database) backend.
9 About Gadfly
10 ============
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.
18 Basic Structure
19 ===============
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 :)
24 Approaches:
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:
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
42    The classes and properties tables will need to be kept in sync with the
43    roundup schema.
44 4. Two less efficient tables:
46    - nodes: class, property, node id, value    (one row per multilink value)
47    - journals: class, node id, event, description
49    The classes and properties tables will need to be kept in sync with the
50    roundup schema.