Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

Final Microproject Java

The document outlines a micro-project titled 'Program to perform Insert, Update, Delete operation using database' submitted by students for their Java Programming course. It includes details about the project aim, methodology, action plan, and the resources required, as well as the source code for the program. The project aims to develop a Java application for managing employee data in a database using JDBC for CRUD operations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Final Microproject Java

The document outlines a micro-project titled 'Program to perform Insert, Update, Delete operation using database' submitted by students for their Java Programming course. It includes details about the project aim, methodology, action plan, and the resources required, as well as the source code for the program. The project aims to develop a Java application for managing employee data in a database using JDBC for CRUD operations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Program to perform Insert,

Update, Delete operation


using database
Submitted in fulfillment of the requirements of
micro-project

Java Programming

By

“Manas Patil”
“Shravni Patil”
“Sudeep Patil”
“Rohan Rajage”

ROLL NO:-45,46,47,48

ENROLLMEN
NO:-
23112120333,
23112120334,
23112120335,
23112120336

SUBJECT INCHARGE
Mrs. Smita Kuldiwar
Computer Engineering Department

Academic Year 2024-2025


CERTIFICATE
This is to certify that the microproject

“Program to perform Insert,


Update, Delete operation
using database”
is done by

“Manas Patil”
“Shravni Patil”
“Sudeep Patil”
“Rohan Rajage”

is submitted for

“Java Programming”
for the diploma in Computer Engineering to the

Maharashtra State Board of Technical Education,


Mumbai (Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)

Subject Incharge Head of Department

(Mrs.Smita Kuldiwar) (Mrs.Smita Kuldiwar)


Program to perform Insert,
Update, Delete operation
using database
Submitted in fulfillment of the requirements

of micro-project

Java Programming

By

Roll No Name Enrollment Process and Individual Total(10)


No product Presentation/
assessment(6 work(4
Marks) marks)
Manas 23112120333
45 Patil

Shravni 23112120334
46 Patil

Sudeep 23112120335
47 Patil

Rohan 23112120336
48 Rajage

SUBJECT INCHARGE
Mrs. Smita Kuldiwar
Computer Engineering Department

Academic Year 2024-2025


COMPUTER ENGINEERING DEPARTMENT
VISION AND MISSION OF THE PROGRAMME

Vision: -
To provide technically competent and skilled diploma computer engineers
to fulfill the needs of industry and society.
Mission: -
M1:- To provide industry oriented quality education and training.
M2:- To impart and inculcate theoretical and practical knowledge.
M3:- To provide interpersonal skills and social ethics.
COMPUTER ENGINEERING DEPARTMENT
PROGRAMME OUTCOMES

PO1: Basic and Discipline specific knowledge: Apply knowledge of basic


mathematics, science and engineering fundamentals and engineering specialization to solve
the engineering problems.

PO2: Problem analysis: Identify and analyze well-defined engineering problems


using codified standard methods.

PO3: Design/ Development of solutions: Design solutions for well-defined


technical problems and assist with the design of systems components or processes to
meet specified needs.

PO4: Engineering Tools, Experimentation and Testing: Apply modern


engineering tools and appropriate technique to conduct standard tests and measurements.

PO5: Engineering practices for society, sustainability and environment:


Apply appropriate technology in context of society, sustainability, environment and
ethical practices

PO6: Project Management: Use engineering management principles individually, as


a team member or a leader to manage projects and effectively communicate about well-
defined engineering activities.

PO7: Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes
COMPUTER ENGINEERING DEPARTMENT
PROGRAMME EDUCATIONAL OBJECTIVES
PEO1: Provide socially responsible, environment friendly solutions to
Computer engineering related broad-based problems adapting professional ethics.

PEO2: Adapt state-of-the-art Computer engineering broad-based technologies to work


in multidisciplinary work environments.

PEO3: Solve broad-based problems individually and as a team member


communicating effectively in the world of work.

PROGRAMME SPECIFIC OUTCOMES


PSO1: Computer Software and Hardware Usage: Use state-of-the-art technologies
for operation and application of computer software and hardware.

PSO2: Computer Engineering Maintenance: Maintain computer engineering


related software and hardware systems.
Program to perform Insert,
Update, Delete operation
using database
Aim
Develop a Program for Insert, Update, Delete information using Database on Employee table

Course Outcomes
1. Develop programs using GUI Framework.
2. Handle events of AWT and Swings components.
3. Develop programs to handle events in Java programming.

Proposed Methodology
● First, Search the topic for which you want to make a project, and then propose it to the
Subject In charge.
● After finalizing the topic, start gathering the information about your project.
● For Program Execution, write the source code of your program in any suitable IDE.
● Recheck the program with the subject in charge.
● Now, it’s time to make a report of your Selected Project.

Action Plan
Sr. Detail of activity Plan Start Date Plan Finish Date
No.

1. Searching of Topic 04-01-2025 06-01-2025

2. Gathering information 09-02-2025 13-02-2025

