Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. sea-schema

sea-schema

Apache-2.0Rust0.18.1

A Rust library for SQL schema definition and discovery across MySQL, PostgreSQL, and SQLite databases.

Visit WebsiteGitHubGitHub
229 stars62 forks0 contributors

What is sea-schema?

SeaSchema is a Rust library that provides type definitions and utilities for managing SQL database schemas. It enables developers to programmatically represent, discover, and export database structures like tables, columns, indexes, and foreign keys from live MySQL, PostgreSQL, or SQLite databases. This bridges the gap between database metadata and Rust applications, facilitating tasks like code generation and migration scripting.

Target Audience

Rust developers building database tooling, ORM layers, or applications that require programmatic interaction with SQL database schemas, such as those working on migration systems, schema introspection tools, or code generators.

Value Proposition

Developers choose SeaSchema for its uniform, type-safe API that works across multiple SQL databases (MySQL, PostgreSQL, SQLite), offering precise schema discovery and export capabilities. Its integration with SeaQuery for generating SQL statements and optional Serde support for JSON serialization provides flexibility for building robust database-related tooling.

Overview

🌿 SQL schema definition and discovery

Use Cases

Best For

  • Automatically discovering and introspecting database schemas from live MySQL, PostgreSQL, or SQLite databases in Rust applications.
  • Generating SeaQuery statements or raw SQL for database migrations and schema synchronization.
  • Building ORM layers or database abstraction tools that require type-safe representation of SQL schemas.
  • Creating code generation tools that produce Rust code from existing database structures.
  • Exporting database schema definitions to JSON format for documentation or configuration purposes using the optional Serde integration.
  • Developing database administration or monitoring tools that need to programmatically analyze table structures, indexes, and foreign keys.

Not Ideal For

  • Teams using non-Rust programming languages or frameworks
  • Applications that only need basic CRUD operations without schema introspection or migration tooling
  • Projects requiring support for databases outside MySQL, PostgreSQL, or SQLite, such as Oracle or NoSQL systems
  • Developers seeking a full-featured ORM with built-in query execution and model lifecycle management

Pros & Cons

Pros

Multi-Database Uniformity

Provides a consistent API for schema discovery across MySQL, PostgreSQL, and SQLite, as demonstrated in the README with examples for each database type, reducing vendor-specific code.

Type-Safe Definitions

Uses comprehensive Rust structs like TableDef and ColumnInfo that closely map to SQL schema elements, ensuring compile-time safety and accurate representation, as shown in the detailed film_actor table example.

Schema Discovery and Export

Enables programmatic introspection of live databases and exports schemas to SeaQuery statements or raw SQL, facilitating migration scripts and code generation, evidenced by the discovery module and writer utilities.

Optional Serde Integration

Supports JSON serialization/deserialization via the with-serde feature, allowing easy storage or sharing of schema definitions, as mentioned in the architecture section.

Cons

Limited Database Support

Only covers MySQL, PostgreSQL, and SQLite, excluding other common SQL databases like SQL Server or Oracle, which limits its use in heterogeneous environments.

Dependency on SeaQuery for Export

Full schema export to SeaQuery statements requires the SeaQuery library, adding an extra dependency and complexity if not already part of the project's toolchain.

Overhead for Simple Use Cases

The detailed type system and discovery process may introduce unnecessary complexity for applications that only need basic schema access without advanced manipulation or code generation.

Frequently Asked Questions

Quick Stats

Stars229
Forks62
Contributors0
Open Issues12
Last commit23 days ago
CreatedSince 2021

Tags

#hacktoberfest#database#database-schema#database-migration#postgresql#mysql#sqlite#rust#sql

Built With

R
Rust

Links & Resources

Website

Included in

Rust56.6k
Auto-fetched 18 hours ago

Related Projects

QdrantQdrant

Qdrant - High-performance, massive-scale Vector Database and Vector Search Engine for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/

Stars33,545
Forks2,520
Last commit21 hours ago
SurrealDBSurrealDB

A scalable, distributed, collaborative, document-graph database, for the realtime web

Stars32,748
Forks1,311
Last commit18 days ago
RustFSRustFS

🚀2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

Stars30,153
Forks1,326
Last commit20 hours ago
TursoTurso

A SQL database in Rust: SQLite-compatible, now also speaking Postgres (experimental). The LLVM of databases.

Stars23,381
Forks1,201
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub