Changes

Jump to: navigation, search

GEPS 032: Database Backend API

36 bytes removed, 10:21, 14 August 2015
Completed
'''This GEP is now complete and has been implemented for Gramps 5.0, now in github master (Aug 14, 2015).'''
 
This proposal defines a complete Database Backend API so that we can have plug-in replacements for BSDDB. This would allow the use of other databases.
# well-defined database backend types. These could be registered, like any plugin/addon. [DONE]
# is there really any reason for Gramps to have to have the code for the db backend? All that is necessary is for the backend to create the Database instance.[DONE- Backend code is either in gramps/plugins/database or in ~/.gramps/gramps50/plugins)
It makes sense that we will reuse and share the backends, so we should use option 1, and develop a database backend plugin type.
</pre>
'''DjangoDb, DictionaryDb, and DBAPI are largely complete.'''
=== Step 3 ===
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).
 
Transactions in the Python code are ignored.
'''COMPLETE'''
This has begun with the [http://sourceforge.net/p/gramps/source/ci/master/tree/gramps/gen/db/dictionary.py DictionaryDB] {{bug|4972}}, which is a in-memory replacement for the BSDDB. Still needs the indexes, and metadata support (gender names, bookmarks, etc). Also, the Dictionary transaction is non-existent.
Currently, the best working replacement backend is "dictionarydb". [MOSTLY COMPLETEDONE]
We can develop backends that work directly on Exported formats. 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).
'''Branch geps/gep-032-backend-database is complete.'''
 
== Unresolved Issues ==
 
(as of May 24, 2015)
 
# dictionarydb and djangodb are not yet finished. Mostly metadata needs to be dealt with.
# dbapi using sqlite3, postgresql, and mysql is complete.
==Other Backends==
* [[GEPS 010: Relational Backend]]
* [[GEPS 013: Gramps Webapp]]
* [[Database Backends]]
[[Category:GEPS|S]]

Navigation menu