Open main menu

Gramps β

Changes

GEPS 032: Database Backend API

701 bytes added, 11:36, 12 May 2015
no edit summary
This proposal defines a complete Database Backend API so that we can have dropplug-in replacement replacements for BSDDB. This would allow the use of other databases, even relational/SQL backends, but used in a non-relational manner.
This is an idea refined from [[GEPS 010: Relational Backend]]. However, without the relational components.
Schema version: Unknown
</pre>
 
==Transactions==
 
Because BSDDB didn't support transaction natively, Gramps developed these in Python. Most database system have transaction built into the system. Most database backends will perhaps not use transactions as BSDDB does.
 
There still could be uses for the transactions, However. For example, we can use an abstraction for the History undo/redo. Although the current system only exists in the current session, and is limited. We can probably create a better method with more features (such as diff between versions, lifetime changes, etc).
==Progress==
Currently, the best working replacement backend is gramps.webapp.dbdjango.
We can develop backends that work directly on Exported formats. For example, our SQLite export would make a fine backend. Others to consider: GEDCOM and CSV. These would probably use a DbDictionary, and simply import/export on load/close (would lose data if power outage; would be fast as in-memory, slow on start/stop). ==Other Backends==Backends Other Backend plugins to consider developing:
* MongoDB
* CouchDB
* Sqlite - probably the best for our uses
* CSV - spreadsheet
* [[Talk:GEPS_032:_Database_Backend_API#SQLHeavy_?|SQLHeavy]] - probably not... sqlite is a thin, robust, backwards-compatible-guaranteed layer. SQLHeavy has too much that we do not need.
* [[Talk:GEPS_032:_Database_Backend_API#Libgda_?|Libgda]]
 
==Issues==
 
* Need to be able to represent transactions
* Need to be able to undo/redo
= See Also =