Skip to Content
SQL in a Nutshell, 4th Edition
book

SQL in a Nutshell, 4th Edition

by Kevin Kline, Regina O. Obe, Leo S. Hsu
June 2022
Intermediate to advanced
838 pages
21h 1m
English
O'Reilly Media, Inc.
Book available
Content preview from SQL in a Nutshell, 4th Edition

Chapter 10. Flexible and Schemaless

One of the strengths of relational databases is their ability to enforce data structures. You constrain data in a relational database by defining tables and defining columns within those tables that enforce basic data types like strings, dates, and numbers, and then define relationships between tables. SQL, as the lingua franca of relational databases, is by extension a tool for transforming this well-structured relatable data into a format digestible by applications. In the early days of relational databases, data types were simple and people looked to relational databases for structure. This started to change with the advent of SQL:1999. The big leap in SQL:1999 was that types need not be just primitives, but could also be composites of primitives. This allowed table columns to store arrays, nested tables, and even user-defined types. Specialized data types sprung up to support networks, encryption, full text search, geospatial applications, and much more.

A relational database is not the only way to organize data, however. Here are some alternatives to the relational model, often referred to as NoSQL or not-only-SQL databases:

Key/value stores
Data is stored as a set of key/value pairs, where the key acts as a unique identifier. Support is often limited to retrieval, insertion, modification, and deletion.
Document stores
This is similar to a filesystem. Each document (record) is a complex object in its own right. The storage format is often ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

John L. Viescas, Douglas J. Steele, Ben G. Clothier
SQL Cookbook, 2nd Edition

SQL Cookbook, 2nd Edition

Anthony Molinaro, Robert de Graaf

Publisher Resources

ISBN: 9781492088851Errata Page