From 2d36aea65a8532226e88b959317905534fc4bf28 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 24 Jan 2010 13:47:48 +0000 Subject: [PATCH] Added doc notes on new database hierarchy svn: r14111 --- src/gen/db/__init__.py | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/gen/db/__init__.py b/src/gen/db/__init__.py index 0a4941ba9..55e11cff2 100644 --- a/src/gen/db/__init__.py +++ b/src/gen/db/__init__.py @@ -18,6 +18,57 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +""" + Gramps Database API. + + Database Architecture + ===================== + + Access to the database is made through Python classes. Exactly + what functionality you have is dependent on the properties of the + database. For example, if you are accessing a read-only view, then + you will only have access to a subset of the methods available. + + At the root of any database interface is either DbReadBase and/or + DbWriteBase. These define the methods to read and write to a + database, respectively. + + The full database hierarchy is: + + - B{DbBsddb} - read and write implementation to BSDDB databases (U{gen/db/write}) + - B{DbWriteBase} - virtual and implementation-independent methods for reading data (U{gen/db/base.py}) + - B{DbBsddbRead} - read-only (accessors, getters) implementation to BSDDB databases (U{gen/db/read.py}) + - B{DbBDjango} - read and write implementation to Django-based databases (U{web/djangodb.py}. +""" + from base import * from dbconst import * from cursor import *