From the course: Advanced SQL for Data Scientists
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
JSON for semi-structured data
From the course: Advanced SQL for Data Scientists
JSON for semi-structured data
- [Instructor] Now PostgreSQL provides data types for supporting JSON, which is ideal for semi-structured data. So with PostgreSQL, we have options to use both relational and NoSQL type features. Now JSON is particularly good at modeling document databases. Now, document databases are used when a use case demands a flexible schema, nested structures, and the ability to query an index keys throughout the structure. Since PostgreSQL 9.2, we can have both relational and document structures in a single database. So here's an example of a document structure. Let's imagine we have a table called Customer Summary and we have the name of a customer, their address, and then some information about purchase history. Well, each of those could itself be a complex structure. So for example, name could be a pair, first name and last name. Address could be made up of a street, city, province, postal code. And finally, the purchase…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Federated queries4m 13s
-
(Locked)
Bloom filters4m 38s
-
(Locked)
Hstore for key-value pairs6m 23s
-
(Locked)
JSON for semi-structured data8m 34s
-
(Locked)
Hierarchical data and ltrees11m 59s
-
(Locked)
Challenge: Design a table to support unstructured data33s
-
(Locked)
Solution: Design a table to support unstructured data58s
-
(Locked)
-