-
Notifications
You must be signed in to change notification settings - Fork 1
Enhance README with features and usage details #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -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; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+87
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix the code block formatting. The 📝 Proposed fix -- Where Clause
SELECT * FROM students WHERE age > 18;
-
----+--- 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| ## 🚀 How to Use | ||||||||||||||||||||||||||||||||||||||||||
| 1. Clone the repository | ||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||
| git clone https://github.com/your-username/sql-queries-and-dbms.git | ||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+109
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace the placeholder with the actual username. Line 110 contains a placeholder 🔧 Proposed fix-1. Clone the repository
-```
-git clone https://github.com/your-username/sql-queries-and-dbms.git
-```
+1. Clone the repository
+```bash
+git clone https://github.com/Ronit049/sql-queries-and-dbms.git
+```🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 109-109: Fenced code blocks should have a language specified (MD040, fenced-code-language) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| 2. Open SQL files in your preferred DBMS (MySQL, PostgreSQL, etc.) | ||||||||||||||||||||||||||||||||||||||||||
| 3. Practice queries and modify them | ||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||
| 🛠️ Tools Supported | ||||||||||||||||||||||||||||||||||||||||||
| MySQL | ||||||||||||||||||||||||||||||||||||||||||
| PostgreSQL | ||||||||||||||||||||||||||||||||||||||||||
| SQLite | ||||||||||||||||||||||||||||||||||||||||||
| Oracle | ||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+115
to
+120
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix heading style and add list formatting. The heading uses inconsistent style (setext underline instead of atx 📋 Proposed fix----
-🛠️ Tools Supported
-MySQL
-PostgreSQL
-SQLite
-Oracle
+
+## 🛠️ Tools Supported
+
+- MySQL
+- PostgreSQL
+- SQLite
+- Oracle
+
---📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 115-115: Heading style (MD003, heading-style) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| 🎯 Who Is This For? | ||||||||||||||||||||||||||||||||||||||||||
| 👨🎓 Students learning DBMS | ||||||||||||||||||||||||||||||||||||||||||
| 💼 Interview preparation | ||||||||||||||||||||||||||||||||||||||||||
| 👨💻 Beginner to intermediate developers | ||||||||||||||||||||||||||||||||||||||||||
| 📊 Anyone interested in databases | ||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+121
to
+126
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix heading style and add list formatting. Similar to the previous section, this heading uses inconsistent style and the list items lack proper markdown bullets. As per static analysis, expected heading style is atx. 📋 Proposed fix----
-🎯 Who Is This For?
-👨🎓 Students learning DBMS
-💼 Interview preparation
-👨💻 Beginner to intermediate developers
-📊 Anyone interested in databases
+
+## 🎯 Who Is This For?
+
+- 👨🎓 Students learning DBMS
+- 💼 Interview preparation
+- 👨💻 Beginner to intermediate developers
+- 📊 Anyone interested in databases
+
---📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 121-121: Heading style (MD003, heading-style) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| 🤝 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. | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+127
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Verify LICENSE file exists for the MIT License claim
if [ -f "LICENSE" ] || [ -f "LICENSE.md" ] || [ -f "LICENSE.txt" ]; then
echo "✓ LICENSE file found"
ls -la LICENSE* 2>/dev/null
else
echo "✗ LICENSE file missing - consider adding one for MIT License claim"
fiRepository: Ronit049/sql-queries-and-dbms Length of output: 150 🏁 Script executed: # Check the exact formatting of lines 127-144 and surrounding context in README.md
sed -n '120,150p' README.md | cat -nRepository: Ronit049/sql-queries-and-dbms Length of output: 916 🏁 Script executed: # Search for all heading patterns in README.md
rg '^#+|^[^#].+\n-{3,}' README.md -A 1 -B 1 | head -100Repository: Ronit049/sql-queries-and-dbms Length of output: 264 🏁 Script executed: # Check heading patterns - find lines with ## or underlines with dashes
head -150 README.md | tail -50Repository: Ronit049/sql-queries-and-dbms Length of output: 1039 🏁 Script executed: # Get the entire README.md to see all heading patterns
wc -l README.mdRepository: Ronit049/sql-queries-and-dbms Length of output: 86 🏁 Script executed: # Get the entire README.md file to analyze heading styles
cat README.mdRepository: Ronit049/sql-queries-and-dbms Length of output: 2835 Fix heading style inconsistencies for consistency. The file uses atx-style headings ( 📋 Proposed fix for heading styles---
+## 🛠️ Tools Supported
-🛠️ Tools Supported
MySQL
PostgreSQL
SQLite
Oracle
+
---
-🎯 Who Is This For?
+## 🎯 Who Is This For?
👨🎓 Students learning DBMS
💼 Interview preparation
👨💻 Beginner to intermediate developers
📊 Anyone interested in databases
+
---
-🤝 Contributing
+## 🤝 Contributing
Contributions are welcome!
Feel free to fork this repo and submit a pull request.
+
---
-⭐ Support
+## ⭐ Support
If you find this repository helpful, please ⭐ star it!
+
---
-📧 Contact
+## 📧 Contact
Created by Ronit Raj
📌 Feel free to connect and collaborate!
+
---
-📜 License
+## 📜 License
This project is open-source and available under the MIT License.🧰 Tools🪛 LanguageTool[style] ~129-~129: Consider using a less common alternative to make your writing sound more unique and professional. (FEEL_FREE_TO_STYLE_ME) [style] ~139-~139: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 1927 characters long) (EN_EXCESSIVE_EXCLAMATION) 🪛 markdownlint-cli2 (0.21.0)[warning] 129-129: Heading style (MD003, heading-style) [warning] 134-134: Heading style (MD003, heading-style) [warning] 138-138: Heading style (MD003, heading-style) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||
| 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 👍 | ||||||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+145
to
+154
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unnecessary code fence wrapper. Lines 146-154 are wrapped in a code block without a specified language. This content is a call-to-action message and should be formatted as regular markdown rather than being enclosed in code fences for better visual presentation. 🎨 Proposed fix ---
-```
-If you want next level 🚀
+
+## 🚀 Take It to the 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 👍
-```📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 146-146: Fenced code blocks should have a language specified (MD040, fenced-code-language) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Ronit049/sql-queries-and-dbms
Length of output: 625
Remove or update the documented directory structure—none of the listed directories and SQL files exist in the repository.
The repository structure section documents 4 directories and 13 SQL files that do not exist in the codebase. Either add the documented files and directories or update the README to match the actual repository structure.
🤖 Prompt for AI Agents