How to store and query JSON data in Postgres

Опубликовано: 08 Октябрь 2024
на канале: Supabase
10,476
395

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: https://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 Postgres databa...  
▶ Generate column values in Postgres with Functions, Triggers, default values and RLS
:    • Generate column values in Postgres wi...  
▶ Create PostgreSQL Functions with Supabase:    • Create PostgreSQL Functions with Supa...  

👇 Learn more about Supabase 👇

🕸 Website: https://supabase.com/
🏁 Get started: https://app.supabase.com/
📄 Docs: https://supabase.com/docs

🔔 Subscribe for more tutorials and feature updates from Supabase:    / @supabase  

📱 Connect with Us:
🐙 Github: https://www.github.com/supabase
💬 Discord: https://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