diff --git a/README.md b/README.md index 4d6e580..5448fc1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,154 @@ -# sql-queries-and-dbms -A complete collection of **SQL queries** and **DBMS concepts** for beginners to advanced learners. This repository is designed to help students, developers, and interview aspirants master **Database Management Systems (DBMS)** and **SQL** efficiently. +# 🗄️ SQL Queries and DBMS + +A complete collection of **SQL queries** and **DBMS concepts** for beginners to advanced learners. +This repository is designed to help students, developers, and interview aspirants master **Database Management Systems (DBMS)** and **SQL** efficiently. + +--- + +## 📌 Features + +- 📚 Well-structured DBMS notes +- 🧠 Important SQL queries (basic to advanced) +- ⚡ Real-world examples +- 🎯 Interview-focused questions +- 📝 Easy-to-understand explanations + +--- + +## 📂 Repository Structure +sql-queries-and-dbms/ +│ +├── basics/ +│ ├── create_database.sql +│ ├── create_table.sql +│ └── insert_data.sql +│ +├── queries/ +│ ├── select_queries.sql +│ ├── where_clause.sql +│ ├── joins.sql +│ ├── group_by.sql +│ └── subqueries.sql +│ +├── advanced/ +│ ├── views.sql +│ ├── indexes.sql +│ ├── triggers.sql +│ └── stored_procedures.sql +│ +└── notes/ +└── dbms_theory.md + +--- + +## 🧑‍💻 Topics Covered + +### 🔹 DBMS Concepts +- Database & DBMS Introduction +- ER Model +- Normalization +- Keys (Primary, Foreign, Candidate) +- Transactions & ACID Properties +- Indexing + +### 🔹 SQL Commands + +#### 📌 DDL (Data Definition Language) +- `CREATE` +- `ALTER` +- `DROP` +- `TRUNCATE` + +#### 📌 DML (Data Manipulation Language) +- `INSERT` +- `UPDATE` +- `DELETE` + +#### 📌 DQL (Data Query Language) +- `SELECT` +- `WHERE` +- `ORDER BY` +- `GROUP BY` +- `HAVING` + +#### 📌 DCL (Data Control Language) +- `GRANT` +- `REVOKE` + +#### 📌 TCL (Transaction Control Language) +- `COMMIT` +- `ROLLBACK` +- `SAVEPOINT` + +--- + +## ⚡ Sample Queries + +```sql +-- Create Table +CREATE TABLE students ( + id INT PRIMARY KEY, + name VARCHAR(50), + age INT +); + +-- Insert Data +INSERT INTO students VALUES (1, 'Rahul', 20); + +-- Select Data +SELECT * FROM students; + +-- Where Clause +SELECT * FROM students WHERE age > 18; + +--- +``` + +## 🚀 How to Use +1. Clone the repository +``` +git clone https://github.com/your-username/sql-queries-and-dbms.git +``` +2. Open SQL files in your preferred DBMS (MySQL, PostgreSQL, etc.) +3. Practice queries and modify them +--- +🛠️ Tools Supported +MySQL +PostgreSQL +SQLite +Oracle +--- +🎯 Who Is This For? +👨‍🎓 Students learning DBMS +💼 Interview preparation +👨‍💻 Beginner to intermediate developers +📊 Anyone interested in databases +--- +🤝 Contributing + +Contributions are welcome! +Feel free to fork this repo and submit a pull request. +--- +⭐ Support + +If you find this repository helpful, please ⭐ star it! +--- +📧 Contact + +Created by Ronit Raj +📌 Feel free to connect and collaborate! +--- +📜 License + +This project is open-source and available under the MIT License. + +--- +``` +If you want next level 🚀 +I can: +- Add **50+ real interview SQL questions** +- Add **mini project (student DB / e-commerce DB)** +- Make this repo **stand out on your resume + LinkedIn** + +Just tell me 👍 +```