A real SQL database for every space
Each table is a SQLite table on a Durable Object, with indexes, constraints and relations, read and written by pages, services, the REST API and AI.
Why Think Store?
Think Store gives every space its own SQLite database. A Database you create in a space is a real table with typed columns, not JSON rows in a shared table, so filters and sorts use indexes and constraints are enforced by the database itself.
People open the same table as a grid, a board or a chart in OpenThink. Your HTML pages, Think Service routes, the REST API and MCP read and write the same rows, and Think Authz decides which rows each caller sees.
Benefits
Number columns are REAL, checkboxes are INTEGER, dates are ISO text. SQL works the way you expect.
Required, unique and default columns, and relations that restrict, clear or cascade, checked inside one transaction.
A new Database is visible only to the owner and editors until you add a Table Policy.
Features
Indexes
Turn on indexing for a column. Columns used to filter, sort or group in any view are indexed too, up to 16 per table.
Column constraints
Required columns reject empty cells, unique columns reject duplicates, default values fill new rows.
Relations between tables
Link rows to another Database in the same space, one or many. On delete: restrict, set empty, or cascade.
SQL from everywhere
think.executeSql in HTML pages, store.sql in Think Service, /api/v1/sql over REST, query_tables over MCP.
Nightly backup
Every Database is exported to separate storage every night, and a single table can be restored.
Person columns
Cells hold OpenThink user ids, so a policy like me in row.Assignee works without storing emails.
Pricing
Think Store is part of every OpenThink plan, not billed on its own. On Free it runs within the limits below; on Team it draws from the monthly usage credit, and your admin sets the spending cap.
See OpenThink Cloud pricingLimits
| Storage | One SQLite database per space, on a Durable Object |
|---|---|
| Indexes | Up to 16 per table |
| Cascading deletes | Up to 8 levels deep |
| Relations | Between Databases of the same space |
| Backup | Every night, restore per table |
Getting started
- 01
Create a Database
In a space, choose New → Database. Add columns and pick their types.
- 02
Add a policy
Decide who reads and writes each row with a Table Policy (Think Authz).
- 03
Read and write
Use SQL from an HTML page, a Think Service route, the REST API with a thk_ key, or MCP.
// Think Service route: the same SQLite core as think.executeSql
const open = await store.sql(
'SELECT "Name", "Due" FROM "Tasks" WHERE "Status" != ? ORDER BY "Due"',
["Done"],
);Frequently asked questions
Is it Postgres?
No. Each space has its own SQLite database on a Cloudflare Durable Object. SQL is SQLite's dialect.
What is the difference between a Table and a Database?
A Table keeps rows as JSON in OpenThink's shared database. A Database is a real SQL table in Think Store, with indexes, constraints and relations.
Can my users read a Database directly?
Only through a Table Policy. Databases are closed by default: viewers, commenters and link visitors see nothing until a policy lets them.
Can AI create relation columns?
Not yet. MCP can read and write rows and set policies; relation columns are created in the web app.
Explore other managed services
Think Authz
One permission service for pages, folders, spaces and row policies on every table.
RealtimeThink Collab
Realtime co-editing, presence and change events for every page in a space.
ComputeThink Service
Serverless routes, cron schedules and table triggers, served at their own URL.
Start building on OpenThink Cloud
Create a free account. Your first space is ready when you land.