# Are the database schema design considerations described somewhere?

**URL:** <https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732>\
**Category:** Development\
**Tags:** database\
**Created:** [January 5, 2025, 9:43pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732 "2025-01-05T21:43:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![equaeghe](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@equaeghe](https://gramps.discourse.group/u/equaeghe)\
**Post date:** [January 5, 2025, 9:43pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732/1 "2025-01-05T21:43:37Z")

</div>

I am a new user of Gramps. I was encountering some limitations (related to 1-parent and 3-parent families and single parentage), so I looked into the database schema to get an understanding of the model underlying Gramps (using [DB Browser for SQLite](https://sqlitebrowser.org/)). After doing so, I had an urge to provide some feedback on the schema (unrelated to the limitations I mentioned before). However, I am ignorant of the considerations guiding and constraining its design, and want to avoid bringing up points that have been discussed before. Are these considerations described somewhere?

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [January 5, 2025, 9:52pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732/2 "2025-01-05T21:52:50Z")

</div>

Have a look at the [Gramps Data Model](https://gramps-project.org/wiki/index.php/Gramps_Data_Model). The schema will stay the same for the next release, but the object storage will change from pickled blobs to JSON.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 5, 2025, 9:56pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732/3 "2025-01-05T21:56:15Z")

</div>

Are you asking about the Gramps Data Model?

[https://gramps-project.org/wiki/index.php/Gramps\_Data\_Model](https://gramps-project.org/wiki/index.php/Gramps_Data_Model)

[https://gramps-project.org/wiki/index.php/Database\_Formats](https://gramps-project.org/wiki/index.php/Database_Formats)

FYI, accessing a Gramps 5.2 database file with an external SQL tool will run into problems with a legacy from the BSDDB era… blobs. The retirement of blobs is anticipated for the 6.0 release.

---

<div class="post-metadata">

**Author:** ![equaeghe](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@equaeghe](https://gramps.discourse.group/u/equaeghe)\
**Post date:** [January 6, 2025, 9:26pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732/4 "2025-01-06T21:26:31Z")

</div>

Thank you. That explains more than I had thought there would be to explain! Replacing the BLOBs with JSON will make things much more transparent indeed.

---

<div class="post-metadata">

**Author:** ![equaeghe](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@equaeghe](https://gramps.discourse.group/u/equaeghe)\
**Post date:** [January 6, 2025, 9:29pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732/5 "2025-01-06T21:29:47Z")

</div>

Ah, thank you as well, the database formats page make some further things clear! Now I dare guess that likely the lack of foreign key use and use of indexes instead of unique constraints is due to the genericity of `dbapi`.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [February 5, 2025, 9:30pm UTC](https://gramps.discourse.group/t/are-the-database-schema-design-considerations-described-somewhere/6732/6 "2025-02-05T21:30:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
