TutorialesTutorials · PrincipianteBeginner

Cómo crear una base de datos con SupabaseHow to create a database with Supabase

Aprende a crear una base de datos con Supabase desde cero: crea tu cuenta, tu primera tabla, guarda datos y conéctala a tu proyecto. Guía para principiantes, paso a paso.Learn to create a database with Supabase from scratch: make your account, your first table, store data and connect it to your project. A beginner step-by-step guide.

  • Supabase

En esta guía vas a aprender a crear una base de datos con Supabase desde cero: una base de datos es donde tu app o tu web guarda su información (usuarios, productos, mensajes) de forma ordenada y segura. Supabase te da una gratis, lista en minutos y sin instalar nada.

Toca cada paso para abrirlo y seguirlo a tu ritmo. No necesitas saber programar para los primeros pasos.

In this guide you’ll learn to create a database with Supabase from scratch: a database is where your app or website stores its information (users, products, messages) in an organized and secure way. Supabase gives you one for free, ready in minutes and with nothing to install.

Tap each step to open it and follow at your own pace. You don’t need to know how to code for the first steps.

Antes de empezar: Supabase tiene un plan gratis generoso, perfecto para aprender. Solo necesitas un correo. Mira los límites en la columna de la derecha.Before you start: Supabase has a generous free plan, perfect for learning. You only need an email. See the limits in the right column.

1 Crear tu cuenta en SupabaseCreate your Supabase account
  1. Entra a https://supabase.com y aprieta Start your project.
  2. Inicia sesión con tu cuenta de GitHub o con tu correo.
  3. Acepta los permisos y ya estás dentro del panel de Supabase.

Si no tienes cuenta de GitHub, puedes aprender a crearla en nuestro tutorial de GitHub para principiantes.

  1. Go to https://supabase.com and click Start your project.
  2. Sign in with your GitHub account or with your email.
  3. Accept the permissions and you’re inside the Supabase dashboard.

If you don’t have a GitHub account, you can learn to create one in our GitHub for beginners tutorial.

2 Crear tu primer proyectoCreate your first project

Un “proyecto” en Supabase es tu base de datos más sus herramientas alrededor.

  1. Aprieta New project.
  2. Ponle un nombre (ej. mi-primera-base).
  3. Crea una contraseña para la base de datos y guárdala bien (la vas a necesitar después).
  4. Elige la región más cercana a ti o a tus usuarios (eso hace tu app más rápida).
  5. Deja el plan Free y aprieta Create new project.

Espera uno o dos minutos mientras Supabase prepara todo. Cuando termine, verás tu panel listo.

A “project” in Supabase is your database plus the tools around it.

  1. Click New project.
  2. Give it a name (e.g. my-first-database).
  3. Create a password for the database and save it somewhere safe (you’ll need it later).
  4. Pick the region closest to you or your users (that makes your app faster).
  5. Leave the Free plan and click Create new project.

Wait a minute or two while Supabase sets everything up. When it’s done, you’ll see your dashboard ready.

3 Crear tu primera tablaCreate your first table

Una tabla es como una hoja de cálculo: filas y columnas. Vamos a crear una para guardar, por ejemplo, una lista de tareas.

  1. En el menú de la izquierda, abre el Table Editor (editor de tablas).
  2. Aprieta New table y ponle un nombre (ej. tareas).
  3. Deja activada la opción Enable Row Level Security (seguridad por filas); es lo recomendado.
  4. Agrega tus columnas. Cada columna es un dato. Por ejemplo:
ColumnaTipoPara qué
titulotextEl nombre de la tarea
completadaboolSi ya está hecha (sí/no)
  1. Aprieta Save. ¡Ya tienes tu primera tabla!

Supabase agrega solo una columna id y una created_at (fecha de creación). No las borres, te sirven.

A table is like a spreadsheet: rows and columns. Let’s create one to store, for example, a to-do list.

  1. In the left menu, open the Table Editor.
  2. Click New table and give it a name (e.g. tasks).
  3. Leave Enable Row Level Security turned on; it’s the recommended setup.
  4. Add your columns. Each column is a piece of data. For example:
ColumnTypeWhat for
titletextThe task’s name
doneboolWhether it’s finished (yes/no)
  1. Click Save. You now have your first table!

Supabase adds an id column and a created_at (creation date) on its own. Don’t delete them, they’re useful.

