How to support unstructured data in Postgres with JSON columns

  Рет қаралды 4,209

Supabase

Supabase

Күн бұрын

JSON and JSONB type allows you to store unstructured data in Postgres. In this video, Tyler Shukert walks you through how to store and query JSON data from your Postgres database.
Learn how to manage unstructured data through JSON and JSONB columns: supabase.com/docs/guides/data...
Postgres is a relational database, but it also has support for JSON and JSONB-type columns, which allows developers to store unstructured data. Not only can they be flexible with the data to be stored, but there are many unique operators for querying JSON data flexibly. We take a deeper look into what the possibilities are with JSON columns on Postgres.
00:00 Intro
00:26 Querying a JSON value
00:50 Arrow notation to access the properties
01:57 Create a table with JSONB type column
02:54 JSONB-operator deep dive
03:19 ? filter for contains
03:42 ?& for array contains all
03:51 ?| for array contains any
03:57 JSON contains filter
04:49 Outro
💻 Videos to watch next:
▶ FASTEST way to host a Postgres database (2024):
• FASTEST way to host a ...
▶ Generate column values in Postgres with Functions, Triggers, default values and RLS
: • Generate column values...
▶ Create PostgreSQL Functions with Supabase: • Create PostgreSQL Func...
👇 Learn more about Supabase 👇
🕸 Website: supabase.com/
🏁 Get started: app.supabase.com/
📄 Docs: supabase.com/docs
🔔 Subscribe for more tutorials and feature updates from Supabase: / @supabase
📱 Connect with Us:
🐙 Github: www.github.com/supabase
💬 Discord: www.discord.supabase.com/
🐦 Twitter: / supabase
▶ Instagram (follow for memes): / supabasecom
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

Пікірлер: 21
@dshukertjr
@dshukertjr 16 күн бұрын
JSON columns in Postgres are so useful, but so are other data types. What is the next data type that you want us to go deep on? Let us know in the comment below 👇
@user-df1zf9ti2w
@user-df1zf9ti2w 13 күн бұрын
Clear explanation, appropriate examples, looking forward to an example explaining the use of JSONB in a chat session application.
@Jebusankel
@Jebusankel 13 күн бұрын
Where I think supabase really shines is using postgres json functions like json_agg() and row_to_json() to create nested structures.
@EnesKab
@EnesKab 16 күн бұрын
A great use case for JSON in the SQL database can be a column which stores set of settings for something like custom styles. Let's say you have 3 styles that your user can customize and you want to store them in the database. For example, custom background color, font-size and font-weight. You can create a JSON object to store all these settings without having to create columns for each in a new table and create a relationship between the user. Also, if you create a JSON object for your user's settings, you can manipulate it way easier, add new styles in the future even if they are 20 more and do not need to worry about the performance, and best of all 👉🏻 All is possible without creating a mess in your db.
@dshukertjr
@dshukertjr 16 күн бұрын
User preferences are a great use case for using JSONB columns!
@xberna8156
@xberna8156 15 күн бұрын
Nice explanation, thank you!
@dshukertjr
@dshukertjr 15 күн бұрын
Glad to hear you found it helpful!
@planetmall2
@planetmall2 16 күн бұрын
This was awesome!
@jaany
@jaany 16 күн бұрын
Great video!
@cariyaputta
@cariyaputta 15 күн бұрын
Thanks.
@vengateshm2122
@vengateshm2122 16 күн бұрын
Seems we can wrap no sql into sql world.
@Supabase
@Supabase 16 күн бұрын
Best of both ❤️
@jannickpedersen4620
@jannickpedersen4620 16 күн бұрын
NextJS14 + Supabase + ShadCN + TailwindCSS = The Big Guy
@nicolascalderon9366
@nicolascalderon9366 13 күн бұрын
How would performance impact the search and database writing when using jsonb vs regular columns?
@Supabase
@Supabase 6 күн бұрын
With proper indexes, the difference in speed of querying data from a joined table and jsonb column are negligible. Writing is the same, generally the performance difference should be negligible. You should choose whether to use JSONB or not depending on wha tthe data could look like. If you want to be a bit more flexible with the schema of the data, you can choose to use JSONB.
@jonathangamble
@jonathangamble 16 күн бұрын
can you fo joins?
@dshukertjr
@dshukertjr 16 күн бұрын
Yes, you can join a table with another table using JSON values too!
@emmanuelchucks
@emmanuelchucks 16 күн бұрын
Is it just me or does the voice sound AI generated?
@dshukertjr
@dshukertjr 16 күн бұрын
I swear nothing was AI generated 😂 Maybe the bad sound quality at the intro and outro are making you feel that way. I will try to improve it on the next recording!
@indiechatofficial
@indiechatofficial 15 күн бұрын
@@dshukertjr The sound quality is really good. I think he just means your voice is so peaceful and well-measured that it seems as if an A.I. super intelligence is responsible for it.
@tylershukert3621
@tylershukert3621 14 күн бұрын
@@indiechatofficial That is so sweet of you!
I earn $1,753/day with this SIMPLE tech stack
6:59
Marc Lou
Рет қаралды 285 М.
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Рет қаралды 7 МЛН
McDonald’s MCNUGGET PURSE?! #shorts
00:11
Lauren Godwin
Рет қаралды 35 МЛН
PostgresOpen 2019 JSONB Tricks
47:42
Postgres Open
Рет қаралды 14 М.
Monitor Database Queries in Next.js Apps with Sentry
19:53
Supabase
Рет қаралды 2 М.
Google IO 2024 Full Breakdown: Google is RELEVANT Again!
27:35
Matthew Berman
Рет қаралды 35 М.
JSON and SQL Tutorial - Convert a table to JSON and JSON to table
13:36
Are we going back to PHP with fullstack JavaScript?
9:57
Maximilian Schwarzmüller
Рет қаралды 73 М.
10 new Supabase features you need to start using
4:12
Supabase
Рет қаралды 8 М.
На iPhone можно фоткать даже ночью😳
0:30
GStore Mobile
Рет қаралды 1,2 МЛН
Вы поможете украсть ваш iPhone
0:56
Romancev768
Рет қаралды 533 М.
Главная проблема iPad Pro M4 OLED!
13:04
THE ROCO
Рет қаралды 49 М.
Радиоприемник из фольги, стаканчика и светодиода с батарейкой?
1:00
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 1,6 МЛН