
NoSQL Databases vs Relational Databases
With relational database management systems (RDBMS), data is stored in tables and uses structured query language (SQL) for database access. You pre-define your database schema based on your requirements and set up rules to govern the relationships between fields in your tables. This model has scaling problems when it comes to expanding tables. Example; if an additional column needs to be defined it requires adding the column to a table, and importing data from the old table into the new one with the added column. This can be a tedious and time consuming process.
MongoDB is a NoSQL DBMS that stores data in JSON-like documents that can vary in structure. Related information is stored together for fast query access using the MongoDB query language. MongoDB uses dynamic schemas which means that records can be created without first defining the structure. You can change the structure of records by adding new fields or deleting existing ones (MongoDB Compare, n.d.).
NoSQL encompasses a wide variety of different database technologies developed in response demands presented in building modern applications. The term NoSQL is often loosely used as an umbrella category for all non-relational databases. NoSQL databases are designed to be flexible, scalable, and achieve high performance.
The primary way in which NoSQL databases are different from relational databases is the data model. The data model in non-relational NoSQL databases like MongoDB primarily fall into the following categories; Document Model, Graph Model, Key-Value, and Wide Column Models.
Relational databases store data in rows and columns. Document databases store data in documents. Documents provide an intuitive way to model data in a way closely aligned with object-oriented programming. In a document database, the schema is dynamic allowing each document to contain different fields. This flexibility is useful for modeling unstructured and polymorphic data. Document model databases are useful in a wide variety of applications since they are very flexible.
Graph databases use graph structures with nodes, edges and properties to represent data. In The data is modeled as a network of relationships between specific elements. Graph databases are useful when traversing relationships are core to the application such as navigating social network connections, network topologies, or supply chains.
Key-Value and Wide Column Models are the most basic type of non-relational database. Every item in the database is stored as an attribute name, or key, together with its value. This model can be useful for representing polymorphic and unstructured data because the database does not enforce a set schema across key-value pairs (MongoDB, n.d.).
Organizations that use MongoDB in production include; Aadhar, Shutterfly, MetLife, and eBay (Edereka MongoDB, 2014.).
References
Edereka MongoDB. (2014, January 22). Real World Use Cases of MongoDB. Retrieved March 14, 2016, from http://www.edureka.co/blog/real-world-use-cases-of-mongodb/
MongoDB. (n.d.). What is NoSQL? Retrieved March 14, 2016, from https://www.mongodb.com/nosql-explained
MongoDB Compare. (n.d.). MongoDB and MySQL Compared. Retrieved March 14, 2016, from https://www.mongodb.com/compare/mongodb-mysql