From the course: Advanced SQL for Data Scientists

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Design a table to support unstructured data

Solution: Design a table to support unstructured data

From the course: Advanced SQL for Data Scientists

Start my 1-month free trial

Solution: Design a table to support unstructured data

(upbeat music) - [Instructor] Now, in this solution, we need to consider a number of factors. Clearly we're working with semi-structured data and we need indexes to support query performance. Now, we could use a column for each attribute, but that's really not practical, particularly in a relational database. Now, that's not the case with another type of database, in particular the type of NoSQL database known as a wide-column database. Now, Apache Cassandra, Query Google Bigtable are both examples of wide-column tables, where having a column for each attribute is an appropriate way to design it. But when you're working with Postgres or other relational tables, that's really not a good option. A better option is to use a JSONB column, because with JSONB, we have the semi-structured document data structure to work with and JSONB supports indexing.

Contents