Behind the wonderful user interfaces of the applications, we use daily in the modern world, databases still stand as the backbone of information storage and retrieval. It’s crucial for developers to use the best type of database suited to their applications, as they directly impact the efficiency, scalability, and performance of said applications.
Whether you're making strategic decisions about your technology stack or developing the next big app, understanding the landscape of database technologies is essential. This blog post aims to shed light on the various types of databases available today, their strengths, and their typical use cases.
First, let’s recap the types of databases as we know and love them today, looking at their nature, their strengths, and typical use cases.
Relational databases have served as the primary choice for structured data since their inception in the 1970s. They organise data into structured tables, which are linked to each other by key relationships, allowing for a highly organised and flexible way of manipulating data using Structured Query Language (SQL). With decades of development, optimisation, and use in production environments, they offer a level of maturity, stability, and reliability that newer database technologies are still working to achieve.
Relational databases have many strengths that still make them as relevant as ever. Firstly, they support ACID (Atomicity, Consistency, Isolation, Durability) properties, ensuring reliable transaction processing and data integrity. This is crucial for applications where consistency of data is non-negotiable, such as financial applications. Then they excel in supporting complex queries, making it possible to retrieve and manipulate data in ways that other database models might struggle with. This includes operations like joins, subqueries, and aggregations. This is enabled by another strength, namely SQL, a powerful language used for querying and manipulating data. It's wide acceptance and standardisation mean that skills in SQL are transferable across various systems, and a vast array of resources and community support is available.
Typical Use Case:
You’ll find relational databases in highly transactional applications such as financial systems, ERPs, CRMs, and E-Commerce. JustSolve relies on Microsoft SQL Server for our OutSystems 11 work and PostgreSQL in the new OutSystems Developer Cloud (ODC) where we’ve built various transactional applications in the mining and health sectors.
As the world is ever increasing in the need of faster and faster processing of larger and larger amounts of data, traditional relational databases have shown some limitations (such as global scalability and storage of very large data sets), which led to the rising popularity of NoSQL (more on that in a moment) and eventually to what is known as NewSQL. NewSQL databases represent a modern approach, aiming to combine the scalability and flexibility of NoSQL systems with the strong consistency and ACID compliance of traditional relational databases. Born out of the need to address the limitations of both relational and NoSQL databases, especially in web-scale applications, NewSQL databases offer a promising solution for developers and organisations looking for the best of both worlds.
Typical Use Case:
You’ll typically find NewSQL in large-scale IoT, E-Commerce, and Software as a Service (SaaS) applications which need to host very large dataset that also must be highly consistent. JustSolve hasn’t built anything substantial on this technology yet, but we’re busy experimenting with technologies such as CockroachDB —so look forward to feedback on that.
NoSQL databases have emerged as a powerful alternative to traditional relational databases, especially in the context of big data and real-time web applications. Designed to overcome the scalability and schema rigidity of relational models, NoSQL databases exist in a variety of data models, including key-value, document, and graph formats. This flexibility allows developers to choose a database that best fits their application's specific needs.
Document databases are designed to store, retrieve, and manage document-oriented information. These databases are ideal for handling semi-structured data such as JSON, BSON (binary JSON), and XML documents, allowing for a more natural and flexible way to work with data that doesn't fit neatly into traditional relational tables.
By leveraging the strengths of document databases, organisations can build dynamic, scalable applications as they are designed for high performance and easy scaling, supporting distributed architectures that can handle large volumes of data and high throughput. Then, though a bit of a double-edged sword, these databases allow the structure of the documents to evolve over time without requiring modifications to existing data. This flexibility is particularly beneficial for agile development practices and applications with rapidly changing data models.
Typical Use Case:
You’ll find document databases behind web-, mobile-, and IoT applications which produces unstructured or self-contained data sets such as Content and Document Managment Systems. It’s also popular with microservices that manages their own storage. JustSolve has used Elasticsearch for powerful search functionalities in our applications, Google Cloud Firestore in mobile applications, and LiteDB for data caching in micro-services.
Key-value databases key-value databases, also known as key-value stores, are a type of NoSQL database where data is stored in a “key-value” format and are one of the simplest forms of databases. Each item in the database is stored as a key paired with its corresponding value, just like one would with a HashMap or Dictionary data structure. Designed around such a straightforward data model, key-value databases provide for highly efficient data lookups, making them incredibly useful for things like data caching.
Together with the before mentioned strengths of simplicity and high performance, key-value databases like Redis are also highly flexible in the data types that one can use as values, for example not just numbers and strings, but also lists, dictionaries, and queues. These databases are also designed to scale horizontally, allowing them to scale significantly in terms of throughput and capacity.
Typical Use Case:
You’ll find key-value stores used for data caching, session storage, and configuration management. At JustSolve, you’ll find us using Azure Cache for Redis, Redis containers, and a custom built namespaced-key-value database (with full test coverage I might add).
Graph databases are specialised to store and navigate relationships between data points efficiently. They represent data in graph structures, consisting of nodes (entities), edges (relationships), and properties (information about entities and relationships). This model is particularly adept at handling interconnected data and complex queries that involve traversing relationships, making graph databases uniquely powerful for certain types of applications.
Typical Use Case:
You’ll find graph databases in applications such as social media, recommendation engines, and fraud detection. At JustSolve, we’ve used Redis Stack’s RedisGraph feature (which has sadly recently been deprecated) to build a recommendation engine and worked with a client using Neo4J.
Time series databases are specialised databases optimised for handling data indexed in time order. They are designed to store and manage time-stamped data sequences of values or events that are collected over time, such as metrics from IoT devices, application logs, or financial market data. These databases excel at managing large volumes of sequential data and are built to handle the high insert rates and query loads typical of time series information. Another interesting feature found in these types of databases is data retention policies, which allows for automatic deletion or down sampling of older data to reduce storage requirements while preserving historical insights.
Typical Use Case:
You’ll typically find time series databases in applications related to IoT streams such as GPS data, financial data such as stock prices and trade volumes, and event logging and monitoring. At JustSolve we’ve been involved in projects using TimescaleDB for GPS data from IoT devices.
Multi-model databases are designed to support multiple data models against a single, integrated backend. This capability allows them to store, manage, and access data across different formats, such as documents, graphs, key-value pairs, and columns, within a single system. The ability to handle various data models in a unified database environment is particularly beneficial in complex applications that require diverse ways of interacting with data.
The main strengths of multi-model databases would be their flexibility, efficiency, and simplified usage. Developers have the freedom to choose the most appropriate model for their data while the database system handles the storage and processing of the various models optimally.
Typical Use Case:
You’ll typically find multi-model databases deployed in enterprise resource planning (ERP) systems. These systems often need to manage a wide array of data types, including structured financial records, unstructured documents like contracts and invoices, hierarchical employee data, and real-time transaction logs.
At JustSolve you’ll find us using Azure CosmosDB for APIs and integrations that need to be high performance and have high availability. We’ve also done some work with InterSystems’ CacheDB.
Emerging in the 1980s, object-oriented (OO) databases were seen as the answer to what was called the “impedance mismatch” between object orientated programming (OOP) and traditional relation databases. OO databases store data as self-contained native OOP objects, allowing for high performance storage and retrieval of complex object, eliminating the need to map data to rigid tables or recreate complex objects. But despite their initial promise, several factors contributed to the decline of its popularity.
Vector databases are specialised databases designed to efficiently store, index, and retrieve high-dimensional vector data. These vectors are typically generated from complex data types like images, videos, audio, and text using machine learning models. The main function of vector databases is to facilitate fast and accurate similarity searches among these vectors.
You’ll currently mainly hear about vector databases in context of Retrieval Augmented Generation (RAG), an advanced approach in the field of natural language processing and machine learning that leverages the power of both neural text generation and information retrieval to enhance the quality of generated text.
As you explore the variety of database options available to you in your next software development project, it's essential to carefully assess the specific requirements of your applications and the data challenges they entail.
Each type of database brings its own set of strengths and potential limitations, depending on how you intend to use it. We recommend that you thoroughly investigate each database model, try them out, and have discussions with experts such as JustSolve to gain a clearer understanding of which database aligns best with your technical and business objectives.
Choosing the right database is crucial not only for boosting performance but also for ensuring easier scalability and maintenance of your applications in the future.
Ready to optimise your database strategy? Book a risk-free consultation with our specialists today.
Stay tuned for our upcoming blogs where we will delve into:
Have a product you're ready to