# Sqlite3 collection.anki2 schema

**URL:** <https://forums.ankiweb.net/t/sqlite3-collection-anki2-schema/40000>\
**Category:** Help\
**Created:** [January 19, 2024, 1:06pm UTC](https://forums.ankiweb.net/t/sqlite3-collection-anki2-schema/40000 "2024-01-19T13:06:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankiseeker](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@ankiseeker](https://forums.ankiweb.net/u/ankiseeker)\
**Post date:** [January 19, 2024, 1:06pm UTC](https://forums.ankiweb.net/t/sqlite3-collection-anki2-schema/40000/1 "2024-01-19T13:06:16Z")

</div>

Greetings,

I’m doing some debugging for a problem I’m experiencing here: [https://forums.ankiweb.net/t/bug-all-text-imports-are-showing-up-as-duplicates](https://forums.ankiweb.net/t/bug-all-text-imports-are-showing-up-as-duplicates)

I’ve looked at the schema by running the command `sqlite3 collection.anki2 '.schema'` but I can’t make out any table relationship information as there are no foreign keys defined.

How can I find information on the table relationships?

A bit of context: about myself, about many years ago, I was a MySQL DBA for about 10 years. I understand relational database theory and am trying to put my knowledge to work, but it’s difficult to dig in without understanding how the table relationships have been designed.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [January 19, 2024, 1:34pm UTC](https://forums.ankiweb.net/t/sqlite3-collection-anki2-schema/40000/2 "2024-01-19T13:34:25Z")

</div>

Delving into the DB schema is unlikely to be helpful. The problem is probably happening at a higher level.

Here’s a summary of the database schema anyway (incomplete): [Database Structure · ankidroid/Anki-Android Wiki · GitHub](https://github.com/ankidroid/Anki-Android/wiki/Database-Structure)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [February 18, 2024, 1:34pm UTC](https://forums.ankiweb.net/t/sqlite3-collection-anki2-schema/40000/3 "2024-02-18T13:34:42Z")

</div>

Closed on February 18, 2024, 1:34pm UTC

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