PGCon2014 - Final Release

PGCon 2014
The PostgreSQL Conference

Speakers
David E. Wheeler
Schedule
Day Talks - Day 2 - Fri May 23 - 2014-05-23
Room Morisset 256
Start time 15:15
Duration 00:45
Info
ID 684
Event type Lecture
Track 9.4 Features
Language used for presentation English

HSTORE, XML, JSON, JSONB OH MY!

Use the unstructured data type that's right for you.

PostgreSQL 9.4 adds a new unstructured data type, JSONB, a variant of JSON optimized for storing objects. JSONB complements the existing XML and JSON document objects, as well as HSTORE. Which one is right for you? We'll take a tour of the features of each, and their advantages and disadvantages for various use cases, all illustrated with real-world examples.

There has been a lot of work on the representation of unstructured data in PostgreSQL, culminating in the addition of the JSONB type in the forthcoming 9.4 release. JSONB complements the existing HSTORE, XML, and JSON types, not to mention arrays. With so many options, which do you use? As usual it depends on your use case.

In this presentation, we'll review the unstructured data types in PostgreSQL, and look at their advantages and disadvantages for:

  • Document storage
  • Configuration management
  • A “schemaless database”
  • Object serialization
  • Entity/Attribute/Value models
  • Path queries