Skip to content

Commit 775fd72

Browse files
Update README.md
1 parent e277880 commit 775fd72

File tree

1 file changed

+57
-104
lines changed

1 file changed

+57
-104
lines changed

README.md

Lines changed: 57 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,108 @@
1-
# SQL, JDBC & MongoDB Tasks
1+
# SQL + JDBC + MongoDB Tasks
22

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.
3+
![Java Build](https://github.com/TheComputationalCore/sql-jdbc-mongodb-tasks/actions/workflows/java-build.yml/badge.svg)
4+
![Markdown Lint](https://github.com/TheComputationalCore/sql-jdbc-mongodb-tasks/actions/workflows/markdown-lint.yml/badge.svg)
5+
![Prettier Format](https://github.com/TheComputationalCore/sql-jdbc-mongodb-tasks/actions/workflows/prettier-format.yml/badge.svg)
6+
![License](https://img.shields.io/badge/License-MIT-green.svg)
7+
8+
A clean, structured repository containing SQL queries, JDBC database operations, and MongoDB query tasks.
9+
This project demonstrates backend fundamentals using **MySQL**, **Java JDBC**, and **MongoDB**.
510

611
---
712

813
## 📁 Project Structure
914

1015
```
11-
.
12-
├── 1.sql
13-
├── MyDatabaseConnection.java
14-
├── QuestionTwo.java
15-
├── screenshots/
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
26-
└── README.md
16+
sql-jdbc-mongodb-tasks/
17+
│── .github/workflows/ # CI workflows (Java build, linting, formatting)
18+
│── screenshots/ # Visual outputs of SQL & Java executions
19+
│── 1.sql # SQL queries for Employee table
20+
│── MyDatabaseConnection.java
21+
│── QuestionTwo.java
22+
│── MONGODB TASK.docx
23+
│── README.md
24+
│── LICENSE
2725
```
2826

2927
---
3028

31-
## 📝 Task 1 — SQL Queries on Employee Table
32-
33-
The `Empl` table contains employee information such as:
34-
35-
- `EName` — Employee Name
36-
- `Sal` — Salary
37-
- `Comm` — Commission
38-
- `Job` — Job Title
39-
- `Mgr` — Manager ID
40-
41-
### ✔ Screenshots
42-
43-
#### 🔹 Full Table View
44-
45-
![1.1](screenshots/1.1.png)
46-
47-
#### 🔹 Employees with salary ≥ 2200
48-
49-
![1.2](screenshots/1.2.png)
29+
## 🧩 Task 1 — SQL Queries (MySQL)
5030

51-
#### 🔹 Employees with NULL commission
31+
These SQL queries run on the `Empl` table to explore filtering, pattern matching, and NULL checks.
5232

53-
![1.3](screenshots/1.3.png)
33+
### 📸 Screenshots
34+
#### Full Table Output
35+
![Full Table](screenshots/1.1.png)
5436

55-
#### 🔹 Salary NOT between 2500 and 4000
37+
#### Salary ≥ 2200
38+
![Salary ≥ 2200](screenshots/1.2.png)
5639

57-
![1.4](screenshots/1.4.png)
40+
#### Employees With NULL Commission
41+
![NULL commission](screenshots/1.3.png)
5842

59-
#### 🔹 Employees without a manager
43+
#### Salary NOT Between 2500 and 4000
44+
![NOT between](screenshots/1.4.png)
6045

61-
![1.5](screenshots/1.5.png)
46+
#### No Manager (mgr IS NULL)
47+
![No manager](screenshots/1.5.png)
6248

63-
#### 🔹 Employees whose 3rd letter is 'A'
49+
#### Name with 'A' as 3rd Letter
50+
![Third letter A](screenshots/1.6.png)
6451

65-
![1.6](screenshots/1.6.png)
52+
#### Name Ending with 'T'
53+
![Ends with T](screenshots/1.7.png)
6654

67-
#### 🔹 Employees whose name ends with 'T'
68-
69-
![1.7](screenshots/1.7.png)
70-
71-
#### 🔹 SQL Script Summary
72-
73-
![1.8](screenshots/1.8.png)
55+
#### Final SQL Script
56+
![SQL Script](screenshots/1.8.png)
7457

7558
---
7659

77-
## 🧪 Task 2 — JDBC Employee Insert Program
78-
79-
Java program using JDBC to:
60+
## 🧩 Task 2 — JDBC Program (Java)
8061

81-
- Connect to MySQL
82-
- Create `employee` table
83-
- Insert 5 employee records
62+
`MyDatabaseConnection.java`
63+
Establishes connection to MySQL using JDBC.
64+
![JDBC Connection](screenshots/2.5.png)
8465

85-
### ✔ Successful Connection Screenshot
66+
**Output:**
67+
![Connection Created](screenshots/2.6.png)
8668

87-
![2.5](screenshots/2.5.png)
88-
89-
### ✔ Inserted Records Verification
90-
91-
![2.6](screenshots/2.6.png)
69+
`QuestionTwo.java`
70+
Creates a table and inserts employee records.
71+
![Inserted Data](screenshots/2.5.png)
9272

9373
---
9474

95-
## 🍃 Task 3 — MongoDB Queries (Product Dataset)
75+
## 🧩 Task 3 — MongoDB Queries
9676

97-
Queries performed:
77+
Queries performed on `product.json` dataset (Day 1).
9878

99-
1. Retrieve all products
100-
2. Find products priced between 400 and 800
101-
3. Find products NOT priced between 400 and 600
102-
4. First 4 products with price > 500
103-
5. Retrieve product_name & product_material
104-
6. Find product with `row_id = 10`
105-
7. Delete products priced at 28
106-
8. And more…
79+
Includes filters, ranges, projections, and delete operations.
80+
File: `MONGODB TASK.docx`
10781

10882
---
10983

110-
## ▶ How to Run
84+
## How to Run
11185

11286
### **SQL**
113-
114-
```bash
87+
```sql
11588
mysql -u root -p
89+
use tasks;
11690
source 1.sql;
11791
```
11892

119-
### **JDBC**
120-
93+
### **Java**
12194
```bash
122-
javac MyDatabaseConnection.java
123-
javac QuestionTwo.java
95+
javac MyDatabaseConnection.java QuestionTwo.java
96+
java MyDatabaseConnection
12497
java QuestionTwo
12598
```
12699

127100
### **MongoDB**
128-
129101
```bash
130102
mongoimport --db mydatabase --collection products --file product.json --jsonArray
131103
```
132104

133105
---
134106

135-
## ✔ Requirements
136-
137-
- MySQL 5.7+ / MariaDB
138-
- Java 8+
139-
- MySQL Connector/J
140-
- MongoDB 4.0+
141-
142-
---
143-
144-
## 📸 Screenshots Folder
145-
146-
All images included are sanitized and safe for public usage.
147-
Sensitive screenshots (`2.1``2.4`) were removed.
148-
149-
---
150-
151-
## 📌 Author
152-
153-
**TheComputationalCore**
154-
155-
---
107+
## 📜 License
108+
This project is licensed under the **MIT License**.

0 commit comments

Comments
 (0)