Skip to content
  • Introduction · DBMS

Introduction

LearnViaNotes @learnvianotes· 5 min read

A Database Management System (DBMS) is a specialized system software designed to store, organize, retrieve, and manipulate data securely. It serves as an abstraction layer between physical storage and application programs or end-users.

File System vs DBMS

DBMS Approach

FeatureDBMS Detail
Data RedundancyMinimized via Normalization. Changes need to be updated in only one place.
Data AbstractionProvides 3 levels of abstraction (physical, conceptual, view). Hides physical storage paths from queries.
ConcurrencyExcellent. Allows thousands of concurrent read/write operations using row-level locking.
Crash RecoveryStrong. Uses Transaction logs (WAL) to Undo uncommitted and Redo committed actions during startup.
SecurityGranular. Access can be restricted down to specific tables, views, or even individual columns.

File System Approach

FeatureFile System Detail
Data RedundancyHigh. Same customer information is duplicated across different department files, leading to updates anomalies.
Data AbstractionNone. Application code must know the physical layout (e.g., binary offset, CSV format) of the files to read them.
ConcurrencyPoor. Concurrent modifications are blocked. The operating system locks the entire file, preventing parallel updates.
Crash RecoveryWeak/None. If a crash occurs mid-write, the file gets corrupted. No built-in rollback system.
SecurityBasic. Relies on OS file permissions (read/write/execute). Anyone with read permissions sees all columns.

Primary Types of DBMS Models

Database Languages

DBMS uses specialized languages to define structures, modify rows, and manage access privileges:

Language TypeDescriptionKey Commands & SQL Examples
DDL (Data Definition)Defines and modifies the physical database schema and structures.CREATE, DROP, ALTER, TRUNCATE, RENAME
CREATE TABLE Users (Id INT PRIMARY KEY, Name VARCHAR(50));
DML (Data Manipulation)Manipulates data records inside existing tables.INSERT, UPDATE, DELETE
UPDATE Users SET Name = 'Alice' WHERE Id = 1;
DQL (Data Query)Retrieves data records from the database.SELECT
SELECT * FROM Users WHERE Id = 1;
TCL (Transaction Control)Manages the execution flow of database transactions.COMMIT, ROLLBACK, SAVEPOINT
ROLLBACK TO SAVEPOINT sv1;
DCL (Data Control)Grants and revokes user access permissions.GRANT, REVOKE
GRANT SELECT ON Users TO DeveloperRole;

DBMS Architectures

Distributed Deployments

Codd's 12 Rules for Relational Databases

Dr. E.F. Codd established 12 rules (numbered 1 through 12, plus Rule 0) that define a true Relational Database Management System (RDBMS):

Rule #Rule NameDescription
Rule 0Foundation RuleThe system must manage databases entirely through its relational capabilities.
Rule 1Information RuleAll data (including metadata) must be represented as values in table columns and rows.
Rule 2Guaranteed Access RuleEvery data item is logically accessible using table name + primary key + column name.
Rule 3Systematic Null TreatmentNulls must represent missing/inapplicable info in a systematic way, distinct from 0 or blank.
Rule 4Dynamic Online CatalogDatabase schema description must be stored in tables queryable using SQL.
Rule 5Comprehensive SublanguageMust support a single language (like SQL) covering schema definition, manipulation, integrity, and transactions.
Rule 6View Updating RuleAll database views that are theoretically updatable must be updatable by the system.
Rule 7High-Level Insert/Update/DeleteMust support multi-row insert, update, and delete statements.
Rule 8Physical Data IndependenceChanges to physical storage structures (disks, file paths) must not affect application code.
Rule 9Logical Data IndependenceChanges to conceptual schemas (splitting tables, adding fields) must not impact view applications.
Rule 10Integrity IndependenceIntegrity constraints (PK, FK) must be stored in catalog metadata, not embedded in application code.
Rule 11Distribution IndependenceThe database must function normally even if data is moved across different physical servers.
Rule 12Nonsubversion RuleLow-level access routes must not bypass schema security or integrity constraints.

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report