subsystem-summary-of-database

Summarize the Stellar Core database subsystem architecture and key components.

3.3k|1.1k|Updated Nov 24, 2014
One-click install
npx skills add https://github.com/stellar/stellar-core --skill subsystem-summary-of-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subsystem-summary-of-database
Source: https://github.com/stellar/stellar-core/tree/main/.claude/skills/subsystem-summary-of-database
Command: npx skills add https://github.com/stellar/stellar-core --skill subsystem-summary-of-database

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a concise, token-efficient summary of the database subsystem within Stellar Core, making it easier to grasp its architecture and functionality without reading extensive documentation.

Core Features & Use Cases

  • Architecture Overview: Explains the dual-database (main/misc) approach for SQLite and single-database for PostgreSQL.
  • Key Components: Details important classes like Database, SessionWrapper, and StatementContext.
  • Schema Management: Describes how schema versioning and migrations are handled for both main and misc databases.
  • Connection Pooling: Outlines the strategy for managing database connections for worker threads.
  • Use Case: A new developer joining the Stellar Core project can quickly understand how data is persisted and accessed by reading this summary.

Quick Start

Use the subsystem-summary-of-database skill to get a technical summary of the database subsystem.

Frequently Asked Questions about subsystem-summary-of-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the Stellar Core database subsystem manage connections and schema migrations?

The Stellar Core database subsystem manages schema migrations via versioning and handles connections through pooling for worker threads. It details key classes like Database and session_wrapper to coordinate these persistence tasks efficiently.

What is the dual-database approach used for SQLite in Stellar Core?

The dual-database approach in Stellar Core splits data between main and misc databases for SQLite. This architecture separates core operational data from miscellaneous data to streamline persistence and data management.

How do I understand the database architecture when joining the Stellar Core project?

To understand the database architecture in Stellar Core, review the technical summary of its database subsystem. It details the single-database approach for PostgreSQL, key components like StatementContext, and data migration utilities for quick onboarding.

Does Stellar Core use the same database schema versioning for PostgreSQL and SQLite?

Stellar Core uses schema versioning for both PostgreSQL and SQLite, but their architectures differ. PostgreSQL uses a single-database approach, while SQLite splits data across main and misc databases, each with its own schema management.

What utilities are available for data migration and pruning in the Stellar Core database?

The Stellar Core database subsystem provides data migration and pruning utilities to manage database size and history. These tools work alongside schema versioning to maintain data integrity across both SQLite and PostgreSQL deployments.

Why does the Stellar Core database use a single-database approach for PostgreSQL?

Stellar Core uses a single-database approach for PostgreSQL instead of the dual-database split used for SQLite. This design choice aligns with PostgreSQL's robust connection pooling and concurrent transaction handling capabilities for worker threads.