The birth of databases

Database Dynamics: Unveiling the Evolution, Concepts, and Optimization — Part 1

Lucas Lima de Oliveira
Poatek
Published in
8 min readSep 27, 2023

--

In the vast realm of modern technology, databases emerge as the mighty engines propelling many applications and platforms forward. To truly comprehend and master the digital world, it is essential to grasp the fundamental concepts behind databases. Whether you are a newcomer exploring this dynamic field or an experienced professional seeking to deepen your understanding, this blog post aims to serve as your comprehensive guide. Here, you will find the first part of our trilogy to explore the databases world. Join us on this journey as we delve into the evolution of databases, providing a comprehensive overview of core database concepts, including their evolution, the different types of databases, and their main features.

Legacy Database Systems: Pre-Relational Era

Before the Relational Database Model was introduced, data was typically stored using file-based systems such as flat files or hierarchical databases. These systems had some limitations in terms of data organization and retrieval:

Flat files: Data was stored in plain text files with a specific format. Each record was stored as a single line, with fields separated by delimiters such as commas or tabs. Retrieval and manipulation of data required custom programming.

Hierarchical databases: Data was organized in a tree-like structure, with parent-child relationships. Each record had only one parent, and accessing data required navigating through the hierarchy. This rigid structure made it difficult to model complex relationships and often needed changes to the database schema.

Network Databases: Was an alternative to the hierarchical database model. It aimed to solve some of the limitations of hierarchical databases by allowing more complex relationships, allowing a child node to have multiple parents, and providing more efficient data access.

Figure: Comparison between examples of Hierarchical and Network Database Models tree structures. (Source: Created by authors, based on Difference between Hierarchical and Network Data Model — GeeksforGeeks [2])

These file-based systems lacked flexibility, as changes to the structure or relationships required significant modifications to the physical data files and the corresponding application programs.

Here is a comparison table highlighting the differences between the three models (Hierarchical, Network, and Relational) and the Relational Database Model (RDB):

Table: Database models comparison (Source: Authors)

It’s important to note that this table provides a general comparison and there may be variations or specific implementations within each model.

Revolutionizing Data Storage: The Emerging of Relational Databases

In the realm of data management, there is a model that transformed the landscape, revolutionizing how we organize and interact with data. Enter the Relational Database Models (RDB), a game-changer that continues to shape how we store, retrieve, and exchange information.

The introduction of the Relational Database Model, pioneered by Edgar F. Codd in the 1970s [4], provided a new approach to data organization and management. It introduced the concept of tables (relation) consisting of rows (tuples) and columns (attributes), allowing for more flexible and efficient data storage and retrieval. This model also introduced the use of Structured Query Language (SQL) as a standardized language for working with relational databases.

The first relational database to be released for commercial use was the Oracle Database system in 1979. Others soon followed, including IBM’s SQL/DS and DB2, plus Microsoft SQL Server in the late 1980s. The figure below displays a timeline of the past decades pointing to important events that impacted the evolution of databases.

Image: Databases evolution timeline (Source: Created by authors, based on Unidade Conhecer os conceitos básicos de bancos de dados [3])

Having explored the creation and historical context of the Relational Database Model, it’s time to shift our focus towards diving into the significance of RDB and the lasting impact they had in the world of data management.

  • Simplicity and Flexibility
    Prior to RDB, managing data was like solving a complex puzzle. RDB simplified the process with its tabular structure, consisting of tables composed of rows and columns. Suddenly, data organization became straightforward and intuitive. Rows were connected, forming relationships via primary keys and foreign keys, allowing for seamless navigation and understanding of data structures.
  • Standardization for Harmony
    RDB introduced Structured Query Language (SQL), establishing a universal language for interacting with databases. This standardization eliminated the language barriers between different database systems, promoting compatibility and enabling smooth data exchange. SQL became the heart and soul of data operations, making it easier for developers and users to communicate with databases across various platforms.
  • Empowering Data Independence
    Before RDB, modifying database structures often caused disruptions in application functionality. However, RDB brought the concept of data independence to the stage. By separating the logical representation of data from its physical storage, RDB allowed developers and organizations to make schema changes without impacting the applications relying on the data. This newfound flexibility amplified the agility of database design and maintenance.
  • Ensuring Data Integrity
    RDB adhered to the principles of ACID (Atomicity, Consistency, Isolation, Durability), establishing a solid foundation for data integrity. ACID ensured that data remained accurate, reliable, and consistent even during complex operations and concurrent transactions. With ACID support at the core, RDB provided a rock-solid framework for maintaining the quality and reliability of data.
  • Optimization for Performance
    RDB introduced optimization techniques that enhanced data retrieval and manipulation efficiency. Indexing mechanisms amplified query speed, enabling swift access to specific data points. Query optimization techniques fine-tuned performance, ensuring fast execution of complex queries. RDB empowered databases to perform at their peak, delivering efficient and timely results.
  • Wide Adoption and Enduring Influence
    The simplicity, performance, and data integrity offered by RDB propelled its widespread adoption across industries and applications. RDB became the industry standard, serving as the foundation for subsequent database innovations. Its impact continues to shape modern database systems, providing the groundwork for managing large volumes of data and enabling seamless integration with diverse software solutions.

