What is the Supabase database? Postgres, connection URL, backups, reset and security

What the Supabase database is and which database it uses, whether it is a backend, how it works, the connection URL, backups and exports, resets and security.

Walking a room through the products he has shipped
Walking a room through the products he has shipped

Key takeaways

  • Supabase's database is a full PostgreSQL database, managed for you, with auto-generated APIs.
  • Supabase is a backend platform built around that database, adding auth, storage, realtime and functions.
  • Find the connection string through the dashboard's Connect option; use the pooler for serverless apps.
  • Back up with Supabase's managed backups and your own pg_dump or CLI dumps; exports are standard Postgres.
  • Data is encrypted at rest and in transit, but security depends on Row Level Security and key handling.

The Supabase database is a full PostgreSQL database that Supabase hosts and manages for you, with auto-generated REST and GraphQL APIs, a dashboard, extensions such as pgvector, and built-in backups. Supabase wraps it with authentication, file storage, realtime updates and edge functions, making it a complete backend. PostgreSQL is central to my stack for products like FaceVision's embedding store, so this page covers what Supabase's database is, how it works, connection URLs, backups and exports, resets and security.

What is the Supabase database?

Every Supabase project includes a dedicated PostgreSQL database. You can create tables with the dashboard's table editor or SQL, and Supabase instantly exposes them through APIs your front end can call with client libraries.

Also asked as: what is supabase database · how to backup supabase database

Because it is real Postgres, you get SQL, joins, transactions, views, functions, triggers and extensions, including pgvector for embeddings and PostGIS for location data. Supabase adds conveniences: a visual editor, SQL editor, database migrations through its CLI, connection pooling, logs and performance advisors. It is used for SaaS apps, mobile back ends, internal tools and AI applications that need structured data and vectors together.

Which database does Supabase use?

Supabase uses PostgreSQL, the open-source relational database. It is not a custom database; your data lives in standard Postgres, so any Postgres tool, driver or ORM can connect to it.

Also asked as: which database supabase use

This is a key difference from Firebase, which uses NoSQL document databases. Using Postgres means your data model is relational, with tables, foreign keys and SQL queries, and your data is portable: you can export it with standard tools and move it to any Postgres host. Supabase keeps its Postgres versions reasonably current and supports a wide range of extensions, which you enable from the dashboard.

Is Supabase a database or a backend?

Both. At its core is a Postgres database, and around it Supabase provides backend services: authentication, file storage, realtime subscriptions, edge functions and auto-generated APIs, so many apps need no separate server.

Also asked as: is supabase a database or backend

Developers often describe Supabase as a backend-as-a-service or an open-source Firebase alternative. You can use just the database, connecting from your own server like any Postgres host, or use the full platform from front-end code with Row Level Security protecting data. For complex business logic, many teams pair Supabase with their own API, such as a FastAPI service, using Supabase for data, auth and storage.

Is Supabase a relational database?

Yes. Supabase's database is PostgreSQL, a relational database, so data lives in tables with columns and types, related through keys, and queried with SQL. It also supports JSON columns for flexible, document-style data when needed.

Also asked as: is supabase relational database

Relational structure suits most applications: users, orders, posts and comments relate naturally through foreign keys, and constraints keep data consistent. Postgres's JSONB type lets you store semi-structured data, such as settings or metadata, without giving up relational features. Design your schema thoughtfully, with indexes on columns you filter by, because a well-designed relational schema scales far better than one that stores everything as JSON.

How does the Supabase database work?

Your app talks to Postgres either through Supabase's auto-generated APIs, using client libraries with a project key and user session, or directly with a Postgres connection string from servers. Row Level Security policies decide what each user can access.

Also asked as: how does supabase database work

When a logged-in user queries through the API, Supabase passes their identity to Postgres, and policies such as "users can read only their own rows" are enforced inside the database. Realtime streams changes to subscribed clients. Database functions can be called as remote procedures, and triggers can run logic on inserts or updates. Migrations, managed with the Supabase CLI, version your schema changes like code.

How do I get the Supabase database URL?

