1. What is DBMS?
Definition:
A Database Management System (DBMS) is software that helps create, manage, and use
databases.
Purpose / logic:
● Store large amounts of data efficiently
● Enable easy retrieval, update, and management
● Ensure data security, integrity, and consistency
Example:
MySQL, Oracle, SQL Server.
2. Abbreviations (Must Know)
Abbreviation Full Form
DBMS Database Management System
RDBMS Relational Database Management System
SQL Structured Query Language
DDL Data Definition Language
DML Data Manipulation Language
DCL Data Control Language
TCL Transaction Control Language
ER Entity-Relationship
ACID Atomicity, Consistency, Isolation, Durability
PK Primary Key
FK Foreign Key
BCNF Boyce-Codd Normal Form
3. Types of DBMS
Type Logic Example
Hierarchical Tree-like IBM IMS
Network Graph-like (many-to-many) IDS
Relational (RDBMS) Tables, relations MySQL, Oracle
Object-Oriented Store objects db4o
Purpose:
Support different data models as per requirements.
4. Database vs DBMS
Database DBMS
Meaning Collection of data Software to manage
databases
Example Student records MySQL
5. RDBMS
Definition:
A DBMS that stores data in tables and uses relations (based on relational model by E.F. Codd).
Purpose:
Support data independence, easy querying with SQL.
Examples:
MySQL, PostgreSQL, SQL Server.
6. SQL (Structured Query Language)
Definition:
Standard language to communicate with RDBMS.
Types:
| Category | Commands | Purpose |
|--|--|--|--|
| DDL | CREATE, ALTER, DROP | Define structure |
| DML | SELECT, INSERT, UPDATE, DELETE | Manipulate data |
| DCL | GRANT, REVOKE | Control access |
| TCL | COMMIT, ROLLBACK, SAVEPOINT | Manage transactions |
7. ER Model (Entity-Relationship Model)
Definition:
Visual diagram that shows entities, attributes, and relationships.
Purpose:
Help design logical database structure.
Example:
Entity: Student
Attributes: RollNo, Name
Relationship: Student “enrolls in” Course.
8. Keys
Key Purpose Example
Primary Key Unique identifier, cannot be NULL StudentID
Foreign Key Links to PK in another table CourseID in Enroll table
Candidate Key All possible PKs Email, StudentID
Composite Key Multiple attributes combined (OrderID, ProductID)
9. Normalization
Definition:
Process of organizing data to remove redundancy and improve integrity.
Purpose:
Avoid anomalies (update, insert, delete).
Forms:
Normal Form Logic Example
1NF Atomic values Remove repeating groups
2NF Remove partial dependency PK with composite key
3NF Remove transitive Non-key attribute depends on
dependency non-key
BCNF Stronger version of 3NF Every determinant is a candidate key
10. Denormalization
Definition:
Adding redundancy intentionally for performance.
Purpose:
Speed up complex queries.
Example:
Store total price in Orders table instead of calculating every time.
11. ACID Properties
Property Meaning
Atomicity All or none transactions
Consistenc DB moves from valid state to valid state
y
Isolation Transactions don’t affect each other
Durability Once committed, data stays
Purpose:
Ensure reliable transactions.
12. Transactions
Definition:
Sequence of operations treated as a single unit.
Example:
Transfer ₹100 from Account A to B:
● Debit A
● Credit B
Purpose:
Maintain database integrity.
13. Concurrency Control
Definition:
Managing multiple transactions at once.
Techniques:
Type Logic
Lock-based Prevent others from accessing
Timestamp-base Order transactions by
d timestamp
Purpose:
Avoid problems: lost update, dirty read.
14. Indexing
Definition:
Data structure (e.g., B-tree) to speed up search.
Purpose:
Faster SELECT queries.
Example:
Index on CustomerID.
15. Views
Definition:
Virtual table from SELECT query.
Purpose:
Simplify queries, enhance security.
Example:
View showing only customer names and emails.
16. Joins
Type Logic Example
INNER JOIN Common rows in both tables Customers + Orders
LEFT JOIN All rows left, matching right All customers, even if no order
RIGHT JOIN Opposite of left
FULL OUTER JOIN All rows both tables
Purpose:
Combine data.
17. Data Models
Model Logic
Conceptua High-level, user view (ER)
l
Logical Implementation independent
Physical Actual storage details
18. File Organization (Storage)
Type Logic Example
Sequentia Read in order Payroll
l
Indexed Use index Book index
Hashing Direct location StudentID hashed to
address
19. Data Integrity
Definition:
Ensuring accuracy and consistency of data.
Types:
Type Logic
Entity Integrity PK not null
Referential Integrity FK must match PK
20. Database Security
Purpose:
Protect data from unauthorized access.
Techniques:
User accounts, views, encryption, backups.
21. Differences (Quick table)
DBMS RDBMS
Data storage Files Tables
Relations No Yes
Normalization No Yes
Example XML DB MySQL
DELETE TRUNCATE
Rollback Possible Not possible
Log Logged Minimal log
Row by row Yes No
CHAR VARCHAR
Fixed length Yes No
Space More Less
usage
22. Big Data & NoSQL (Modern)
Definition:
NoSQL: Databases that store unstructured / semi-structured data.
Types:
Type Example
Key-Value Redis
Document MongoDB
Column Cassandr
a
Graph Neo4j
Purpose:
Handle huge, flexible, fast-changing data.
To remember easily:
● DBMS → manage data
● SQL → language to talk to DB
● ACID → reliable transactions
● PK → unique; FK → link
● ER → design
● Normalization → remove redundancy