Skip to content

Commit c8e3580

Browse files
Update README.md
1 parent 8a9500b commit c8e3580

File tree

1 file changed

+84
-53
lines changed

1 file changed

+84
-53
lines changed

README.md

Lines changed: 84 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# 📘 Database Tasks — SQL, JDBC, and MongoDB Exercises
1+
# SQL, JDBC & MongoDB Tasks
22

3-
![License](https://img.shields.io/badge/License-MIT-green.svg)
4-
![Java](https://img.shields.io/badge/Java-100%25-orange)
5-
![SQL](https://img.shields.io/badge/SQL-MySQL-blue)
6-
![MongoDB](https://img.shields.io/badge/MongoDB-Queries-green)
7-
8-
This repository contains completed solutions for **SQL**, **JDBC**, and **MongoDB** tasks.
3+
A clean, structured collection of database tasks involving **MySQL SQL queries**, **Java JDBC operations**, and **MongoDB queries**.
4+
This repository also includes screenshots demonstrating query outputs and program execution.
95

106
---
117

@@ -16,96 +12,131 @@ This repository contains completed solutions for **SQL**, **JDBC**, and **MongoD
1612
├── 1.sql
1713
├── MyDatabaseConnection.java
1814
├── QuestionTwo.java
19-
├── MONGODB TASK.docx
2015
├── screenshots/
21-
│ ├── Screenshot1.png
22-
│ ├── Screenshot2.png
23-
│ └── Screenshot3.png
16+
│ ├── 1.1.png
17+
│ ├── 1.2.png
18+
│ ├── 1.3.png
19+
│ ├── 1.4.png
20+
│ ├── 1.5.png
21+
│ ├── 1.6.png
22+
│ ├── 1.7.png
23+
│ ├── 1.8.png
24+
│ ├── 2.5.png
25+
│ ├── 2.6.png
2426
└── README.md
2527
```
2628

2729
---
2830

29-
## 🧩 Task 1 — SQL Queries (Employee Table)
31+
## 📝 Task 1 — SQL Queries on Employee Table
3032

31-
This task includes SQL operations on the `Empl` table.
33+
The `Empl` table contains employee information such as:
3234

33-
### 🖼 Screenshot — SQL Task
35+
- `EName` — Employee Name
36+
- `Sal` — Salary
37+
- `Comm` — Commission
38+
- `Job` — Job Title
39+
- `Mgr` — Manager ID
3440

35-
![SQL Screenshot](screenshots/Screenshot1.png)
41+
### ✔ Screenshots
3642

37-
### Queries Included
43+
#### 🔹 Full Table View
44+
![1.1](screenshots/1.1.png)
3845

39-
- Employees with salary ≥ 2200
40-
- Employees without commission
41-
- Employees not in 2500–4000 range
42-
- Employees without a manager
43-
- Names with “A” as the third letter
44-
- Names ending with “S”
46+
#### 🔹 Employees with salary ≥ 2200
47+
![1.2](screenshots/1.2.png)
4548

46-
---
49+
#### 🔹 Employees with NULL commission
50+
![1.3](screenshots/1.3.png)
4751

48-
## 🧩 Task 2 — JDBC Employee Data Insertion
52+
#### 🔹 Salary NOT between 2500 and 4000
53+
![1.4](screenshots/1.4.png)
4954

50-
A Java program that:
55+
#### 🔹 Employees without a manager
56+
![1.5](screenshots/1.5.png)
5157

52-
- Creates an `employee` table
53-
- Inserts sample employee records
54-
- Connects to MySQL using JDBC
55-
- Logs success messages
58+
#### 🔹 Employees whose 3rd letter is 'A'
59+
![1.6](screenshots/1.6.png)
5660

57-
### 🖼 Screenshot — JDBC Program
61+
#### 🔹 Employees whose name ends with 'T'
62+
![1.7](screenshots/1.7.png)
5863

59-
![JDBC Screenshot](screenshots/Screenshot2.png)
64+
#### 🔹 SQL Script Summary
65+
![1.8](screenshots/1.8.png)
6066

6167
---
6268

63-
## 🧩 Task 3MongoDB Product Dataset Queries
69+
## 🧪 Task 2JDBC Employee Insert Program
6470

65-
Queries such as:
71+
Java program using JDBC to:
6672

67-
- Retrieve all products
68-
- Price-based filters
69-
- Material and color search
70-
- Deleting items
71-
- Field projection
73+
- Connect to MySQL
74+
- Create `employee` table
75+
- Insert 5 employee records
7276

73-
### 🖼 Screenshot — MongoDB Output
77+
### ✔ Successful Connection Screenshot
78+
![2.5](screenshots/2.5.png)
7479

75-
![MongoDB Screenshot](screenshots/Screenshot3.png)
80+
### ✔ Inserted Records Verification
81+
![2.6](screenshots/2.6.png)
7682

7783
---
7884

79-
## 🛠 How to Run
85+
## 🍃 Task 3 — MongoDB Queries (Product Dataset)
8086

81-
### ▶ SQL
87+
Queries performed:
8288

83-
Open `1.sql` in MySQL Workbench and execute.
89+
1. Retrieve all products
90+
2. Find products priced between 400 and 800
91+
3. Find products NOT priced between 400 and 600
92+
4. First 4 products with price > 500
93+
5. Retrieve product_name & product_material
94+
6. Find product with `row_id = 10`
95+
7. Delete products priced at 28
96+
8. And more…
97+
98+
---
8499

85-
### ▶ JDBC
100+
## ▶ How to Run
101+
102+
### **SQL**
103+
```bash
104+
mysql -u root -p
105+
source 1.sql;
106+
```
86107

108+
### **JDBC**
87109
```bash
110+
javac MyDatabaseConnection.java
88111
javac QuestionTwo.java
89112
java QuestionTwo
90113
```
91114

92-
### ▶ MongoDB
93-
115+
### **MongoDB**
94116
```bash
95117
mongoimport --db mydatabase --collection products --file product.json --jsonArray
96118
```
97119

98120
---
99121

100-
## 📦 Requirements
122+
## Requirements
101123

102-
- MySQL / MariaDB
103-
- JDK 8+
104-
- MongoDB
105-
- MySQL Connector/J
124+
- MySQL 5.7+ / MariaDB
125+
- Java 8+
126+
- MySQL Connector/J
127+
- MongoDB 4.0+
106128

107129
---
108130

109-
## 📜 License
131+
## 📸 Screenshots Folder
132+
133+
All images included are sanitized and safe for public usage.
134+
Sensitive screenshots (`2.1``2.4`) were removed.
135+
136+
---
137+
138+
## 📌 Author
139+
**TheComputationalCore**
140+
141+
---
110142

111-
Licensed under the **MIT License**.

0 commit comments

Comments
 (0)