Skip to content

From Zero to Database in 5 Minutes

I timed myself this morning. From opening my browser to running my first query against TerraScale took 4 minutes and 37 seconds. Here’s the exact steps, nothing skipped.

Headed to dashboard.terrascale.io and clicked “Get Started.” Entered my email, created a password, verified my email (the link arrived in about 10 seconds).

Pro tip: if you’re impatient like me, use Google sign-in. Saves about 30 seconds.

After signing in, there’s a big “Create Database” button. Hard to miss.

I called mine blog-demo and picked us-east-1 as the region. The database was ready in about 8 seconds - I actually refreshed the page thinking something was stuck, but nope, it was just that fast.

Clicked on “API Keys” in the sidebar, then “Create API Key.” Named it “local-dev” and gave it full database access.

Important: The key only shows once. I copied it to my .env file immediately. If you forget, you’ll need to create a new one.

Minute 3-4: Install the SDK and Write Code

Section titled “Minute 3-4: Install the SDK and Write Code”

Opened my terminal and ran:

Terminal window
dotnet add package TerraScale.Client

Then wrote the simplest possible test:

using TerraScale;
var client = new TerraScaleDatabase(new TerraScaleDatabaseOptions
{
ApiKey = Environment.GetEnvironmentVariable("TERRASCALE_API_KEY"),
DatabaseId = "blog-demo"
});
// Write something
await client.PutItemAsync("user#123", "profile", new Dictionary<string, object>
{
["name"] = "Mario",
["email"] = "mariogk@terrascale.tech"
});
// Read it back
var result = await client.GetItemAsync("user#123", "profile");
Console.WriteLine(result.Value.GetAttribute<string>("name")); // Mario
Terminal window
dotnet run

Output: Mario

That’s it. No connection strings to configure, no ports to remember, no local database to spin up. Just an API key and a database ID.

Under the hood, a lot happened:

  1. My request hit TerraScale’s edge network
  2. Got routed to the us-east-1 region where my database lives
  3. The item got written to multiple availability zones for durability
  4. The response came back in about 12ms (I checked)

But I didn’t have to think about any of that. I just wrote code.

If you want to go deeper, here’s what I’d suggest:

  1. Try the Query Explorer in the dashboard - you can run queries without writing code
  2. Set up the Repository pattern for typed entities - way cleaner than raw dictionaries
  3. Add a second region and watch your data replicate automatically

The Getting Started guide goes into more detail on each of these. But honestly, just start building something. You’ll figure it out as you go.

The best part? That database I created is on the free tier. I’m not paying anything until I exceed 100MB of storage or 10,000 requests per month. For a side project or prototype, that’s plenty.

Happy building!