More data types
In Chapter 1, you explored the definition of JSON documents. You also learned that JSON is a natural way of describing real-world usage scenarios, but due to performance and ease of operation concerns, the relational data model is the dominant force in the database market. However, there are situations when the relational data model does not fit well. For example, when you evaluate customer information, a small but considerable portion of customers may have pets, and the number of pets owned by a customer may vary. This varying data may not fit into the fixed columns of a relational table well.PostgreSQL, as well as many versions of modern DBMS, also support complex data structures, such as JSON and arrays. Arrays are simply lists of data, usually written as members enclosed in square brackets. For example, ['cat', 'dog', 'horse'] is an array. Arrays can also contain a series of JSON objects. These data structures can be used in certain usage...