Database Management
Manage your TerraScale databases through the web dashboard with an intuitive visual interface.
Creating a Database
Section titled “Creating a Database”Step 1: Open Create Dialog
Section titled “Step 1: Open Create Dialog”Click “Create Database” from the dashboard home page or navigate to Databases and click the create button.
Step 2: Configure Database
Section titled “Step 2: Configure Database”Enter your database configuration:
| Field | Description | Requirements |
|---|---|---|
| Database Name | Unique identifier | Lowercase letters, numbers, hyphens only |
| Region | Geographic location | Select from dropdown |
| Automatic Backups | Daily backup schedule | Optional, configurable retention |
| Deletion Protection | Prevent accidental deletion | Optional, recommended for production |
Step 3: Create
Section titled “Step 3: Create”Click “Create Database” to provision your database. It will be ready within seconds and appear with “Active” status.
Database List
Section titled “Database List”The Databases page shows all your databases with:
| Column | Description |
|---|---|
| Name | Database identifier (click to open details) |
| Region | Geographic location |
| Status | Active, Creating, or Deleting |
| Created | Creation timestamp |
| Items | Total item count |
| Storage | Storage used |
Filtering and Search
Section titled “Filtering and Search”- Use the search box to filter by database name
- Sort by any column by clicking the header
- Filter by region or status
Database Details
Section titled “Database Details”Click on any database to view its detail page with three tabs:
Overview metrics for your database:
- Item Count: Total number of items stored
- Storage Used: Current storage consumption
- Read Units: Read capacity consumed
- Write Units: Write capacity consumed
- Recent Activity: Graph of operations over time
Built-in query editor for running queries directly in your browser:
- Write queries in the editor
- Click “Execute” or press
Ctrl+Enter - View results in the JSON viewer
Features:
- Syntax highlighting
- Format query button (
Ctrl+Shift+F) - Error highlighting with line numbers
- JSON result viewer with expand/collapse
- Query history
Configuration options for your database:
- Automatic Backups: Enable/disable daily backups
- Backup Retention: Set retention period (7-30 days)
- Deletion Protection: Toggle protection on/off
- Database Info: View endpoint, region, and creation date
- Danger Zone: Delete database option
Query Explorer
Section titled “Query Explorer”The built-in Query Explorer allows you to run queries directly in your browser:
Running a Query
Section titled “Running a Query”- Navigate to your database’s Explorer tab
- Write your query in the editor
- Click “Execute” or press
Ctrl+Enter - View results in the JSON viewer below
Example Queries
Section titled “Example Queries”// Get a single item{ "operation": "GetItem", "pk": "user#123", "sk": "profile"}// Query items by partition key{ "operation": "Query", "pk": "user#123", "skCondition": { "operator": "begins_with", "value": "order#" }}Query Editor Features
Section titled “Query Editor Features”| Feature | Description |
|---|---|
| Syntax Highlighting | JSON syntax colors for readability |
| Auto-formatting | Format JSON with Ctrl+Shift+F |
| Error Indicators | Red underlines for syntax errors |
| Line Numbers | Easy reference for debugging |
| Query History | Access recent queries from dropdown |
Database Settings
Section titled “Database Settings”Automatic Backups
Section titled “Automatic Backups”Enable daily automated backups:
- Navigate to database Settings tab
- Toggle Automatic Backups on
- Set Retention Period (7, 14, or 30 days)
- Click Save
Backups run daily and can be restored by contacting support.
Deletion Protection
Section titled “Deletion Protection”Prevent accidental database deletion:
- Navigate to database Settings tab
- Toggle Deletion Protection on
- Click Save
When enabled, the delete button is disabled. You must first disable protection to delete the database.
Deleting a Database
Section titled “Deleting a Database”To delete a database:
- Navigate to the database’s Settings tab
- Ensure Deletion Protection is disabled
- Scroll to Danger Zone
- Click “Delete Database”
- Type the database name to confirm
- Click “Delete”
Deletion is permanent and cannot be undone.
Best Practices
Section titled “Best Practices”Production Databases
Section titled “Production Databases”- Enable Deletion Protection for all production databases
- Enable Automatic Backups with 30-day retention
- Use descriptive names like
prod-usersorstaging-orders
Development Databases
Section titled “Development Databases”- Use naming conventions like
dev-*ortest-* - Consider shorter backup retention to save storage
- Clean up unused databases regularly
Naming Conventions
Section titled “Naming Conventions”| Environment | Pattern | Example |
|---|---|---|
| Production | prod-{service} | prod-users |
| Staging | staging-{service} | staging-orders |
| Development | dev-{service} | dev-inventory |
| Testing | test-{feature} | test-auth-flow |
Next Steps
Section titled “Next Steps”- API Key Management - Create API keys for your databases
- Query Operations - Learn query syntax
- C# SDK Guide - Connect from your application