Open your project in the Supabase dashboard and click Connect, or look under the project's database settings, to find connection strings for direct connections and for the connection pooler. Replace the password placeholder with your database password.

Also asked as: how to get supabase database url

Which string to use:

  • Direct connection: for long-running servers and migrations.
  • Pooler in transaction mode: for serverless functions and many short connections.
  • Pooler in session mode: for clients that need session features over IPv4.

The project URL and API keys used by client libraries are different from the database connection string; find them in the API settings. Keep the database password and service keys in environment variables, never in front-end code or public repositories.

How do I back up a Supabase database?

Supabase runs automatic daily backups on paid plans, with point-in-time recovery available as an add-on. For your own copies, use the Supabase CLI's supabase db dump or standard pg_dump with your connection string, and store dumps securely off-platform.

A practical routine:

  • Rely on managed backups for quick restores.
  • Schedule your own dumps, for example nightly through a CI job.
  • Back up files in storage separately; database dumps do not include them.
  • Test restoring a backup into a new project occasionally.
  • Encrypt and restrict access to backup files.

Free plan projects have limited backup options, so take your own dumps if your data matters.

Can I export a Supabase database?

Yes. Because it is PostgreSQL, you can export the whole database with pg_dump or the Supabase CLI, export individual tables as CSV from the dashboard's table editor, or copy data with any Postgres-compatible tool.

Also asked as: can i export supabase database

Exports include schema, data, functions and policies when using full dumps; choose schema-only or data-only options as needed. To migrate elsewhere, restore the dump into another Postgres server, then reconfigure auth and storage, which are separate services. Supabase's documentation includes migration guides to and from other platforms. This portability is a major advantage over proprietary databases that lock data into one vendor.

How do I reset a Supabase database?

For local development, run supabase db reset, which recreates your local database and reapplies all migrations and seed data. For a hosted project, there is no single button to wipe data; drop and recreate schemas or tables carefully, restore a backup, or create a fresh project.

Also asked as: how to reset supabase database

Before any reset of a hosted project, take a backup, because deletions are permanent. If you only need a clean database password, use the dashboard option to reset the database password, which does not touch data. Managing schema through migrations makes resets safe and repeatable: your database can always be rebuilt from versioned files.

Is the Supabase database secure?

Supabase encrypts data at rest and in transit, runs on major cloud infrastructure, and offers compliance options for organisations. Real-world security, though, depends mostly on configuration: Row Level Security, key handling and access policies you set.

Also asked as: is supabase database secure

Essential practices:

  • Enable Row Level Security on every table exposed to clients, with tested policies.
  • Never expose the service role or secret key in front-end code.
  • Use strong database passwords and restrict network access where possible.
  • Review the dashboard's security and performance advisors.
  • Keep auth settings strict, such as email confirmation and rate limits.

Most Supabase data leaks come from tables without RLS, not from platform breaches.

Sources

  1. Supabase Docs, Database overviewsupabase.com
  2. Supabase Docs, Connecting to Postgressupabase.com
  3. Supabase Docs, Database backupssupabase.com
  4. Supabase CLI Reference, supabase db resetsupabase.com
  5. Supabase Docs, Row Level Securitysupabase.com
  6. Supabase, Securitysupabase.com
Pranjul Rathour
Pranjul Rathour
GenAI Engineer · India

GenAI engineer and AI product builder with 2+ years shipping production-grade AI systems: RAG pipelines, fine-tuned LLMs, hybrid retrieval and multi-modal apps across vision, speech and OCR, architected end to end from ingestion to deployment. Leads engineering for SCULT INDIA's 14-member team, founded the 500+ member TechVerse Enclave community and has mentored 200+ students. Three hackathon first prizes: Changethon 2025 (IIT Roorkee), Product Genesis at Vividhotsava 2025 (CSJMU) and BYTEBATTLE (MeetKats).

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way. Email pranjulrathour41@gmail.com.

Keep reading

More on Shipping AI apps

All Shipping AI apps guides →
Campus talks · hackathon judging · mentoring

Want this as a live session at your college?

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way.

Pranjul Rathour, GenAI engineer in India