Skip to content

Join the Seedly owners community →

Databases

Supabase Basics

What a database is, what Supabase adds, and why real-time matters

Written by 5 min read1 activity
Sprout, your presenter

Sprout presents

Supabase is PostgreSQL plus extras, most notably real-time updates that reach the screen the moment data changes. I find that genuinely exciting.Supabase is PostgreSQL plus extras, most notably real-time updates that reach the screen the moment data changes. I find that genuinely exciting.

Sprout rings a brass bell as a note drops into a wooden mailbox and its flag pops up
Supabase tells your app the moment data changes

Every app needs somewhere to keep its stuff. User profiles, posts, orders, messages... all of it has to live somewhere. That's the job of a database, and Supabase makes databases a whole lot less scary.

What Is a Database?#

Think of a database as a super-organized collection of information. It's kinda like a spreadsheet, just WAY more powerful.

Here's what some user data might look like in a database.

idnameemailjoined_date
1Sarah[email protected]2024-01-15
2Mike[email protected]2024-01-20
3Emma[email protected]2024-02-01

Your app can do four things with it.

  • Read this data (show Sarah's profile)
  • Write new data (add a new user)
  • Update existing data (change Mike's email)
  • Delete data (remove Emma's account)

Those four moves are called CRUD, short for Create, Read, Update, Delete.

What Is Supabase?#

Sprout carries a wooden crate topped with a bell, a brass key and a file tray
Supabase is PostgreSQL plus an API, auth and storage

Supabase is a service that gives you a database plus a bunch of extra features. It's built on top of PostgreSQL, a popular and reliable database system.

Where it gets fun is all the stuff Supabase piles on top to make your life easier.

Step 1. Instant Database#

Spin up a database in seconds. There's no server setup. Click a few buttons and you've got a working database.

Step 2. Easy API#

Supabase automatically creates an API for your data. You can read and write data from your app without writing complicated database code.

Step 3. Real-time Updates#

When data changes, Supabase can tell your app instantly. Perfect for chat apps, live feeds or collaborative tools.

Step 4. Authentication Built In#

Supabase comes with its own authentication system. You could use it instead of Clerk if you'd rather.

Step 5. File Storage#

Store images and files right alongside your database data.

Real-time: The Special Sauce#

The real-time feature is what makes Supabase stand out. Let me show you why it's such a big deal.

Without Real-time#

Picture a chat app. Somebody sends a message, and here's what happens.

  1. Their message gets saved to the database
  2. Your screen doesn't change at all
  3. You have to refresh the page to see new messages
  4. Or the app checks every few seconds for new ones (which is pretty wasteful)

With Real-time#

Now here's the same thing with Supabase real-time.

  1. Somebody sends a message
  2. The message gets saved to the database
  3. Supabase instantly tells your app "hey, there's a new message!"
  4. Your screen updates right away

You never refresh, and your app never sits there checking over and over. It just works (I know, I know, everybody says that... but this time it's true).

This lesson ends with a short activity.