One to Many Relationship - SupabaseTips

preview_player
Показать описание
Relational databases are built for having data that are related to each other. There are various types of relationships, there is one to one, one to many, and many to many. In this video, we will discuss how to create a one to many relationship inside of the Supabase Dashboard.

In this tutorial, we'll show you how to set up a one-to-many relationship between tables in your Supabase project using the Supabase Dashboard. Learn how to quickly manage your database schema with our practical example featuring a fictional musical artist and their albums.

What you'll learn:
✅ How to navigate the Supabase Dashboard.
✅ Creating tables in Supabase.
✅ Setting up a one-to-many relationship.
✅ Adding data to tables and linking them via relationships in the Supabase dashboard.

After watching this video, you'll be able to:
✅ Model relational data structures within Supabase.
✅ Understand the utility of the Table Editor in Supabase.
✅ Manage and visualize relational data effectively.

💻 Videos to watch next:

👇 Learn more about Supabase 👇

📱 Connect with Us:

ABOUT SUPABASE:
Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.

Build in a weekend, scale to millions.

#Supabase #AppDevelopment #RealtimeApps #DeveloperTools
Рекомендации по теме
Комментарии
Автор

that's supa"bass" voice

pradeepmax
Автор

How about "author" relationship to multiple image stored? (bucket storage not table).

togugram
Автор

I think you forgot to enable "Define as Array" via the button option (left to delete column)
otherwise I don't see any difference between this course and the one to one relationship course

bkan
Автор

I dont know if it is really working, cause I can't many albums to my artist

WebintiNoCode
Автор

how to get relation model's infomation using id?

김선명-rb
Автор

Do we need copy the artist's id manualy to the colum artist_id of the album?

SeaRich
Автор

What did he use to show the ER diagram? I want that.

mdlallemont
Автор

@supabase how can we create a one-to-one relationship?

kristoffergonzaga
Автор

Hello there, thanks for the video.
It may sounds like a very beginner question (which I am on Supabase) but is it possible to make a relation based on 2 Text columns ? Looks like it's not working, when I try to I receive this message of error : " there is no unique constraint matching given keys for referenced table .."

pierre-louismoutton-perrot
Автор

I'm new to supabase, and I'm creating a very simplified Facebook clone to learn the main features. I'm trying to link comments to a post, so I created a comments table (with columns: id, profile, text) and then a posts table (with columns: id, text, created_by, comment_ids).
I linked the comment_ids column, as in the video, to the comments.id table, but it allows me to add only one comment to each post, while I would like to link multiple comments to a single post.

Is it possible to link multiple rows of a table to a single row of another table?

Thanks for those who answer me

lorenzocadente
Автор

We do not.need to write backend anymore

developerGorilla
Автор

how to do it then on frontend?

as if we fetch a "artist" we dont get the albums data ?

const { data, error } = await supabase
.from("songs")
.select("*")
.order("created_at", { ascending: false });

then

data [
{
id: 1,
created_at: '2023-06-09T08:29:49.437118+00:00',
title: 'Board One',
user_id:
}
]

somerandomchannel