Relational databases
Databases

In modern software development, several types of databases are in use, each designed to handle specific data storage needs and access patterns. While relational databases are still widely adopted, especially in enterprise systems, other types of databases have emerged to address scalability, flexibility, and performance in large-scale and distributed environments. However, relational databases will continue to play a critical role in the future due to their strong consistency guarantees, robust transaction support, and well-established standards, making them especially suitable for applications that require complex querying and strict data integrity.

Relational Databases (SQL)

Relational databases store data in tables with rows and columns and use structured query language (SQL) for defining and manipulating data. They are well-suited for structured data and support complex queries and transactions. Examples include MySQL, PostgreSQL, Oracle Database, and Microsoft SQL Server.

NoSQL Databases

NoSQL ("Not Only SQL") databases are designed for flexibility, scalability, and performance, especially for large volumes of unstructured or semi-structured data. There are several subtypes:

  • Document Databases: Store data as documents, typically in JSON or BSON format (e.g., MongoDB, CouchDB).
  • Key-Value Stores: Store data as simple key-value pairs, offering extremely fast lookups (e.g., Redis, Amazon DynamoDB).
  • Column-Family Stores: Organize data into columns and column families for high performance in analytical queries (e.g., Apache Cassandra, Apache HBase, Google Bigtable).
  • Graph Databases: Focus on relationships between entities, ideal for social networks or recommendation systems (e.g., Neo4j, Amazon Neptune).

Specialized Database Types

  • In-Memory Databases: Store data primarily in RAM for extremely fast access, used for caching and real-time analytics (e.g., Redis, Memcached).
  • Time-Series Databases: Optimized for time-stamped data such as IoT sensor readings, application metrics, and logs. Support efficient storage and querying of time-based data (e.g., InfluxDB, TimescaleDB, Prometheus).
  • Vector Databases: Designed for storing and querying high-dimensional vectors (embeddings), essential for AI/ML applications, semantic search, and recommendation systems (e.g., Pinecone, Weaviate, Milvus).
  • NewSQL Databases: Combine the ACID guarantees of traditional SQL databases with the horizontal scalability of NoSQL systems (e.g., CockroachDB, Google Spanner, VoltDB).

This course will primarily focus on relational databases and the use of SQL, which remain foundational to many information systems.

Databases in Action: Real-World Applications

Databases are the backbone of nearly every modern application. Whether you're shopping online, using social media, checking your bank account, or controlling smart home devices, a database is working behind the scenes to store, retrieve, and manage data. Let's explore how different types of applications rely on databases.

What is a database

A database is an organized collection of data for one or more purposes, usually in digital form. The data is typically organized to model relevant aspects of reality. The database may contain, for example, hospital patient data or institutional grades and course information.

The term "database" refers both to the way its users view it, and to the logical and physical materialization of its data, content, in files, computer memory, and computer data storage. This definition is very general, and is independent of the technology used. However, not every collection of data is a database; the term database implies that the data is managed to some level of quality (measured in terms of accuracy, availability, usability, and resilience) and this in turn often implies the use of a general-purpose Database management system (DBMS).

Requirements for the database

Here are some common requirements for the database:

  • No redundant data: we don't have to save the same data to several places
  • We can search the data using several conditions
  • Using the data and the applications which will use it are independent about the physical structure of the database

DBMS (DataBase Management System)

DBMS is typically a complex software system that meets many usage requirements, and the databases that it maintains are often large and complex. The utilization of databases is now spread to such a wide degree that virtually every technology and product relies on databases and DBMSs for its development and commercialization, or even may have such embedded in it. Also, organizations and companies, from small to large, heavily depend on databases for their operations.

Some of the most popular DBMS's:

  • MySQL and MariaDB
  • PostgreSQL
  • SQLite
  • SQL Server (Microsoft)
  • Oracle
The three leading open source implementations are MySQL, PostgreSQL and SQLite.

DBS (DataBase System)

A Database System (DBS) is the complete system that includes both the database itself and the Database Management System (DBMS) that manages it. In other words, DBS = Database + DBMS. This combination provides a comprehensive environment for storing, managing, and retrieving data efficiently while ensuring data integrity, security, and concurrent access control.

Database Data Storage Tables Files + DBMS Query Processing Security Transaction Mgmt = DBS Complete System



Toggle Menu