Data and users
Database
Every Project runs on its own PostgreSQL database. Work with it through the table editor, the SQL Console, generated REST APIs, realtime subscriptions, and the official SDKs.
Ways to work with your data
| Tool | Best for |
|---|---|
Tables | Designing tables, fields, relations, indexes, and access rules visually |
SQL Console | Reports, bulk changes, and anything easier to say in SQL |
REST API | Any language or platform |
JavaScript, Dart, and Go SDKs | Typed reads and writes, sign-in, files, and realtime |
Realtime | Live updates when records change |
Read and write from your app
const page = await rb.from("posts").list({
filter: rb.filter("status = {:s}", { s: "live" }),
sort: "-created",
});
const post = await rb.from("posts").create({ title: "Hello" });final page = await rb.from('posts').list(
filter: rb.filter('status = {:s}', {'s': 'live'}),
sort: '-created',
);
final post = await rb.from('posts').create({'title': 'Hello'});Realtime
Subscribe to a whole table or a single record. The same access rules that protect reads also decide who receives each change.
const stop = await rb.from("posts").subscribe("*", ({ action, record }) => {
console.log(action, record.id);
});
// later
await stop();Keep it healthy
- Add indexes for fields you filter or sort on often.
- Page through large results instead of loading everything at once.
- Take a backup before large or destructive changes.
- Protect every table with API rules and, for sensitive data, row-level security.
Found something wrong on this page?
Fix it yourself. The link below opens this file in GitHub's editor and forks the repository for you if you need one, and your change becomes a pull request without leaving the browser.