File size: 3,658 Bytes
0a84888 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
---
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
description: Understand the n8n database structure
contentType: explanation
---
# Database structure
This page describes the purpose of each table in the n8n database.
## Database and query technology
By default, n8n uses SQLite as the database. If you are using another database the structure will be similar, but the data-types may be different depending on the database.
n8n uses [TypeORM](https://github.com/typeorm/typeorm){:target=_blank .external-link} for queries and migrations.
To inspect the n8n database, you can use [DBeaver](https://dbeaver.io){:target=_blank .external-link}, which is an open-source universal database tool.
## Tables
These are the tables n8n creates during setup.
<!-- vale off -->
### auth_identity
Stores details of external authentication providers when using [SAML](/user-management/saml/index.md).
### auth_provider_sync_history
Stores the history of a SAML connection.
### credentials_entity
Stores the [credentials](/glossary.md#credential-n8n) used to authenticate with integrations.
### event_destinations
Contains the destination configurations for [Log streaming](/log-streaming.md).
### execution_data
Contains the workflow at time of running, and the execution data.
### execution_entity
Stores all saved workflow executions. Workflow settings can affect which executions n8n saves.
### execution_metadata
Stores [Custom executions data](/workflows/executions/custom-executions-data.md).
### installed_nodes
Lists the [community nodes](/integrations/community-nodes/installation/index.md) installed in your n8n instance.
### installed_packages
Details of npm community nodes packages installed in your n8n instance. [installed_nodes](#installed_nodes) lists each individual node. `installed_packages` lists npm packages, which may contain more than one node.
### migrations
A log of all database migrations. Read more about [Migrations](https://github.com/typeorm/typeorm/blob/master/docs/migrations.md){:target=_blank .external-link} in TypeORM's documentation.
### project
Lists the [projects](/user-management/rbac/projects.md) in your instance.
### project_relation
Describes the relationship between a user and a [project](/user-management/rbac/projects.md), including the user's [role type](/user-management/rbac/role-types.md).
### role
Not currently used. Foruse in future work on custom roles.
### settings
Records custom instance settings. These are settings that you can't control using environment variables. They include:
* Whether the instance owner is set up
* Whether the user chose to skip owner and user management setup
* License key
### shared_credentials
Maps credentials to users.
### shared_workflow
Maps workflows to users.
### tag_entity
All workflow tags created in the n8n instance. This table lists the tags. [workflows_tags](#workflows_tags) records which workflows have which tags.
### user
Contains user data.
### variables
Store [variables](/code/variables.md).
### webhook_entity
Records the active webhooks in your n8n instance's workflows. This isn't just webhooks uses in the Webhook node. It includes all active webhooks used by any trigger node.
### workflow_entity
Your n8n instance's saved workflows.
### workflow_history
Store previous versions of workflows.
### workflow_statistics
Counts workflow IDs and their status.
### workflows_tags
Maps tags to workflows. [tag_entity](#tag_entity) contains tag details.
## Entity Relationship Diagram (ERD)

<!-- vale on -->
|