It's important to note that relational databases are created and managed using a fixed schema. A fixed schema means that all data ingested into the database must be precisely aligned to predefined formatting standards which limits the types of data structures that relational databases can store. For example, relational databases are not able to process unstructured data (e.g., information that is inconsistent in format and isn't aligned to a preset data model) but are excellent at supporting transactional or financial information that includes structured data or semi-structured types of data (e.g., data that has a consistent format and aligns to a preset data model).
Examples of SQL databases
There are a variety of different SQL database examples, including:
- Oracle: Oracle Database is a relational database management system (RDBMS) developed and marketed by Oracle Corporation and is one of the most commonly used enterprise database systems in the world.
- MySQL: MySQL is a commonly used, open-source, relational database management system used for creating and administering databases. Developed and distributed by Oracle Corporation, MySQL is known for ease of use, extensive community support, and reliability.
- Note: An open-source alternative to MySQL is called MariaDB which was designed as a replacement for MySQL after the acquisition of MySQL by Oracle Corporation.
- PostgreSQL: PostgreSQL is an open-source object-relational database management system known for its advanced, feature-rich capabilities which extend the abilities of SQL. Developed as part of the POSTGRES project at the University of California at Berkeley, PostgreSQL offers ACID-compliant features that safely store and scale complicated data workloads (PostgreSQL.org 2024).
- MSSQL: MSSQL, which stands for Microsoft SQL Server, is a relational database management system developed by Microsoft. This database platform is commonly used in large enterprise environments to support high-volume transaction processing, business intelligence, and analytics applications.
- SQLite: Unlike other examples in this list, SQLite is actually a software library that provides an RDBMS. Unlike the other RDBMSs in this list, SQLite is serverless and self-contained with zero configuration. This is because it is embedded within the application using SQLite and, as a result, doesn't need a separate server.
It’s important to note that other types of databases can also establish relationships between pieces of data. In the case of normalized tabular databases (e.g., SQL or relational databases), these relationships are expressed using foreign keys or intersection tables. In the case of database management systems (DBMSs) such as MongoDB (e.g., a NoSQL database), these relationships are established by embedding or referencing data.
Not only Structured Query Language (NoSQL)
What is NoSQL?
NoSQL, which stands for Not only SQL, is a database management system approach used to ingest, store, and retrieve unstructured data and semi-structured data within a database. This means that data that cannot be analyzed or counted through traditional relational databases (e.g., SQL) can remain in its native format and be ingested into a NoSQL database. The reason it is called NoSQL is to emphasize that these databases can handle non-tabular, non-relational data models as well as support SQL-like query languages.
What is unstructured data?
Unstructured data is data that doesn't have a predefined data model or consistent organization. In addition, unstructured data, such as social media posts, can update and change rapidly while structured data, such as bank transactions, have a much lower rate of change. Examples of unstructured data include pictures, audio files, videos, and maps.
What is a NoSQL database?
NoSQL databases are databases that utilize a flexible schema that accommodates unstructured data and semi-structured data while also utilizing a non-tabular data storage method.
The use of a flexible schema enables NoSQL databases to ingest unstructured data in its native format (e.g., .txt, .JPG, MP3), which is not possible with SQL databases due to the requirement that all data align to a predefined format. Further, when NoSQL databases store data, flexible data models are employed so that unstructured data files can have different data structures and still be stored within the same collection.
To learn more, follow our tutorial on NoSQL databases.
Types of NoSQL databases
There are different types of NoSQL databases, including:
- Document databases: Document databases, sometimes referred to as object-oriented databases, store data in documents similar to JSON (JavaScript Object Notation) objects, although they're not JSON stores. They use the drivers returned from native objects to the programming language used by the developer without needing an object relational mapper (ORM). Each document itself is treated as a record and can contain values including numbers, arrays, objects, strings, or even Boolean characters. In addition, key-value pairs, nested documents, or other structured data can be included. A popular provider of these NoSQL databases is MongoDB.
- Key-value databases: Key-value databases collect, retrieve, and store data as groupings of key-value pairs. This means that each data record is represented by a unique key and an associated value. The key is used to retrieve the corresponding value from the database. For example, in an interior design key-value database, a key might be "color" and the value might be "purple." Popular providers of these NoSQL database systems include AWS and ScyllaDB.
- Column-family stores: Column-family databases organize data into columns rather than rows, which is helpful when working with wide datasets that are sparse in depth. In fact, column-family stores are sometimes referred to as "wide-column stores." In column-family stores, each row has a different set of columns, with columns then gathered into "families." These data models are helpful when working with large-scale datasets that benefit from horizontal scaling to optimize performance. Popular providers of these NoSQL databases include Apache Cassandra and HBase.
- Graph databases: Graph databases store data in nodes and edges. Nodes typically store information about people, places, and things, while edges store information about the relationships between the nodes. Graph databases are excellent tools for querying graph structures (e.g., social networks, hierarchies). Popular providers of these NoSQL databases include Neo4j, AWS, and Kibana.
Key differences between SQL vs NoSQL databases
While both SQL and NoSQL databases offer valuable functionality, it's important to understand the key differences between them.
Database storage model
The difference between SQL and NoSQL database systems relating to data storage is a stark one. Specifically, SQL databases store data in tables containing rows and columns whereas NoSQL systems store data using various methods depending on the type of unstructured data being ingested (e.g., JSON documents, key-value pairing, family grouping, graph nodes/edges).
Data type
While NoSQL databases, sometimes referred to as non-relational databases, are able to ingest, store, and retrieve unstructured data, SQL databases (e.g., traditional relational databases) are not. SQL databases are only able to ingest, store, and retrieve structured data. This is due to the difference between SQL vs NoSQL schemas utilized.
Schemas
SQL databases rely on a strict, predefined data schema with which data to be ingested must align. However, NoSQL databases use flexible schemas which enable them to ingest data in its various native formats.
Scalability
It's important for database administrators to plan for the growth and expansion of their database systems — this is another clear point of differentiation between SQL vs NoSQL databases.