3. Execution of Program 15-02-2025 22-02-2025

4. Report Making 05-03-2025 12-03-2025

Subject In-charge
(Mrs.Smita Kuldiwar)
Program to perform Insert,
Update, Delete operation
using database

Rationale
Java technology is widely used for web application development.Based on the object oriented
concepts and core java concepts, this course will equip the students with the required knowledge and
skill of object oriented programming approach needed for the development of robust, powerful web
applications.Through this course students will get hands-on experience on GUI Technologies viz.
AWT and swings, event handling mechanisms and network programming.The course also gives
coverage to various web applications aspects like Database Interaction,server side components and
servlets.

Literature
JDBC (Java Database Connectivity) is a fundamental API for database interaction in Java
applications, enabling seamless CRUD operations. White et al. (2020) highlighted its efficiency in
direct SQL execution, while Singh & Sharma (2019) compared JDBC with ORM frameworks, finding
JDBC faster for basic queries. Kumar et al. (2021) emphasized security concerns, advocating for
SQL injection prevention and secure connection handling in Java-based database systems.
Actual Methodology Followed
Topic Work Data Work Done
Done By

1. Searching (Program to perform Insert, Sudeep Patil


of topic Update, Delete operation
using database)

2. Gathering of (Rationale, Aim, Applications, etc.) Rohan


Information Rajage

3. Execution 1. Download MySQL. Manas


of Program 2. Install MySQL. Patil
3. Run the program.
4. Get output.

4. Report Finalization of report Shravni Patil


Making

Resources Required
Sr. Name of Resources Specification Qty. Remark
No.

1. Computer Intel i3, 4GB RAM or above 1 -

2. MS-Word Office 2007 or above 1 -

3. MySQL Database Management 1 -

4. JDK Java Development Kit(23) 1

Source Code

import java.sql.*;

import java.util.Scanner;

class EmployeeD{

private static final String URL = "jdbc:mysql://localhost:3306/EmployeeD";

private static final String USER = "root";

private static final String PASSWORD = "manp140040@";

public static void main(String args[]) {

try (Connection conn = DriverManager.getConnection(URL, USER, PASSWORD);

Scanner scanner = new Scanner(System.in)) {

while (true) {
System.out.println("\n1. Insert Employee");

System.out.println("2. Update Employee");

System.out.println("3. Delete Employee");

System.out.println("4. Exit");

System.out.print("Enter choice: ");

int choice = scanner.nextInt();

switch (choice) {

case 1:

insertEmployee(conn, scanner);

break;

case 2:

updateEmployee(conn, scanner);

break;

case 3:

deleteEmployee(conn, scanner);

break;

case 4:

System.out.println("Exiting...");

return;
default:

System.out.println("Invalid choice! Try again.");

} catch (SQLException e) {

e.printStackTrace();

private static void insertEmployee(Connection conn, Scanner scanner) throws SQLException {

System.out.print("Enter Name: ");

String name = scanner.next();

System.out.print("Enter Salary: ");

double salary = scanner.nextDouble();

String sql = "INSERT INTO Employee (name, salary) VALUES (?, ?)";

try (PreparedStatement stmt = conn.prepareStatement(sql)) {

stmt.setString(1, name);

stmt.setDouble(2, salary);

stmt.executeUpdate();
System.out.println("Employee added successfully!");

private static void updateEmployee(Connection conn, Scanner scanner) throws SQLException {

System.out.print("Enter Employee ID to update: ");

int id = scanner.nextInt();

System.out.print("Enter New Salary: ");

double salary = scanner.nextDouble();

String sql = "UPDATE Employee SET salary = ? WHERE id = ?";

try (PreparedStatement stmt = conn.prepareStatement(sql)) {

stmt.setDouble(1, salary);

stmt.setInt(2, id);

int rows = stmt.executeUpdate();

if (rows > 0)

System.out.println("Employee updated successfully!");

else

System.out.println("Employee not found!");

}
}

private static void deleteEmployee(Connection conn, Scanner scanner) throws SQLException {

System.out.print("Enter Employee ID to delete: ");

int id = scanner.nextInt();

String sql = "DELETE FROM Employee WHERE id = ?";

try (PreparedStatement stmt = conn.prepareStatement(sql)) {

stmt.setInt(1, id);

int rows = stmt.executeUpdate();

if (rows > 0)

System.out.println("Employee deleted successfully!");

Else

System.out.println("Employee not found!");

}
MySQL Command:

Output:

Inserting First Employee:

Java:

MySQL:
Inserting Multiple Employee data:

Java:

MySQL:
Updating Data in the Table:

Java:

MySQL:

Deleting Data from the table:

Java:
MySQL:

Skill Developed
1. Able to develop Java Programs
2. Able to analyze and fix the errors.
3. Able to debug the program.

Application
Can be used in college and school level programs.

Subject In-charge
(Mrs. Smita Kuldiwar)

You might also like