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
Tuple Relational Calculus (TRC) kya hota hai?
Tuple Relational Calculus (TRC) ek non-procedural query language hai DBMS mein.
Iska matlab hai ki hum ye batate hain ki hume kya chahiye, kaise lana hai ye nahi batate.
TRC mein hum tuples (rows) ko use karke batate hain ki kaunse condition wale rows hume result mein chahiye.
General Syntax (Structure)
{ T | CONDITION(T) }
Yahaan:
-
-> Tek tuple variable hai (jaise ek placeholder for row). -
-> CONDITION(T)ek logical condition hai jo true honi chahiye taaki tuple result mein aaye.
Example Table: Student
| RollNo | Name | Age |
|---|---|---|
| 1 | Alice | 18 |
| 2 | Bob | 20 |
| 3 | Charlie | 19 |
Example Queries (TRC mein)
Query 1: Sabhi students jinki age > 18 hai
{ S | Student(S) AND S.Age > 18 }
Isme:
-
Sek row ko represent karta hai. -
Student(S)ka matlab haiSStudent table ka row hai. -
S.Age > 18condition hai.
Output:
{ (2, Bob, 20), (3, Charlie, 19) }
Query 2: Sirf un students ke naam jinki age 18 hai
{ S.Name | Student(S) AND S.Age = 18 }
Isme:
-
Yahaan hum sirf Name chahte hain un students ka jinki age 18 hai.
Output:
{ "Alice" }
Important Baatein
-
-> TRC logic par based hai.
-
-> Ye declarative hai: hum batate hain kya chahiye, kaise chahiye nahi.
-
-> Mostly theory mein use hota hai, real-world mein SQL zyada popular hai.
SQL aur TRC mein Difference:
| Feature | TRC | SQL |
|---|---|---|
| Type | Non-Procedural (Declarative) | Declarative |
| Syntax Style | Tuple-based | Column/Table-based |
| Kya define karta? | Condition for result tuples | Columns and how to retrieve |
TRC vs DRC
| TRC (Tuple Relational Calculus) | DRC (Domain Relational Calculus) |
|---|---|
| Tuple (poori row) par kaam karta hai | Domains (columns) par kaam karta hai |
Example: S.Age > 18 |
Example: `<Name, Age> |