DBMS
DBMS Part-1
- DBMS Introduction
- DBMS Architecture
- Database Approach vs Traditional File System
- Advantages of DBMS
- Data Models in DBMS
- Schemas in DBMS
- Instances in DBMS
- Data Independence in DBMS
- Database Languages in DBMS
- Interfaces in DBMS
- Structure of DBMS
- Functions of DBA and Designer
- Entities and Attributes in DBMS
- ER Diagram in DBMS
- Generalization, Specialization and Aggregation in DBMS
- Converting ER Diagram to Tables in DBMS
- Difference between Object Oriented, Network and Relational Data Models
DBMS Part-2
- Relational Data Model in DBMS
- Keys in DBMS
- SQL Introduction
- DDL(Data Definition Language)
- DML(Data Manipulation Language)
- Integrity Constraints in DBMS
- Complex SQL Queries
- Joins in DBMS
- Indexing in DBMS
- Triggers in DBMS
- Assertions in DBMS
- Relational Algebra in DBMS
- Tuple Relational Calculus in DBMS
- Domain Relational Calculus in DBMS
DBMS Part-3
- Introduction to Normalization in DBMS
- Normal Forms in DBMS
- Functional Dependency in DBMS
- Decomposition in DBMS
- Dependency Preserving Decomposition in DBMS
- Lossless Join Decomposition in DBMS
- Problems with Null Values and Dangling Tuples
- Multivalued Dependency in DBMS
- Query Optimization in DBMS
- Algorithms for Select, Project and Join Operations in DBMS
- Query Optimization Methods in DBMS
DBMS Part-4
- Transactions in DBMS
- Serializability in DBMS
- Recoverability in DBMS
- Recovery Techniques in DBMS
- Log Based Recovery in DBMS
- Checkpoint in DBMS
- Deadlock in DBMS
- Concurrency Control in DBMS
- Lock Based Protocol in DBMS
- Timestamp Based Protocol in DBMS
- Validation Based Protocol in DBMS
- Multiple Granularity in DBMS
- Multi-Version Concurrency Control(MVCC) in DBMS
- Recovery with Concurrent Transactions in DBMS
DBMS Part-5
Checkpoint in DBMS
Checkpoint kya hota hai DBMS me?
Checkpoint ka matlab hota hai – ek aisa point jahan tak system ka data safe hai, aur agar system crash ho jaaye, toh uss point se recovery shuru ho sakti hai.
Jaise aap game khel rahe ho aur ek checkpoint par game save hoti hai, toh agar game crash ho gaya toh aapko poora game shuru se nahi khelna padta — balki checkpoint se shuru kar sakte ho.
DBMS me bhi same concept hota hai:
Checkpoint ek aisa process hai jisme DBMS apne current data ko disk pe save karta hai, taaki agar system crash ho jaye toh us point se jaldi aur sahi recovery ho sake.
Checkpoint ki zarurat kyun hoti hai?
Maan lo system me kai transactions chal rahe hain (T1, T2, T3…).
Achanak power chali gayi ya system crash ho gaya
Agar checkpoint nahi hota:
-
DBMS ko poora transaction log shuru se dekhna padega
-
Har ek transaction check karni padegi
-
Time aur resources zyada lagenge
Agar checkpoint hota hai:
-
DBMS directly us safe point se recovery start kar sakta hai
-
Sirf unhi transactions ko check karega jo uske baad aaye the
-
Recovery fast aur efficient hoti hai
Checkpoint kaise kaam karta hai?
Checkpoint ke waqt DBMS yeh kaam karta hai:
-
Memory me jo data change hua hai (dirty pages), use disk pe write karta hai
-
Ek checkpoint record log file me likhta hai — jisme batata hai kaunse transactions us waqt active hain
Example samajhte hain
Maan lo 5 transactions chal rahe hain: T1, T2, T3, T4, T5
-
T1 aur T2 complete ho chuke hain
-
T3 aur T4 abhi chal rahe hain
-
System ne yahan par ek checkpoint le liya
Checkpoint record likha: “Checkpoint taken. Active Transactions: T3, T4”
Agar uske baad system crash ho gaya:
-
T1, T2 ko ignore kar sakte hain (kyunki already committed hain)
-
Sirf T3, T4 ko check karna hai — complete huye ya nahi
-
Jaldi recovery possible hai!
Checkpoint Types
1. Coordinated Checkpointing
-
Sabhi processes ek saath checkpoint lete hain
-
Simple but thoda system pause hota hai
2. Uncoordinated Checkpointing
-
Har process apne hisaab se checkpoint leti hai
-
Fast, but recovery complicated ho sakti hai
Checkpoint ke baad kya hota hai recovery me?
Maan lo log file me likha hai:
START T1
WRITE T1 X = 10
COMMIT T1
START T2
WRITE T2 Y = 20
CHECKPOINT (T2 active)
WRITE T2 Z = 30
COMMIT T2
CRASH
Recovery:
-
DBMS dekh ke bolega: “Oh! Checkpoint ke baad T2 active tha”
-
T2 ko REDO karega agar committed hai
-
T1 ko chhodega kyunki woh pehle se safe hai
Checkpoint ke Advantages
| Advantage | Detail |
|---|---|
| Fast Recovery | Crash ke baad jaldi recovery hoti hai |
| Kam Overhead | Pura log scan nahi karna padta |
| Disk use kam | Sirf zarurat ke data ko hi use karta hai |
| Reliable | System regularly safe state me rehta hai |
Checkpoint ke Disadvantages
| Disadvantage | Detail |
|---|---|
| Thoda Pause | Kabhi-kabhi system ko thodi der ke liye stop karna padta hai |
| Complex | Proper implementation chahiye |
Kab Checkpoint Liya Jata Hai?
-
Har kuch minute me (jaise 5 min)
-
Jab log file kaafi badi ho jaye
-
Jab system shutdown ho raha ho
-
Jab memory buffer full ho jaye
Conclusion (Summary)
-
-> Checkpoint ek “save game” jaisa concept hai DBMS me
-
-> Recovery process me time bachaata hai
-
-> Ye ensure karta hai ki system ek consistent state me rahe
-
-> Modern DBMS systems regular interval par checkpoints lete hain