Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ CREATE TABLE students (
age INT,
marks INT DEFAULT 0
);
```


## Project Structure

```
├── Task1.java # MySQL Connection Test
├── Task2.java # Read (SELECT) Operation
├── Task3.java # Insert (INSERT) Operation
Expand All @@ -54,10 +58,15 @@ CREATE TABLE students (
├── Main.java # Menu Driven Program
├── Methods.java # CRUD Methods
└── README.md
```

---

## 🔑 MySQL Connection Configuration
String mysqlUrl = "jdbc:mysql://localhost:3306/Student_db";

String username = "root";

String password = "your_password";

🚀 How to Run the Project
Expand All @@ -76,25 +85,30 @@ javac *.java
java Main

📋 CRUD Operations Explained
➕ Insert Data

```sql
-- Insert Data
Comment on lines +88 to +91
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The emoji is separated from the section title. It should be part of a comment line like "-- ➕ Insert Data" for consistency with the other operations in this SQL code block.

Suggested change
```sql
-- Insert Data
```sql
-- ➕ Insert Data

Copilot uses AI. Check for mistakes.
INSERT INTO students VALUES (?, ?, ?);

📖 Read Data
-- 📖 Read Data
SELECT * FROM students;

Update Data
-- Update Data
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The emoji is missing from the comment. This should be "-- ✏ Update Data" to match the formatting pattern and maintain consistency with other operations.

Suggested change
-- Update Data
-- Update Data

Copilot uses AI. Check for mistakes.
UPDATE students SET marks = ? WHERE id = ?;

Delete Data
-- Delete Data
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an extra space before "Delete". This should be "-- ❌ Delete Data" with a single space after the emoji for consistency with the other comment lines.

Suggested change
-- Delete Data
-- Delete Data

Copilot uses AI. Check for mistakes.
DELETE FROM students WHERE id = ?;

🧠 Key JDBC Learnings
## ? is used only for values, not table/column names
## Always use PreparedStatement instead of Statement
## executeQuery() → SELECT
## executeUpdate() → INSERT / UPDATE / DELETE
## \t is for printing, not column names
## Table names should never be in quotes
```

# 🧠 Key JDBC Learnings
- ? is used only for values, not table/column names
- Always use PreparedStatement instead of Statement
- executeQuery() → SELECT
- executeUpdate() → INSERT / UPDATE / DELETE
- `\t` is for printing, not column names
- Table names should never be in quotes

⚠ Common Errors Solved
>SQLSyntaxErrorException
Expand All @@ -103,19 +117,14 @@ DELETE FROM students WHERE id = ?;
>Incorrect column name usage in ResultSet
>Forgetting to set values for ?

🎯 Ideal For
## Ideal For
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section title is missing the emoji that was present in the original. Consider adding "🎯" before "Ideal For" to maintain consistency with other section headers in the document.

Suggested change
## Ideal For
## 🎯 Ideal For

Copilot uses AI. Check for mistakes.
JDBC beginners
College practicals
Viva preparation
Interview fundamentals
Mini Java projects

👨‍💻 Author
Mayur Ughade
Learning Java | JDBC | MySQL





## Author
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section title is missing the emoji that was present in the original. Consider adding "👨‍💻" before "Author" to maintain consistency with other section headers in the document.

Suggested change
## Author
## 👨‍💻 Author

Copilot uses AI. Check for mistakes.
`Mayur Ughade`

Learning Java | JDBC | MySQL