Skip to main content

What is DBMS?

Introduction

Now that you understand what databases are, it's time to learn about the software that manages them. A Database Management System (DBMS) is the crucial layer between you and your data.

In this tutorial, you will learn:

  • What a DBMS is and why it's essential
  • Key functions of a DBMS
  • The difference between DBMS and RDBMS
  • How users interact with a DBMS
  • Popular DBMS software in the industry

What is a DBMS?

A Database Management System (DBMS) is software that enables users to create, manage, and interact with databases. It acts as an intermediary between users and the database itself.

The Role of a DBMS

Think of a DBMS as a highly organized librarian:

What a Librarian DoesWhat a DBMS Does
Organizes books on shelvesOrganizes data in tables
Helps you find specific booksRetrieves specific data
Keeps track of borrowed booksManages data modifications
Controls who can access sectionsEnforces security and permissions
Maintains catalog recordsMaintains data integrity

Without a DBMS

Imagine managing a large database without specialized software:

  • You would need to write code for every data operation
  • Handling concurrent access would be nearly impossible
  • Data could easily become corrupted or lost
  • Security would be extremely difficult to implement
  • Backup and recovery would be manual and error-prone

With a DBMS

The DBMS handles all these complexities for you, providing:

  • Standard interfaces for data access (like SQL)
  • Automatic management of storage and memory
  • Built-in protection against data corruption
  • Easy administration through management tools

Core Functions of a DBMS

A DBMS provides several critical functions that make database management practical and efficient.

1. Data Definition

The DBMS allows you to define the structure of your data:

  • Create databases and tables
  • Define data types for columns
  • Set up constraints and rules
  • Establish relationships between tables
