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.

Back to top

RDBMS vs. NoSQL: What's the Difference?

The main difference between RDBMS and NoSQL is that RDBMS is a relational database and NoSQL is a non-relational, distributed database. See table below for other differences.

FeatureNoSQLRDBMS
QueryNo declarative query languageStructured query language (SQL)
ScalabilityCan be scaled horizontally at low costCan be scaled vertically
StructureDocument-based with more flexibilityTable-based with predefined rigid schema
SpeedOne record stores all the query data, which makes finding matched records faster. Data is stored in different tables, so running queries requires integrating the information and setting restrictions, slowing down query time. 

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.

Back to top

How Do You Pick Between RDBMS and NoSQL?

NoSQL is becoming more popular than RDBMS. There are advancements with NoSQL systems like MongoDB. And that's changing the database game. 

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 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.

Back to top

How to Migrate From RDBMS 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.

Back to top

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 database support experts can help you with RDBMS to NoSQL. Get in touch with an expert today to learn more.

Talk to a Database Expert

Back to top