Image Blog From Tables to Documents Considerations
January 30, 2019

RDBMS vs. NoSQL: Differences & How to Migrate

Databases

RDBMS and NoSQL are both database options. Here, we compare RDBMS vs. NoSQL. We break down key differences in schema. And we share tips for migrating from RDBMS to NoSQL.

Overview: RDBMS and NoSQL

Relational database management systems have been the gold standard for backend data systems for decades. RDBMS have been the tried and true data systems utilized by developers to meet application requirements. RDBMS examples range from single instance Microsoft Access databases in the early 1990s to the large multi-instance Oracle systems of today,

However, with the advent of NoSQL systems such as MongoDB, the data landscape is changing dramatically.

Databases like MongoDB have become the “new thing” and have received a lot of “buzz” in recent years. But their concepts and methodologies have been around for several decades as well.

Current advancements include:

  • Multi-document ACID transactional support.
  • Being able to leverage the flexibility and scalability of NoSQL.

This is making the transition to database systems like MongoDB much more common in the enterprise.

RDBMS vs. NoSQL: Key Differences

The biggest differences between RDBMS and NoSQL are cost and structure. RDBMS is expensive. NoSQL is an open source database. RDBMS has a table-based structure and uses predefined schema. NoSQL has a document-based structure with more flexibility in schema.

Schema Differences

Data modeling and design for NoSQL databases is fundamentally different from RDBMS. Below are some common terminologies differences you will see when moving to a NoSQL system.

RDBMS vs. NoSQL: Terminology
RDBMSNoSQL
DatabaseDatabase
TableCollection
RowDocument
ColumnField
IndexIndex
Join$lookup, embedded documents

Schema design in these migrations will require a change in how your DBAs and your organization look at your data. Specific use cases when modeling your data will always be different. But there are some common methodologies to follow when going through these exercises.

In RDBMS databases, joins are done with multiple tables. However, in NoSQL databases, embedded documents take the place of joins.

The figures below illustrate the difference between the two methodologies. 

relational joins

Figure 1 - Relational joins with RDBMS

Embedded Doc

Figure 2 – Embedded document model   

In figure 1, we have an employee table that has a relationship with an asset table joined by the employee_id column in both tables. In figure 2, we can see how these two relational tables can be collapsed into a single document with an embedded “assets” document array. In this example, we are only using two tables; however, the concept remains the same with 10s or 100s of relational tables. The two different methods show a different way of thinking about the data model and how a document model schema is a much more natural way to think about your organization’s data. Instead of having data normalized across multiple tables, the employee data is collapsed into a single rich document.

How to Migrate From RBMS to NoSQL

It's important to define the document schema when migrating from an RDBMS to a NoSQL system. 

  1. Review your existing application’s most frequently run queries.
  2. Identify groups of data that are commonly accessed at the same time.

When groups of data are commonly accessed together, they generally make good candidates for being grouped together in a single document.

Analyzing your current access patterns and data operations will go a long way in ensuring the success of any migration plans your organization may be considering.

Get Support For Your RDBMS to NoSQL Migration

There are important considerations to make when migrating from RDBMS to NoSQL. But there are also many benefits — the biggest of which are cost-savings and flexibility. 

Doing the migration yourself can be tricky. If you enlist the help of open source database experts from OpenLogic, your migration will run much more smoothly. And you'll be able to start benefitting from NoSQL faster. 

Plus, our experts can also provide ongoing support for NoSQL, ensuring you get the most out of the database.

Find out exactly how our experts can help you with RDBMS to NoSQL. Get in touch with an expert today to learn more.

Talk to a Database Expert