-- Example: Defining a table structure
CREATE TABLE customers (
    customer_id INTEGER PRIMARY KEY,
    name TEXT NOT NULL,
    email TEXT UNIQUE,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

2. Data Manipulation

The DBMS enables you to work with your data:

OperationDescription
CreateInsert new records
ReadRetrieve existing records
UpdateModify existing records
DeleteRemove records

These operations are collectively known as CRUD operations.

3. Data Security

The DBMS protects your data through:

  • Authentication - Verifying user identity
  • Authorization - Controlling access levels
  • Encryption - Protecting data at rest and in transit
  • Audit trails - Tracking who did what and when

4. Data Integrity

The DBMS ensures data remains accurate and consistent:

  • Entity integrity - Every row has a unique identifier
  • Referential integrity - Relationships between tables are valid
  • Domain integrity - Data values meet defined constraints

5. Concurrency Control

When multiple users access data simultaneously, the DBMS:

  • Manages locks to prevent conflicts
  • Ensures isolation between transactions
  • Resolves deadlocks when they occur

DBMS vs RDBMS

You may hear both terms used, sometimes interchangeably. Here's the key difference:

DBMS (Database Management System)

The broader category of database management software. DBMS can manage:

  • Hierarchical databases
  • Network databases
  • Object-oriented databases
  • Document databases

RDBMS (Relational Database Management System)

A specific type of DBMS that manages relational databases—databases organized into tables with relationships.

Key Differences

AspectDBMSRDBMS
Data StorageFiles, hierarchies, or objectsTables (relations)
RelationshipsLimited or noneFull support via foreign keys
Query LanguageVariesSQL (standardized)
NormalizationNot requiredEncouraged for data integrity
ACID SupportVariesFull support (typically)
ExamplesFile systems, XML databasesMySQL, PostgreSQL, SQL Server

What is ACID?

RDBMS systems typically support ACID properties for transactions:

PropertyMeaning
AtomicityTransaction completes fully or not at all
ConsistencyData moves from one valid state to another
IsolationConcurrent transactions don't interfere
DurabilityCommitted changes are permanent

In This Course

We focus on RDBMS because:

  • SQL is the standard language for relational databases
  • Most business data is stored in relational databases
  • Skills transfer across all major RDBMS platforms

DBMS Architecture

Understanding how a DBMS is organized helps you work with it more effectively.

Three-Schema Architecture

Most DBMS systems use a three-level architecture:

three level basic architecture
three level basic architecture

Why This Matters

Data Independence - Changes at one level don't affect others:

  • You can change how data is stored (internal) without changing queries
  • You can add new views (external) without changing tables
  • You can modify table structure (conceptual) without affecting views

Client-Server Architecture

Most DBMS systems operate in a client-server model. Multiple clients can connect to the same database server simultaneously.

client-server architecture
client-server architecture
DBMS three-layer architecture showing users, DBMS software, and database storage with data flow arrows
DBMS three-layer architecture showing users, DBMS software, and database storage with data flow arrows

Popular DBMS Software

The database market offers many options, each with strengths for different use cases.

Open Source RDBMS

DBMSBest ForKey Features
MySQLWeb applicationsFast, reliable, huge community
PostgreSQLComplex applicationsAdvanced features, extensible
MariaDBMySQL replacementMySQL-compatible, enhanced performance
SQLiteEmbedded, mobile appsZero configuration, file-based

Commercial RDBMS

DBMSBest ForKey Features
Oracle DatabaseEnterprise applicationsScalability, advanced analytics
Microsoft SQL ServerWindows environmentsIntegration with Microsoft tools
IBM Db2Enterprise data warehousingAI integration, hybrid cloud

Cloud-Native Databases

DBMSProviderKey Features
Amazon RDSAWSManaged MySQL, PostgreSQL, etc.
Azure SQLMicrosoftCloud SQL Server
Google Cloud SQLGoogleManaged relational databases
Amazon AuroraAWSMySQL/PostgreSQL compatible, high performance

Choosing a DBMS

Consider these factors:

  • Scale - How much data? How many users?
  • Budget - Open source vs. commercial licensing
  • Features - What advanced capabilities do you need?
  • Ecosystem - What tools and integrations exist?
  • Team skills - What does your team already know?

What We Use in This Course

Our platform uses SQLite for practice. Why?

  • Standard SQL syntax that transfers to any RDBMS
  • No complex setup required
  • Perfect for learning fundamentals
  • Lightweight and fast for interactive exercises

How Users Interact with a DBMS

Different users interact with a DBMS in different ways:

Types of Database Users

User TypeHow They InteractTools Used
End UsersThrough applicationsWeb apps, mobile apps
Data AnalystsWriting SQL queriesQuery tools, BI software
DevelopersProgramming database accessCode libraries, ORMs
DBAsManaging database systemsAdmin tools, command line

Ways to Access a DBMS

1. Command Line Interface (CLI)

Direct SQL execution in a terminal:

$ sqlite3 mydatabase.db
SQLite version 3.39.0
sqlite> SELECT * FROM customers LIMIT 5;

2. Graphical User Interface (GUI)

Visual tools for database management:

  • SQL Server Management Studio (SSMS)
  • pgAdmin (PostgreSQL)
  • MySQL Workbench
  • DBeaver (universal)

3. Programming Languages

Code that connects to databases:

# Python example
import sqlite3
conn = sqlite3.connect('mydatabase.db')
cursor = conn.execute('SELECT * FROM customers')
for row in cursor:
    print(row)

4. Interactive Platforms

Browser-based SQL execution (like CodePeet!):

  • Write SQL directly in your browser
  • Execute against real databases
  • See results immediately

Practice

Let's explore our DBMS by examining the structure of our practice database. These exercises help you understand what the DBMS tells us about the data.

Exercise 1: List All Tables

In SQLite, you can query the system catalog to see all tables. The DBMS maintains this metadata automatically.

-- Query the SQLite system catalog to list all tables
-- This metadata is managed by the DBMS

SELECT name AS table_name
FROM sqlite_master
WHERE type = 'table'
ORDER BY name;

Exercise 2: Examine Table Structure

The DBMS stores information about column definitions. Let's see the structure of the customers table.

-- Use PRAGMA to get table information (SQLite-specific)
-- This shows columns, data types, and constraints

PRAGMA table_info(olist_customers_dataset);

Exercise 3: Count Records

The DBMS can quickly count records in a table. Let's see how many orders are in our database.

-- Count total records in the orders table
-- The DBMS optimizes this operation for performance

SELECT 
    'olist_orders_dataset' AS table_name,
    COUNT(*) AS total_records
FROM olist_orders_dataset;

Summary

You now understand the software layer that makes database management possible!

Key Takeaways

DBMS is software that manages databases and handles all the complexity

✅ Core functions include data definition, manipulation, security, integrity, and concurrency control

RDBMS is a specific type of DBMS for relational databases (tables with relationships)

✅ RDBMS systems support ACID properties for reliable transactions

✅ Popular systems include MySQL, PostgreSQL, SQLite, SQL Server, and Oracle

✅ Users interact through CLI, GUI, programming languages, or interactive platforms

DBMS vs RDBMS Quick Reference

TermMeaning
DBMSAny database management software
RDBMSDBMS specifically for relational (table-based) databases

Next Up

Continue to Types of Databases to learn about the different categories of databases beyond relational systems!