In today's complex tech landscape, managing a single database is one thing. Managing a distributed collection of them—SQL, NoSQL, graph, and more—is another challenge entirely. Teams often find themselves juggling multiple dashboards, authentication methods, and siloed tools, turning simple tasks like inventorying resources into a major project.
What if you could treat your entire data estate like software? What if you could provision, query, and scale all your data resources through a single, powerful API?
This is the promise of databases.do, a platform that transforms complex data operations into simple, repeatable workflows. This guide will provide a practical introduction to the .do SDK, showing you how to get started with a fundamental but powerful capability: listing all data resources in your project with just a few lines of code.
Before we dive into the code, let's clarify what databases.do is. It’s an agentic workflow platform designed for managing collections of data resources as code. Instead of manually clicking through UIs or writing bespoke scripts for each database type, you define and interact with your databases programmatically.
This approach abstracts away the underlying infrastructure, allowing you to focus on what you want to achieve, not how to achieve it across disparate systems.
A common point of clarification is the difference between database.do and databases.do:
Getting an inventory of your data resources shouldn't be a chore. With the .do SDK and the databases agent, it's a simple, asynchronous call.
Let's get started. Once you've installed the SDK and authenticated your account, you can use the following code to retrieve a complete list of your provisioned databases.
Here’s a simple TypeScript function that demonstrates how to list every database associated with your project.
import { databases } from '@do/sdk';
// List all databases within your project
async function listAllDatabases() {
try {
const allDbs = await databases.list();
console.log('Available Databases:', allDbs);
return allDbs;
} catch (error) {
console.error('Failed to retrieve databases:', error);
}
}
listAllDatabases();
Let's look at what's happening here:
The result, allDbs, will be a comprehensive list of your data resources, giving you an immediate, programmatic overview of your data estate. This is the foundation of effective database management.
Listing your databases is just the beginning. The true power of the databases.do platform comes from using this unified API access to perform more complex operations. Imagine extending this script to:
By treating your database infrastructure as code, these operations become versionable, repeatable, and easy to integrate into your CI/CD pipelines. This is how you achieve truly scalable databases.
What is databases.do?
databases.do is an agentic workflow platform that allows you to manage collections of data resources as code. It provides a unified API to provision, query, and scale multiple databases, abstracting away the underlying infrastructure complexity.
How is this different from database.do?
database.do refers to a single data resource or instance. databases.do refers to the management of a collection of these resources, allowing you to perform operations across multiple databases at once, like listing all available databases or applying a configuration change to a group of them.
What types of databases can I manage?
The .do platform is designed to be extensible. You can manage various types of databases, including SQL, NoSQL, and graph databases, by integrating the appropriate drivers and defining them within your agentic workflows.
Complicated database management is a barrier to agility. By embracing the "Database as Code" paradigm with databases.do, you can streamline your operations, reduce manual effort, and gain unprecedented control over your data resources.
Ready to transform how you manage data? Install the .do SDK to take your first step toward simple, powerful, and scalable database management.