Jump to: navigation, search

Using database API

459 bytes added, 14:43, 24 September 2016
The DbBsddb interface defines a hierarchical database (non-relational) written in [ PyBSDDB]. There is no such thing as a database schema, and the meaning of the data is defined in the Python classes above. The data is stored as pickled tuples and unserialized into the [[Using_database_API#Primary_Objects|primary data types (below)]].
=== DbDjango DB-API ===
The DbDjango DB-API interface defines the Gramps data in terms of ''models'' and ''relations'' from uses a generic interface backed with the general Python SQL implementation, called [httphttps://www.djangoprojectpython.comorg/dev/peps/pep-0249/ Django projectDB-API]. The Gramps' generic interface (gramps.gen.db.generic.DbGeneric) has all of the logic for interacting with the database backend can be any implementation that supports Django, including such popular except for the specific DB access code. Gramps' DB-API (gramps.plugins.db.dbapi.dbapi) implements the details so as to talk to conforming SQL implementations as sqlite, MySQL, Postgresql, and Oracledatabases. The data is retrieved from Other database engines could also implement the SQL fieldsDbGeneric details, serialized and then unserialized into the [[Using_database_API#Primary_Objects|primary data types (below)]]such as a nosql option.
For more details on the By default, Gramps Django projectDB-API uses sqlite. However, see [[GEPS 013: you can also configure DB-API to use mysql, postgresql, and perhaps others. To be compatible with BSDDB, DB-API stores Gramps Webapp]]data in an identical manner (pickled tuples). However, to allow for fast access, DB-API also stores "flat" data (such as strings and integers) in secondary SQL fields. These are indexed so that data can be selected without having to traverse, unpickle, initialize objects, and compare properties.
=== Using the Database ===

Navigation menu