notexOPENOverview
Notex/Systems/Relational Versus Document Models
04.01LESSON 01 OF 16 · 2 MIN READ

Relational Versus Document Models

Always free to read

The best-known data model today is probably that of SQL, based on the relational model proposed by Edgar Codd in 1970. In this model, data is organized into relations (called tables in SQL), where each relation is an unordered collection of tuples (rows in SQL).

The relational model was originally a theoretical proposal, and many people at the time doubted whether it could be implemented efficiently. However, by the mid-1980s, relational database management systems (RDBMSs) and SQL had become the tools of choice for most people who needed to store and query data with some kind of regular structure. Many data management use cases—for example, business analytics (see “Stars and Snowflakes: Schemas for Analytics”)— are still dominated by relational data decades later.

Over the years, there have been many competing approaches to data storage and querying. In the 1970s and early 1980s, the network model and the hierarchical model were the main alternatives, but the relational model came to dominate them. Object databases (not to be confused with object storage for large files, a cloud service that is popular today) came and went again in the late 1980s and early 1990s. XML databases appeared in the early 2000s, but they have seen only niche adoption. Each competitor to the relational model generated a lot of hype in its time, but none lasted. Instead, SQL has grown to incorporate other types of data—for example, adding support for XML, JSON, and graph data.

In the 2010s, NoSQL was the latest buzzword that tried to overthrow the dominance of relational databases. NoSQL refers not to a single technology but a loose set of ideas around new data models, schema flexibility, scalability, and a move toward open source licensing models. Some databases branded themselves as NewSQL, reflecting their aim to provide the scalability of NoSQL systems along with the data model and transactional guarantees of traditional relational databases. NoSQL and NewSQL ideas have been very influential in the design of data systems, but as the principles have become widely adopted, use of those terms has faded.

One lasting effect of the NoSQL movement is the popularity of the document model, which usually represents data as JSON. This model was originally popularized by specialized document databases such as MongoDB and Couchbase, although most relational databases have now also added JSON support. Compared to relational tables, which are often seen as having a rigid and inflexible schema, JSON documents are thought to be more flexible.

The pros and cons of document and relational data have been debated extensively. Let’s examine some of the key points of that debate.

Progress is saved on this device.
KEEP EXPLORING

One note leads to another.

Back to the library →
⌕
Search across the entire library ⌘ K