A manifesto advocating for treating database interactions, queries, and lifecycle management as plain code with SQL as the primary language.
Database as Code is a manifesto and approach that advocates treating database interactions, queries, administration, and the entire database lifecycle as plain code. It extends the Infrastructure as Code concept to databases, emphasizing SQL as a human-oriented programming language for both data and metadata. The approach solves the problem of database management being treated separately from application development by integrating database code into standard software engineering practices.
Database administrators, data engineers, data analysts, and software developers who work with databases and want to apply software engineering practices to database management. Teams looking to integrate database changes into their CI/CD pipelines and version control systems.
Developers choose Database as Code because it provides a consistent approach to managing databases using familiar software engineering practices, enables better collaboration between development and data teams, and treats SQL as a first-class programming language rather than just a data query tool.
Treat your database as Code
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Treats SQL as a human-oriented programming language for both data and metadata, promoting clarity and maintainability, as emphasized in the manifesto's base principles.
Makes Git the single source of truth for database code, enabling traceability, collaboration, and seamless integration with CI/CD pipelines, as stated in the principles.
Includes DDL, DML, and all SQL scripts as database code, applying static analysis, testing, and automation to ensure robustness, fostering software engineering best practices.
Integrates DBAs and data professionals with development and operations teams, breaking down silos and improving workflow efficiency, as highlighted in the manifesto's goals.
Adopting this approach requires overhauling existing workflows and tooling, which can be disruptive and time-consuming for teams not already versed in CI/CD or version control for databases.
The manifesto lists diverse tools like Liquibase and dbt without a unified standard, leading to integration challenges and potential vendor lock-in for specific solutions.
Treating every database interaction as code can add bureaucratic steps like code reviews and testing for minor or ad-hoc queries, slowing down rapid decision-making and iteration.