Changes

Jump to: navigation, search

DB-API Database Backend

53 bytes added, 21:49, 21 September 2020
update intro to reflect present
Gramps 5.0 comes .x came with a new, alternative database backend called DB-API. The Gramps 5.0.x default database will be remained the old standard Berkeley DB (often abbreviated as BSDDB).
Testing with Gramps 5.0 is the initial test of .x showed the DB-API backend. If it works , worked well, then and with the release of Gramps 5.1 may make it .x the SQLite DB-API backend was made the default.
What is DB-API? DB-API is a very loose standard to connect to "SQL engines". DB-API doesn't standardize any of the SQL, but merely standardizes the ability to connect, query, and get results back. You can read more about the [https://www.python.org/dev/peps/pep-0249/ DB-API specification].
Gramps has been designed to work with one DB-API SQL engine:
* sqlite3 SQLite3 - single or multi-user on single operating system
And experimental Addons have been provided for:
* [[MongoDB]] - ??
sqlite3 SQLite3 has been tested the most and is the SQL engine recommended for use with the DB-API Database Backend. However, advanced users can adjust the details of the SQL connect. See [[#Advanced uses]] for more details.
==Scenarios==
Gramps 5.0 provides the opportunity to set up your databases in many different configurations. Some possible uses:
# Users will just use DB-API with the default sqliteSQLite. Nothing will really be different from previous uses of BSDDB, but there is no lock file, and the data is much less likely to become corrupted. # Users can share their sqlite SQLite file on a single file system. Any user logged into that computer can work together on the same file. Operations like import will lock the file, but individual edits can be made simultaneously. Note: there is no code to prevent editing the same record at the same time. For sqliteSQLite, we would have to implement our own row-locking code. Or perhaps just give a warning if the data has changed since we started editing it.# Users can put their sqlite SQLite database on a file-sharing drive, like Dropbox, Google Drive, etc. This is tricky to understand. These systems are file-sharing, not record-sharing. That means that you can't have two users writing at the same time. In fact, if you have two users writing, you probably want to keep the session short. Start grampsGramps, make changes, exit. Or just browse. Or take turns.# Multiple users can use postgresql Postgresql locally. This is relatively speedy, but only really useful if the database is also made available over the network. Otherwise, you would probably just use sqliteSQLite.# Multiple users can use postgresql Postgresql remotely. This is the most powerful option, but also the slowest. Gramps is currently written in a manner that assumes a fast, local connection to the database. Over time, we can refine Gramps code to support this mode better, which will make the other uses faster as well. In any event, this mode should work well, once you have your large data loaded. All operations should work as normal.
There are other possibilities, and even combinations of the above.
119
edits

Navigation menu