In the modern software landscape, database sprawl is a reality. Between microservices, multi-tenant architectures, and distinct environments for development, staging, and production, what was once a single, monolithic database has evolved into a complex, distributed "fleet." Managing this fleet manually is a recipe for inconsistency, security vulnerabilities, and operational bottlenecks.
Enter the "as-code" paradigm. Just as Infrastructure-as-Code (IaC) revolutionized server management, Database-as-Code is the next logical step, bringing automation, version control, and repeatability to your data layer.
This guide will show you how to tame your database complexity using the databases.do agent, transforming your entire collection of databases into a single, programmable service.
Imagine turning complex data infrastructure orchestration into simple, agentic workflows. That's the core promise of databases.do. It's a high-level control plane that allows you to provision, monitor, and manage entire collections of databases as a single entity through a unified API.
Instead of manually logging into different cloud consoles or running bespoke scripts for each database type, you can programmatically command your entire fleet.
import { Do } from '@do-sdk/core';
// Initialize the .do client
const ado = new Do();
// Access the databases agent
const myDatabases = ado.use('databases.do');
// List all managed database instances across all clouds and types
const allInstances = await myDatabases.list();
console.log(allInstances);
// [
// { id: 'db-prod-pg-useast1', type: 'PostgreSQL', provider: 'AWS', status: 'running' },
// { id: 'db-cache-prod-redis', type: 'Redis', provider: 'GCP', status: 'running' },
// { id: 'db-staging-mongo', type: 'MongoDB', provider: 'Azure', status: 'running' }
// ]
A "database fleet" isn't just for massive enterprises. If you have separate databases for different services or environments, you're already managing a fleet. The challenges that arise are common:
databases.do addresses these pain points by providing a single, consistent interface for data orchestration.
The databases.do agent operates on the principle of agentic workflows. This means you issue high-level, declarative commands, and the agent handles the underlying complexity. You don't need to be an expert in the AWS, GCP, and Azure CLIs; you just need to tell the agent what you want.
const newStagingDb = await myDatabases.create({
type: 'PostgreSQL',
provider: 'AWS',
plan: 'staging-small',
region: 'us-west-2'
});
It's crucial to understand the distinction between the two agents, as they are designed to work together.
databases.do is the Air Traffic Controller for your entire fleet. It manages the collection, handling orchestration tasks like provisioning, listing, and global configuration.
database.do is the Pilot for a single aircraft. It's used to interact with a specific database instance—managing its schema, running queries, or handling backups.
You use databases.do to create a new database, and then you might use database.do to connect to that instance and set up its initial tables.
Q: What is the difference between database.do and databases.do?
A: database.do is designed to manage a single database instance, handling its schema, queries, and specific operations. databases.do is a higher-level agent that orchestrates a collection or 'fleet' of multiple database instances, perfect for managing data across microservices, multi-tenant systems, or different environments (dev, staging, prod).
Q: Can I manage different types of databases across multiple clouds?
A: Yes. The databases.do agent acts as a control plane, allowing you to provision, configure, and manage diverse database types (e.g., PostgreSQL, Redis, MongoDB) from different cloud providers (AWS, GCP, Azure) through one unified API.
Q: How do I provision a new database using the databases.do agent?
A: You can programmatically provision a new database instance by calling create() on the agent, specifying the desired type, configuration, and provider. This turns complex infrastructure setup into a single, repeatable line of code.
Q: How is security handled when managing multiple databases?
A: All interactions are secured through the .do platform's centralized authentication and authorization. You can define fine-grained policies to control which users or services have the permission to list, create, or destroy database instances within your fleet.
Stop wrestling with individual databases and start conducting your entire data infrastructure as a cohesive, programmable service. By adopting a Database-as-Code approach with databases.do, you can eliminate manual errors, accelerate development cycles, and enforce rock-solid security across your entire data fleet.
Ready to take control of your databases? Explore the .do Agentic Workflow Platform and start managing your fleet as code today.