Skip to main content
Version: 1.2.x 🚧

SeaORM Concepts

In SeaORM, a database with a collection of tables is called a Schema.

Each table corresponds to an Entity in SeaORM, which helps you perform CRUD (Create, Read, Update, and Delete) operations on relevant tables.

The Entity trait provides an API for you to inspect its properties (Column, Relation and PrimaryKey) at runtime.

Each table has multiple columns, which are referred to as attribute.

These attributes and their values are grouped in a Rust struct (a Model) so that you can manipulate them.

However, Model is for read operations only. To perform insert, update, or delete, you need to use ActiveModel which attaches meta-data on each attribute.

Finally, there is no singleton (global context) in SeaORM. Application code is responsible for managing the ownership of the DatabaseConnection. We do provide integration examples for web frameworks including Rocket, Actix, axum and poem to help you get started quickly.