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
Introduction to SQL
SQL kya hai?
SQL (Structured Query Language) ek standard language hai jo aapko database se baat karne mein help karti hai. Iska use hum database ke andar:
-
Data insert karne
-
Data retrieve (nikalne)
-
Data update (badalne)
-
Data delete (hatane)
mein karte hain.
Simple shabdon mein: SQL ek language hai jo database se kaam karne ke liye use hoti hai.
SQL ka use kyun hota hai?
Har company, college ya organization ke paas bahut saari data hoti hai — jaise student records, employee data, etc.
In data ko manage karne ke liye SQL ka use hota hai.
SQL se hum:
-
Naya data dalte hain (INSERT)
-
Purana data dekhte hain (SELECT)
-
Data update karte hain (UPDATE)
-
Data delete karte hain (DELETE)
Basic SQL Commands
Maan lo humare paas ek Student
naam ka table hai:
StudentID | Name | Age |
---|---|---|
101 | Riya | 20 |
102 | Aman | 21 |
1. SELECT – Data dekhne ke liye
SELECT * FROM Student;
Output: Saare students ka data show karega.
2. INSERT – Naya student add karne ke liye
INSERT INTO Student (StudentID, Name, Age)
VALUES (103, 'Nisha', 22);
3. UPDATE – Kisi ka age change karne ke liye
UPDATE Student
SET Age = 23
WHERE StudentID = 103;
4. DELETE – Data delete karne ke liye
DELETE FROM Student
WHERE StudentID = 103;
SQL Commands ke Types
SQL commands 5 categories mein divide hoti hain:
Type | Full Form | Kaam kya hai | Examples |
---|---|---|---|
DDL | Data Definition Language | Table banata ya modify karta hai | CREATE , ALTER , DROP |
DML | Data Manipulation Language | Table ke data ke saath kaam karta hai | SELECT , INSERT , UPDATE , DELETE |
DCL | Data Control Language | Access dena ya lena | GRANT , REVOKE |
TCL | Transaction Control Language | Transactions handle karta hai | COMMIT , ROLLBACK |
DQL | Data Query Language | Sirf data ko query karna | SELECT |
DDL ka Example:
CREATE TABLE Student (
StudentID INT,
Name VARCHAR(50),
Age INT
);
Ye command ek naya table banata hai jiska naam Student
hai.
SQL ke Benefits (Fayde)
-
Asaan – Syntax simple hota hai.
-
Standard Language – Har RDBMS (MySQL, Oracle) mein use hota hai.
-
Powerful – Badi databases ko easily handle karta hai.
-
Flexible – Alag-alag types ke data ke saath kaam karta hai.
-
Secure – Access control aur permission de sakta hai.
Real-Life Example:
Aapke college mein ek database hai jisme students ka data store hai.
-
18 se upar ke students dekhne ke liye:
SELECT Name FROM Student WHERE Age > 18;
-
Naya student add karne ke liye:
INSERT INTO Student VALUES (105, 'Ankit', 19);
-
Graduate ho chuke students delete karne ke liye:
DELETE FROM Student WHERE Age > 22;
Summary Table
Feature | Explanation |
---|---|
SQL | Database se baat karne wali language |
Basic Commands | SELECT, INSERT, UPDATE, DELETE |
Command Types | DDL, DML, DCL, TCL, DQL |
Use | Data store, update, delete aur query karne ke liye |
Benefits | Easy, fast, secure, standard |