4 Guardar y ver datosStore and view data
  1. Con tu tabla abierta en el Table Editor, aprieta Insert y luego Insert row.
  2. Escribe un título (ej. “Aprender Supabase”) y deja completada en falso.
  3. Aprieta Save.

¡Esa es tu primera fila de datos! Puedes agregar más, editarlas o borrarlas con un clic, igual que en una hoja de cálculo. La diferencia es que ahora viven en internet y tu app las puede leer.

  1. With your table open in the Table Editor, click Insert and then Insert row.
  2. Type a title (e.g. “Learn Supabase”) and leave done as false.
  3. Click Save.

That’s your first row of data! You can add more, edit them or delete them with a click, just like a spreadsheet. The difference is they now live on the internet and your app can read them.

5 Conectar la base de datos a tu proyectoConnect the database to your project

Para que tu app hable con la base de datos, necesitas dos datos que Supabase te da:

  1. En el menú, ve a Project Settings (ajustes) y luego a API.
  2. Copia la Project URL y la anon public key (clave pública).
  3. Esas dos las usas en tu app para conectarte. Nunca compartas la clave secreta (service_role) en público.

¿No sabes escribir el código de conexión? No hay problema: dile a una IA como Claude “conéctame esta base de datos de Supabase a mi proyecto” y pégale la URL y la clave pública. En nuestro tutorial de cómo crear una aplicación con IA lo usamos paso a paso.

For your app to talk to the database, you need two pieces of data that Supabase gives you:

  1. In the menu, go to Project Settings and then API.
  2. Copy the Project URL and the anon public key.
  3. You use those two in your app to connect. Never share the secret key (service_role) in public.

Not sure how to write the connection code? No problem: tell an AI like Claude “connect this Supabase database to my project” and paste the URL and the public key. In our how to build an app with AI tutorial we use it step by step.

Si algo sale malIf something goes wrong
ProblemaSolución
Mi proyecto aparece “pausado”En el plan gratis se pausa tras 1 semana sin uso; entra y aprieta “Restore”
No veo mis datosConfirma que estás en la tabla correcta dentro del Table Editor
Mi app no se conectaRevisa que copiaste bien la Project URL y la anon public key
Olvidé la contraseña de la base de datosLa puedes reiniciar en Project Settings → Database
ProblemFix
My project shows as “paused”On the free plan it pauses after 1 week of inactivity; open it and click “Restore”
I don’t see my dataConfirm you’re on the right table inside the Table Editor
My app won’t connectCheck that you copied the Project URL and the anon public key correctly
I forgot the database passwordYou can reset it in Project Settings → Database

Preguntas frecuentesFrequently asked questions

¿Supabase es gratis?Is Supabase free?

Sí, tiene un plan gratis para siempre con 2 proyectos activos, 500 MB de base de datos y 50,000 usuarios al mes. Es ideal para aprender y proyectos pequeños. Para producción, el plan Pro cuesta $25/mes.

Yes, it has a free forever plan with 2 active projects, 500 MB of database and 50,000 monthly users. It's ideal for learning and small projects. For production, the Pro plan costs $25/mo.

¿Necesito saber programar para usar Supabase?Do I need to know how to code to use Supabase?

No para empezar. Puedes crear tablas y guardar datos desde el panel visual, sin escribir código. Cuando conectes la base de datos a una app sí ayuda saber lo básico, pero una IA como Claude te puede escribir ese código.

Not to start. You can create tables and store data from the visual dashboard, without writing code. When you connect the database to an app it helps to know the basics, but an AI like Claude can write that code for you.

¿Qué es una base de datos, en simple?What is a database, in simple terms?

Es como una hoja de cálculo muy ordenada y poderosa que vive en internet. Guarda la información de tu app (usuarios, productos, mensajes) en tablas con filas y columnas, lista para que tu sitio la lea y la guarde.

It's like a very organized and powerful spreadsheet that lives on the internet. It stores your app's information (users, products, messages) in tables with rows and columns, ready for your site to read and save it.

¿Mis datos están seguros en Supabase?Is my data safe on Supabase?

Supabase usa PostgreSQL, una base de datos estándar de la industria, con seguridad por filas (Row Level Security) para controlar quién ve qué. Aun así, no subas datos sensibles sin configurar esas reglas y confirma siempre las políticas de privacidad.

Supabase uses PostgreSQL, an industry-standard database, with Row Level Security to control who sees what. Even so, don't upload sensitive data without setting those rules and always confirm the privacy policies.