The Relational Database Model (RDB) disrupted the data management landscape, bringing simplicity, standardization, flexibility, and performance optimizations to the forefront. With its enduring influence, RDB transformed the way we store, query, and manage data. As we navigate the data-driven world, we owe a debt to RDB for laying the groundwork of modern data management practices that continue to evolve and thrive. RDB will always be remembered as a pioneering.

Evolving Data Management: An Introduction to NoSQL Databases

NoSQL Databases bring with them the no-boundaries sensation, where structures are malleable, and relationships grow without limitation. NoSQL breaks free from the shackles of traditional relational models, offering a playground where your data can roam wild and free.

Born in 1998 as a concept created by Carlo Strozzi, NoSQL was not a feasible database to maintain with the available technology at that time. In 2006, Google published an article [6] with an approach making it possible to apply those concepts, and NoSQL REBORN! These databases were developed in response to the increasing need for scalable and flexible data storage solutions in a distributed computing environment, which aligns with the goals of cloud computing.

But wait, what exactly is NoSQL? It stands for “Not Only SQL” — a rebellious declaration that challenges the dominance of SQL-based relational databases. NoSQL databases adopt a different philosophy, focusing on accommodating unstructured and semi-structured data in addition to structured data. This means that everything from social media posts to multimedia files can find a place in these databases, allowing for greater flexibility and versatility.

Source: Meme Generator — Imgflip

While NoSQL databases offer many advantages, it’s important to consider the trade-offs. They may not provide the same level of transactional guarantees as SQL databases, which can be a consideration for applications requiring strict consistency and integrity. However, one of the main advantages in NoSQL databases is to provide specialized solutions for specific use cases, allowing you to choose the right tool for your specific data management needs.

SQL vs NoSQL: Unraveling the Database Dilemma

If you’re searching for a clear-cut answer on whether to choose SQL or NoSQL, you may find yourself disappointed. These options can’t be categorized in an overarching right or wrong manner as the applicability of each relies heavily on the specific use cases.

Several organizations have demonstrated their capacity to customize and scale these databases according to their requirements. For instance, there’s a common misconception that SQL doesn’t scale efficiently. However, Facebook has debunked this by successfully scaling MySQL to handle petabytes of data at their level of operation.

Moreover, several contributing factors can lead to the conclusion that there often isn’t an entirely right or wrong choice in many scenarios. What you should focus on is comprehending your system’s requirements and making a choice based on a careful evaluation of the advantages and disadvantages of each kind of database.

To finish, trying to make a long story short, here is a SQL and NoSQL Comparison:

  • Which offers better scalability? NoSQL has superior scalability.
    Assuming Scalability evaluates the ability of a system to enhance or diminish its performance and expense in alignment with processing demand.
  • Which delivers faster performance? NoSQL typically offers faster performance. Performance is an appraisal of the efficiency of a software system or component in achieving its mandates for timeliness. It’s usually measured via response time or throughput.
  • Which ensures more security? In a nutshell: SQL boasts heightened security. There are three main concerns when talking about security: confidentiality, integrity, and availability. SQL guarantees ACID transactions, while NoSQL databases lack confidentiality and integrity.

When to use SQL or NoSQL?

(Source: SQL vs NoSQL Databases | O(1) System Design Interview Guide (nodeflair.com) [7])

--

--