انتقل إلى المحتوى
شعار أوراباسي
aurabase

قاعدة البيانات

ما يقدمه منتج Database للمشروع، وكيف يصل إليه الكود الخاص بك، وإلى أين تتجه بعد ذلك: الخطوات الأولى والمفاهيم وأدلة المهام.

شرح4 د قراءةالمستوى مبتدئ

لقد تغير المصدر الإنجليزي منذ هذه الترجمة. قد تكون بعض المعلومات قديمة.
تمت ترجمة هذه الصفحة تلقائيًا. النسخة الإنجليزية موثوقة.

What you get#

Each project has its own PostgreSQL 18 database. Your tables live in one schema of that database, named after the project, and the platform keeps its own data (users, files, settings) in separate schemas that your code does not reach.

aura db raw "select current_setting('server_version_num')::int / 10000 as postgres_major"
  postgres_major
  ──────────────
  18

  ℹ 1 row(s).
  • Row level security by default. Every table created through Aurabase (SDK table API, aura db raw, migrations, the Studio) gets row level security enabled. Until you add a policy, the public key reads no row.
  • Plain PostgreSQL. Views, functions, triggers, indexes and policies are standard PostgreSQL objects. Thirteen extensions are installed when a project is created on the cluster of its organization, and pg_graphql is installed when you enable GraphQL.
  • Isolated by role. Each kind of caller reaches PostgreSQL as a different role: aura_anon for the public key, aura_authenticated for a signed-in user, a role that bypasses RLS for the service_role key. Policies read the user from auth.uid().
  • Branches. aura branch create copies a project, schema and rows, into a new project with its own URL and keys. It is a copy made at creation time, not a live replica.

Three ways in#

Browser, server   ──▶  SDK or REST  ──▶  gateway  ──▶  PostgREST of the project  ──▶  PostgreSQL
CLI, backend, CI  ──▶  aura db raw  ──▶  gateway  ──▶  aura-db (SQL check)       ──▶  PostgreSQL
psql, ORM, BI     ──▶  TLS :5432    ──▶  router   ──▶  pooler of the cluster      ──▶  PostgreSQL

The first path is the one your application uses. The second runs SQL with the service_role key, after a check that refuses a list of statements. The third is a plain PostgreSQL connection with a role of its own. How a request reaches Postgres follows each path step by step.

Start here#

Concepts#

Guides and reference#

In the Studio#

The Database section of a project opens the table editor of a PostgreSQL project, or the collections of a MongoDB project. Its pages:

/<project-id>/database                     opens the table editor (PostgreSQL) or the collections (MongoDB)
/<project-id>/database/sql/table-editor    browse and edit rows, create tables and columns
/<project-id>/database/sql/editor          SQL editor (the same endpoint as aura db raw)
/<project-id>/database/sql/schema          tables, views and functions of the project schema
/<project-id>/database/extensions          installed extensions
/<project-id>/database/backups             backups and restores

The direct connection card (host, role, password) is under Settings › Connection, and the API keys under Settings › API keys.

@aurabase/aurabase-js@0.7.5 · aura@0.3.4↗ الإبلاغ عن مشكلة