Mercurial > p > roundup > code
comparison doc/gadfly.txt @ 995:b59b60306914
gadfly backend docco
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 30 Aug 2002 08:46:07 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 994:2f434d54eba6 | 995:b59b60306914 |
|---|---|
| 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 |
