0% found this document useful (0 votes)
20 views54 pages

DBMS Report

The document is a minor project report for a Registration Management System developed by K.J. Tilak Reddy and N. Umesh Karthik under the guidance of Dr. T.S. Shiny Angel at SRM Institute of Science and Technology. It outlines the project's motivation, objectives, challenges, and technical details including architecture, design, implementation, and database queries. The report emphasizes the need for efficient student data management and provides a comprehensive overview of the system's functionalities and requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views54 pages

DBMS Report

The document is a minor project report for a Registration Management System developed by K.J. Tilak Reddy and N. Umesh Karthik under the guidance of Dr. T.S. Shiny Angel at SRM Institute of Science and Technology. It outlines the project's motivation, objectives, challenges, and technical details including architecture, design, implementation, and database queries. The report emphasizes the need for efficient student data management and provides a comprehensive overview of the system's functionalities and requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 54

REGESTRATION MANAGEMENT SYSTEM

MINOR PROJECT REPORT

By
K.J.TILAK REDDY-RA2211026010059
N.UMESH KARTHIK - RA2211026010064

Under the guidance of


Dr.T.S.Shiny Angel

In partial fulfillment for the Course


Of

21CSC205P - DATABASE MANAGEMENT SYSTEMS

in Computational Intelligence

FACULTY OF ENGINEERING AND TECHNOLOGY

SCHOOL OF COMPUTING

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

KATTANKULATHUR

APRIL 2024

1
BONAFIDE CERTIFICATE

Certified that this minor project report for the course 21CSC205P

DATABASE MANAGEMENT SYSTEMS entitled in "REGESTRATION

MANAGEMENT SYSTEM" is the bonafide work of K.J.TILAK REDDY

(RA2211026010059) and N.UMESH KARTIK (RA2211026010064) who carried

out the work under my supervision.

SIGNATURE SIGNATURE

Dr. T.S.Shiny Angel Dr.R.Annie Uthra,

Professor and Head,


Assistant Professor,
Computational Itelligence,
Computational Intelligence ,
SRM Institue of
SRM Institute of Science Science and
and Technology Technology
Kattankulathur
Kattankulathur

2
ACKNOWLEDGEMENT

 We express our heartfelt thanks to our honorable Vice Chancellor Dr.


C. MUTHAMIZHCHELVAN, for being the beacon in all our endeavors.

 We would like to express my warmth of gratitude to our Registrar Dr.


S. Ponnusamy, for his encouragement.
 We express our profound gratitude to our Dean (College of
Engineering and Technology) Dr. T. V.Gopal, for bringing out
novelty in all executions.
 We would like to express my heartfelt thanks to Chairperson, School of
Computing Dr. Revathi Venkataraman, for imparting confidence to complete
my course project
 We are highly thankful to our Course project Faculty Dr. T.S.Shiny
Angel, Assistant Professor , Computational Intelligence , for his
assistance, timely suggestion and guidance throughout the
duration of this course project.
 We extend my gratitude to our HoD Dr.R.Annie Uthra , Professor and
Head, Computational Intelligence and my Departmental colleagues for
their Support.
 Finally, we thank our parents and friends near and dear ones who
directly and indirectly contributed to the successful completion of our
project. Above all, I thank the almighty for showering his blessings on
me to complete my Course project.

3
TABLE OF CONTENTS

CHAPTER NO CONTENTS PAGE NO

1 INTRODUCTION
5

2 LITERATURE SURVEY
7

3 REQUIREMENT ANALYSIS
8

4 ARCHITECTURE & DESIGN


9

5 IMPLEMENTATION
10

6 ER DIAGRAMS 11

7 RELATIONAL SCHEMA 12

8 QUERIES 13-37

CODE
9 38-51

10 CONCLUSION 52

4
11 REFERENCES
52

1. INTRODUCTION

This section provides an overview of the motivation, objectives, problem statement,


and challenges encountered during the development of the Student Data
Management System. It sets the foundation for the subsequent sections that delve
into the technical aspects, implementation details, and outcomes of the project.

1.1 Motivation
In the modern educational landscape, efficient management of student data is paramount for
educational institutions. The motivation behind developing the Student Data Management System
(SDMS) stems from the need to streamline and automate the processes related to student
information. Manual handling of student records is error-prone and time-consuming, prompting the
development of a robust and user-friendly system to manage student data efficiently.

1.2 Objective

The primary objective of the Student Data Management System is to provide a


comprehensive platform for educational institutions to effectively manage and
organize student information. The system aims to achieve the following objectives:
Secure Authentication:
Implement a secure login system to authenticate users and control access to student
data.
Efficient Data Handling:
Facilitate the efficient handling of student records, including personal information,
academic details, and contact information.
User-Friendly Interface:
Design an intuitive and user-friendly interface using Java Swing to ensure ease of use
for administrators interacting with the system.
Database Connectivity:
5
Establish a secure and reliable connection to a MySQL database to store and retrieve
student data.
Data Manipulation:
Provide functionalities for adding, updating, and deleting student records to ensure
the system remains dynamic and up-to-date.
Data Presentation:
Utilize JTable to present student data in a tabular format for better visualization and
analysis.

1.3 Problem Statement

Traditional methods of managing student data involve manual record-keeping, which


is susceptible to errors, time-consuming, and lacks scalability. The absence of a
centralized system leads to difficulties in data retrieval and updates. This project
addresses the challenges posed by manual student data management

1.4 Challenges

The development of the Student Data Management System encountered several


challenges, including:
Security Implementation:
Ensuring the secure storage and retrieval of sensitive information, such as login
credentials and student records.
Database Integration:
Establishing a robust connection to a MySQL database, handling SQL queries, and
managing database operations seamlessly.
User Interface Design:
Designing an intuitive and aesthetically pleasing user interface using Java Swing to
enhance user experience.
Data Validation:
Implementing effective data validation to prevent erroneous inputs and maintain data
integrity.
Code Modularity:
Achieving a balance between code modularity and efficiency to enhance
maintainability and future scalability.

6
2. LITERATURE SURVEY

This section provides a quick overview of pertinent research on student data


management and how our approach builds upon or differs from them.

During the course of our literature review, we came across a number of papers that
highlighted the difficulties that educational institutions have when it comes to
maintaining student data.

Numerous studies highlight the necessity of digital solutions to enhance the efficiency
and accuracy of data.

Additionally, they stress how crucial data security is, especially when handling private
student information.

By presenting a thorough Student Data Management System that attempts to solve


the issues found, our effort expands on this body of research.

We work to give educational institutions an effective and safe way to handle student
data by combining cutting-edge technology with industry best practises.

7
3. REQUIREMENTS

1.1 Requirement Analysis

User Authentication : To guarantee that only authorised staff may


see and edit student data, the system must provide user authentication.
Data Entry : Students' personal information, academic records, and
other pertinent data should be entered by users.
Data Retrieval : Using a variety of search parameters, the system
ought to make it easier to quickly and precisely retrieve student records.
Data Management : Users must be able to manage, amend, and
update student records as necessary.
Security Measures : To guard against unauthorised access and data
breaches, the system needs security features.
Reporting : Reports should be able to be generated by users for a variety of uses,
including examination of academic achievement.
1.2 Hardware Requirement

1. A minimum of 4GB of RAM.


2. A minimum of 10GB of storage space.
3. A screen with a resolution of at least 1024x768 pixels.
4. A keyboard and mouse.
5. Processor: Basic processor capabilities found in most modern devices. A multi-
core processor is beneficial for better performance.

1.3 software requirement


1. ELLIPSE

8
2. MY SQL
3. MY SQL CONNECTOR

4. ARCHITECTURE AND DESIGN

9
5. IMPLEMENTATION

1. Secure Password Handling:


Avoid storing passwords in plain text in your database. Instead, use techniques like
hashing and salting for secure password storage.
2. User Authentication:
Ensure proper user authentication by validating credentials securely.
Consider implementing features like password hashing and salting to enhance
security.
3. Database Interaction:
Use PreparedStatement for executing SQL queries to prevent SQL injection attacks.
Close database connections (`Connection`, `PreparedStatement`, `ResultSet`)
properly after use, preferably in a `finally` block or using try-with-resources.
4. Separation of Concerns:
Separate GUI (Swing components) from database logic to adhere to the principles
of MVC (Model-View-Controller) architecture.
Create separate classes for database operations, user authentication, and UI
components.
5. Exception Handling:
Implement robust exception handling to catch and handle exceptions gracefully.
Avoid printing stack traces directly to the console in production code. Instead, log
them to a file or use a logging framework.
6. Code Refactoring:
Refactor repetitive code segments to improve readability and maintainability.
Extract common functionality into methods to avoid code duplication.

10
7. UI Design:
Improve the UI layout for better user experience.
Consider using layouts like BorderLayout, GridLayout, or GroupLayout for
organizing Swing components effectively.
8. Input Validation:
Implement input validation to ensure that users enter valid data into the
application.
Validate user inputs for data types, length constraints, and format validation.
9. Error Messages:
Provide informative error messages to users in case of invalid inputs or database
errors.
Handle edge cases gracefully and display appropriate messages to the user.

6. ER DIAGRAM

11
7. RELATIONAL SCHEMA

12
1) `username` (VARCHAR): Unique username for logging into the system.

2) `pass` (VARCHAR): Password associated with the username

3) `FirstName` (VARCHAR): First name of the student.

4) `Surname` (VARCHAR): Last name of the student.

5) `Age` (INT): Age of the student.

6) `DateOfBirth` (DATE): Date of birth of the student.

7) `Gender` (CHAR or VARCHAR): Gender of the student (M/F/O or


Male/Female/Other).

8) `contactNo` (VARCHAR): Contact number of the student.

9) `YearOfJoin` (INT): Year when the student joined.

10) `Id` (INT or VARCHAR): Unique identifier for the student.

11) `Department` (VARCHAR): Department of the student (CS/IT or


Computer Science/Information Technology).

12) `Class` (VARCHAR): Class in which the student belongs (First


Year/Second Year/Third Year, etc.).

13) `FatherName` (VARCHAR): Name of the student's father.

14) `MotherName` (VARCHAR): Name of the student's mother.

13
8. QUERIES
1nd Table
CREATE
CREATE TABLE login (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`username` VARCHAR(50) NOT NULL,
`password` VARCHAR(50) NOT NULL
);

INSERT
INSERT INTO login (‘S.no’,`username`, `password`)
VALUES
(1,'user2', 'password1'),
(2,'user3', 'password2'),
(3,'user1', 'password3'),
(4,'user5', 'password4'),
(5,'user4', 'password5');

UPDATE
UPDATE login
SET `password` = 'new_password'
WHERE `S.no` = 3;

DELETE
DELETE FROM login
WHERE `S.no` = 4;

14
SELECT
SELECT * FROM login;

WHERE
SELECT *
FROM login
WHERE `username` = 'user1';

ADD COLUMN
ALTER TABLE login
ADD COLUMN `email` VARCHAR(100) ;

DROP COLUMN
ALTER TABLE login
DROP COLUMN `email`;

ORDER BY

15
SELECT *
FROM login
ORDER BY `username` ASC;

GROUP BY
SELECT `username`, COUNT(*) AS `count`
FROM login
GROUP BY `username`;

HAVING
SELECT `username`, COUNT(*) AS `count`
FROM login
GROUP BY `username`
HAVING COUNT(*) > 1;

COUNT
SELECT COUNT(*) AS `total_records`
FROM login;

LIMIT
SELECT *
FROM login
LIMIT 2;

16
OFFSET
SELECT *
FROM login
LIMIT 2 OFFSET 2;

IN
SELECT *
FROM login
WHERE `S.no` IN (1, 3, 5);

BETWEEN
SELECT *
FROM login
WHERE `S.no` BETWEEN 2 AND 4;

RENAME
ALTER TABLE login
RENAME TO user_credentials;

2nd Table
CREATE
CREATE TABLE student (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`first name` VARCHAR(50) NOT NULL,
`surname` VARCHAR(50) NOT NULL

17
);

INSERT
INSERT INTO student (`S.no`,`first name`, `surname`)
VALUES
(1,'John', 'Doe'),
(2,'Jane', 'Smith'),
(3,'Alice', 'Johnson'),
(4,'Bob', 'Williams'),
(5,'Emma', 'Brown');

UPDATE
UPDATE student
SET `surname` = 'Jones'
WHERE `S.no` = 3;

DELETE
DELETE FROM student
WHERE `S.no` = 4;

SELECT
18
SELECT * FROM student;

WHERE
SELECT *
FROM student
WHERE `first name` = 'Alice';

ADD COLUMN
ALTER TABLE student
ADD COLUMN `age` INT ;

DROP COLUMN
ALTER TABLE student
DROP COLUMN `age`;

ORDER BY
SELECT *
FROM student
ORDER BY `surname` ASC;

19
GROUP BY
SELECT `surname`, COUNT(*) AS `count`
FROM student
GROUP BY `surname`;

HAVING
SELECT `surname`, COUNT(*) AS `count`
FROM student
GROUP BY `surname`
HAVING COUNT(*) > 1;

COUNT
SELECT COUNT(*) AS `total_records`
FROM student;

LIMIT
SELECT *
FROM student
LIMIT 2;

20
OFFSET
SELECT *
FROM student
LIMIT 2 OFFSET 2;

IN
SELECT *
FROM student
WHERE `S.no` IN (1, 3, 5);

BETWEEN
SELECT *
FROM student
WHERE `S.no` BETWEEN 2 AND 4;

RENAME
ALTER TABLE student
RENAME TO students;

3rd Table
CREATE
CREATE TABLE studentinfo (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`age` INT NOT NULL,
`date of birth` DATE NOT NULL,
`gender` VARCHAR(10) NOT NULL,
`contact no` VARCHAR(15) NOT NULL
);

21
INSERT
INSERT INTO studentinfo (`age`, `date of birth`, `gender`, `contact no`) VALUES
(25, '1999-03-15', 'Male', '1234567890'),
(22, '2002-05-20', 'Female', '9876543210'),
(30, '1995-11-10', 'Male', '2345678901'),
(20, '2004-08-05', 'Female', '8765432109'),
(27, '1997-09-25', 'Male', '3456789012'),
(24, '1998-12-30', 'Female', '7654321098');

UPDATE
UPDATE studentinfo
SET `age` = 28
WHERE `contact no` = '1234567890';

DELETE
DELETE FROM studentinfo
WHERE `contact no` = '1234567890';

SELECT
SELECT * FROM studentinfo;

WHERE
22
SELECT * FROM studentinfo WHERE `age` > 25;

ADD COLUMN
ALTER TABLE studentinfo
ADD COLUMN `address` VARCHAR(255) ;

DROP COLUMN
ALTER TABLE studentinfo
DROP COLUMN `address`;

ORDER BY
SELECT * FROM studentinfo ORDER BY `age` ASC;

GROUP BY
SELECT `gender`, COUNT(*) AS `count`
FROM studentinfo
GROUP BY `gender`;

23
HAVING
SELECT `gender`, COUNT(*) AS `count`
FROM studentinfo
GROUP BY `gender`;
HAVING COUNT(*) >= 1;

COUNT
SELECT COUNT(*) AS `count`
FROM studentinfo

LIMIT
SELECT * FROM studentinfo
LIMIT 4;

OFF SET
SELECT *
FROM studentinfo
LIMIT 10 OFFSET 1;

IN
SELECT COUNT(*) AS `count`
FROM studentinfo
WHERE `age` IN (20, 21, 22, 23, 24, 25);

BETWEEN
SELECT COUNT(*) AS `count`
FROM studentinfo
WHERE `age` BETWEEN 20 AND 30;
24
RENAME
ALTER TABLE studentinfo
RENAME TO studentinfo_table;

4rd Table
CREATE
CREATE TABLE parent_data (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`father name` VARCHAR(50) NOT NULL,
`mother name` VARCHAR(50) NOT NULL
);

INSERT
INSERT INTO parent_data (`father name`, `mother name`)
VALUES
('John Doe', 'Jane Doe'),
('Michael Smith', 'Emily Smith'),
('David Johnson', 'Sarah Johnson'),
('Robert Williams', 'Jessica Williams');

UPDATE
UPDATE parent_data
SET `father name` = 'James Brown'
WHERE `S.no` = 1;

25
DELETE
DELETE FROM parent_data
WHERE `S.no` = 4;

SELECT
SELECT * FROM parent_data;

WHERE
SELECT *
FROM parent_data
WHERE `father name` = 'John Doe';

ADD COLUMN
ALTER TABLE parent_data
ADD COLUMN `child name` VARCHAR(50);

DROP COLUMN
ALTER TABLE parent_data
DROP COLUMN `child name`;

26
ORDER BY
SELECT *
FROM parent_data
ORDER BY `father name` ASC;

GROUP BY
SELECT `father name`, COUNT(*) AS `count`
FROM parent_data
GROUP BY `father name`;

HAVING
SELECT `father name`, COUNT(*) AS `count`
FROM parent_data
GROUP BY `father name`
HAVING COUNT(*) > 1;

COUNT
SELECT COUNT(*) AS `total_records`
FROM parent_data;

27
LIMIT
SELECT *
FROM parent_data
LIMIT 2;

OFFSET
SELECT *
FROM parent_data
LIMIT 2 OFFSET 2;

IN
SELECT *
FROM parent_data
WHERE `father name` IN ('John Doe', 'Michael Smith');

BETWEEN
SELECT *
FROM parent_data
WHERE `S.no` BETWEEN 2 AND 3;

RENAME
ALTER TABLE parent_data
RENAME TO parents;

5th table
CREATE
CREATE TABLE course (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`course id` INT NOT NULL,
`department` VARCHAR(50) NOT NULL
);
28
INSERT
INSERT INTO course (`S.no`,`course id`, `department`)
VALUES
('1',1, 'Computer Science'),
('2',2, 'Mathematics'),
('3',3, 'Physics'),
('4',4, 'Biology'),
('5',5, 'Chemistry');

UPDATE
UPDATE course
SET `department` = 'Electrical Engineering'
WHERE `S.no` = 3;

DELETE
DELETE FROM course
WHERE `S.no` = 4;

SELECT
SELECT * FROM course;

29
WHERE
SELECT *
FROM course
WHERE `department` = 'Physics';

ADD COLUMN
ALTER TABLE course
ADD COLUMN `course name` VARCHAR(100)

DROP COLUMN
ALTER TABLE course
DROP COLUMN `course name`;

GROUP BY
SELECT `department`, COUNT(*) AS `count`
FROM course
GROUP BY `department`;

30
HAVING
SELECT `department`, COUNT(*) AS `count`
FROM course
GROUP BY `department`
HAVING COUNT(*) > 1;

COUNT
SELECT COUNT(*) AS `total_records`
FROM course;

LIMIT
SELECT *
FROM course
LIMIT 2;

OFFSET
SELECT *
FROM course
LIMIT 2 OFFSET 2;

IN
SELECT *
FROM course
WHERE `S.no` IN (1, 3, 5);

31
BETWEEN
SELECT *
FROM course
WHERE `S.no` BETWEEN 2 AND 4;

RENAME
ALTER TABLE course
RENAME TO courses;

6th table
CREATE
CREATE TABLE college_information (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`year of joining` INT NOT NULL,
`college id` INT NOT NULL
);

INSERT
INSERT INTO college_information (`S.no`,`year of joining`, `college id`)
VALUES
(1,2015, 1001),
(2,2016, 1002),
(3,2017, 1003),
(4,2018, 1004),
(5,2019, 1005);

32
UPDATE
UPDATE college_information
SET `college id` = 1006
WHERE `S.no` = 3;

DELETE
DELETE FROM college_information
WHERE `S.no` = 4;

SELECT
SELECT * FROM college_information;

WHERE
SELECT *
FROM college_information
WHERE `year of joining` = 2017;

33
ADD COLUMN
ALTER TABLE college_information
ADD COLUMN `location` VARCHAR(50) ;

DROP COLUMN
ALTER TABLE college_information
DROP COLUMN `location`;

ORDER BY
SELECT *
FROM college_information
ORDER BY `year of joining` ASC;

GROUP BY
SELECT `year of joining`, COUNT(*) AS `count`
FROM college_information
GROUP BY `year of joining`;

34
HAVING
SELECT `year of joining`, COUNT(*) AS `count`
FROM college_information
GROUP BY `year of joining`
HAVING COUNT(*) > 1;

COUNT
SELECT COUNT(*) AS `total_records`
FROM college_information;

LIMIT
SELECT *
FROM college_information
LIMIT 2;

OFFSET
SELECT *
FROM college_information
LIMIT 2 OFFSET 2;

IN
SELECT *
FROM college_information
WHERE `year of joining` IN (2016, 2017);

35
BETWEEN
SELECT *
FROM college_information
WHERE `year of joining` BETWEEN 2016 AND 2018;

RENAME
ALTER TABLE college_information
RENAME TO college_details;

Join function for 1nd and 2nd tables


CREATE TABLE login (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`username` VARCHAR(50) NOT NULL,
`password` VARCHAR(50) NOT NULL
);
CREATE TABLE student (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`first name` VARCHAR(50) NOT NULL,
`surname` VARCHAR(50) NOT NULL
);
CREATE TABLE student_login AS
SELECT student.`S.no`, student.`first name`, student.surname, login.username,
login.password
FROM student
JOIN login ON student.`S.no` = login.`S.no`;

36
Join function for 2nd and 3rd tables
CREATE TABLE student (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`first name` VARCHAR(50) NOT NULL,
`surname` VARCHAR(50) NOT NULL
);
CREATE TABLE studentinfo (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`age` INT NOT NULL,
`date of birth` DATE NOT NULL,
`gender` VARCHAR(10) NOT NULL,
`contact no` VARCHAR(15) NOT NULL
);
CREATE TABLE student_combined AS
SELECT student.`S.no`, student.`first name`, student.surname, studentinfo.age,
studentinfo.`date of birth`, studentinfo.gender, studentinfo.`contact no`
FROM student
JOIN studentinfo ON student.`S.no` = studentinfo.`S.no`;

Join function for 2nd and 4th tables


CREATE TABLE student (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`first name` VARCHAR(50) NOT NULL,
`surname` VARCHAR(50) NOT NULL
);
CREATE TABLE parent_data (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`father name` VARCHAR(50) NOT NULL,
`mother name` VARCHAR(50) NOT NULL
);
CREATE TABLE student_parent AS
SELECT student.`S.no`, student.`first name`, student.surname, parent_data.`father
name`, parent_data.`mother name`
FROM student
JOIN parent_data ON student.`S.no` = parent_data.`S.no`;

Join function for 5th and 6th tables


37
CREATE TABLE course (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`course id` INT NOT NULL,
`department` VARCHAR(50) NOT NULL
);
CREATE TABLE college_information (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`year of joining` INT NOT NULL,
`college id` INT NOT NULL
);
CREATE TABLE course_college_info AS
SELECT course.`S.no`, course.`course id`, course.department,
college_information.`year of joining`, college_information.`college id`
FROM course
JOIN college_information ON course.`S.no` = college_information.`S.no`;

Join function for 2nd , 3rd and 5th tables


CREATE TABLE student (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`first name` VARCHAR(50) NOT NULL,
`surname` VARCHAR(50) NOT NULL
);
CREATE TABLE studentinfo (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`age` INT NOT NULL,
`date of birth` DATE NOT NULL,
`gender` VARCHAR(10) NOT NULL,
`contact no` VARCHAR(15) NOT NULL
);
CREATE TABLE course (
`S.no` INT AUTO_INCREMENT PRIMARY KEY,
`course id` INT NOT NULL,
`
department` VARCHAR(50) NOT NULL
);
CREATE TABLE student_combined AS
SELECT student.`S.no`, student.`first name`, student.surname, studentinfo.age,
studentinfo.`date of birth`, studentinfo.gender, studentinfo.`contact no`,
course.`course id`, course.department
FROM student
JOIN studentinfo ON student.`S.no` = studentinfo.`S.no`
JOIN course ON student.`S.no` = course.`S.no`;

38
9. CODE
1.LOGIN:
package ProjectStudentDataManagement;
import java.awt.EventQueue;
import javax.swing.JFrame;
import java.awt.Toolkit;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.awt.event.ActionEvent;
public class Login {
private JFrame loginsdm;
private JTextField tf1;
private JPasswordField tf2;
Connection sdm;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Login window = new Login();
window.loginsdm.setVisible(true);
} catch (Exception e) {
39
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public Login() {
sdm = DataBaseConnection.dbConn();
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
loginsdm = new JFrame();
loginsdm.getContentPane().setBackground(new Color(0, 0, 0));
loginsdm.setTitle("STUDENT DATA MANAGEMENT Login\r\n");
loginsdm.setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Roshni Gupta\\
Desktop\\bday\\unnamed.png"));
loginsdm.setBounds(100, 110, 858, 559);
loginsdm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
loginsdm.getContentPane().setLayout(null);
tf1 = new JTextField();
tf1.setBackground(new Color(175, 238, 238));
tf1.setBounds(117, 173, 265, 41);
loginsdm.getContentPane().add(tf1);
tf1.setColumns(10);
JLabel lblNewLabel = new JLabel("Enter Username");
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
lblNewLabel.setForeground(new Color(135, 206, 250));
lblNewLabel.setBounds(118, 131, 233, 41);
loginsdm.getContentPane().add(lblNewLabel);
JLabel lblEnterPassword = new JLabel("Enter Password");
lblEnterPassword.setFont(new Font("Tahoma", Font.BOLD, 20));
lblEnterPassword.setForeground(new Color(135, 206, 250));
lblEnterPassword.setBounds(117, 259, 198, 33);
loginsdm.getContentPane().add(lblEnterPassword);
tf2 = new JPasswordField();
tf2.setBackground(new Color(175, 238, 238));
tf2.setBounds(117, 292, 265, 41);
loginsdm.getContentPane().add(tf2);
JButton b = new JButton("Login");
b.setFont(new Font("Tahoma", Font.BOLD, 20));
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String q = "SELECT * from login where username = ? and pass = ?";
try {
PreparedStatement ps = sdm.prepareStatement(q);
ps.setString(1, tf1.getText());
ps.setString(2, String.valueOf(tf2.getPassword()));
//unPrepared statement has prepared: "SELECT * from login where username =
"roshni@123" and pass ="roshni";
ResultSet rs = ps.executeQuery();
if(rs.next()) {
JOptionPane.showMessageDialog(null,"Welcome to Student Data Management");
new StudentDataManagement().setVisible(true);
40
}
else {
JOptionPane.showMessageDialog(null, "Username / Password Invalid!");
}
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
b.setForeground(new Color(0, 0, 0));
b.setBackground(new Color(30, 144, 255));
b.setBounds(158, 361, 157, 41);
loginsdm.getContentPane().add(b);
JLabel lblNewLabel_1 = new JLabel("");
lblNewLabel_1.setIcon(new ImageIcon("C:\\Users\\Roshni Gupta\\Desktop\\b5.jpg"));
lblNewLabel_1.setBounds(497, 0, 357, 416);
loginsdm.getContentPane().add(lblNewLabel_1);
JLabel lblNewLabel_2 = new JLabel("STUDENT DATA MANAGEMENT");
lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 24));
lblNewLabel_2.setForeground(new Color(0, 255, 255));
lblNewLabel_2.setBounds(33, 38, 414, 50);
loginsdm.getContentPane().add(lblNewLabel_2);
}
}
2.DATA BASE CONNECTER
package ProjectStudentDataManagement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JOptionPane;
public class DataBaseConnection {
public static Connection dbConn() {
String url = "jdbc:mysql://localhost:3306/studentdata";
String user ="root";
String pass ="Karthik@16";
try {
Connection conn = DriverManager.getConnection(url,user,pass);
return conn;
} catch (SQLException e) {
JOptionPane.showMessageDialog(null, "Connection Failed");
e.printStackTrace();
return null;
}
}
}
3.MAIN CODE:
package ProjectStudentDataManagement;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Toolkit;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
41
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JInternalFrame;
import javax.swing.table.DefaultTableModel;
import net.proteanit.sql.DbUtils;
import javax.swing.border.MatteBorder;
import java.awt.Color;
import java.awt.SystemColor;
import java.awt.event.ActionListener;
import java.awt.print.PrinterException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.awt.event.ActionEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
public class StudentDataManagement extends JFrame {
private JPanel contentPane;
private JTextField tf1;
private JTextField tf2;
private JTextField tf3;
private JTextField tf5;
private JTextField tf6;
private JTextField tf7;
private JTextField tf8;
private JTextField tf9;
private JTextField tf4;
private JTable table;
Connection conn;
JRadioButton r4,r5;
JComboBox comboBox;
private JTextField tf10;
private JTextField tf11;
private JTextField tf12;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
42
try {
StudentDataManagement frame = new StudentDataManagement();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
//Add Combo Box
void addItemToComboBox()throws SQLException{
String query = "SELECT * from studentdatamgmt";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) {
comboBox.addItem(rs.getString("FirstName"));
}
}
/**
* Create the frame.
*/
public StudentDataManagement() {
conn = DataBaseConnection.dbConn();
setFont(new Font("Dialog", Font.BOLD, 18));
setBackground(SystemColor.activeCaption);
setTitle("Student Data Management");
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Roshni Gupta\\
Desktop\\bday\\unnamed.png"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 1273, 680);
contentPane = new JPanel();
contentPane.setBackground(new Color(176, 224, 230));
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblNewLabel = new JLabel("STUDENT DATA MANAGEMENT");
lblNewLabel.setForeground(new Color(95, 158, 160));
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 36));
lblNewLabel.setBounds(192, 28, 642, 44);
contentPane.add(lblNewLabel);
JLabel lblNewLabel_1 = new JLabel("First Name");
lblNewLabel_1.setForeground(new Color(0, 128, 128));
lblNewLabel_1.setBackground(new Color(0, 128, 128));
lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1.setBounds(10, 95, 111, 27);
contentPane.add(lblNewLabel_1);
JLabel lblNewLabel_1_1 = new JLabel("Surname");
lblNewLabel_1_1.setForeground(new Color(0, 128, 128));
lblNewLabel_1_1.setFont(new Font("Tahoma", Font.BOLD, 18));
43
lblNewLabel_1_1.setBounds(10, 145, 123, 27);
contentPane.add(lblNewLabel_1_1);
JLabel lblNewLabel_1_2 = new JLabel("Age");
lblNewLabel_1_2.setForeground(new Color(0, 128, 128));
lblNewLabel_1_2.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_2.setBounds(10, 191, 95, 27);
contentPane.add(lblNewLabel_1_2);
JLabel lblNewLabel_1_3 = new JLabel("Contact No.");
lblNewLabel_1_3.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3.setBounds(10, 329, 111, 27);
contentPane.add(lblNewLabel_1_3);
JLabel lblNewLabel_1_2_1 = new JLabel("Gender");
lblNewLabel_1_2_1.setForeground(new Color(0, 128, 128));
lblNewLabel_1_2_1.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_2_1.setBounds(10, 291, 95, 27);
contentPane.add(lblNewLabel_1_2_1);
JLabel lblNewLabel_1_3_1 = new JLabel("Year Of Join");
lblNewLabel_1_3_1.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3_1.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1.setBounds(10, 367, 123, 27);
contentPane.add(lblNewLabel_1_3_1);
JLabel lblNewLabel_1_3_1_1 = new JLabel("Department");
lblNewLabel_1_3_1_1.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3_1_1.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1_1.setBounds(10, 443, 123, 27);
contentPane.add(lblNewLabel_1_3_1_1);
JLabel lblNewLabel_1_3_1_2 = new JLabel("Class");
lblNewLabel_1_3_1_2.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3_1_2.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1_2.setBounds(10, 481, 123, 27);
contentPane.add(lblNewLabel_1_3_1_2);
JLabel lblNewLabel_1_3_1_3 = new JLabel("Id");
lblNewLabel_1_3_1_3.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3_1_3.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1_3.setBounds(10, 405, 123, 27);
contentPane.add(lblNewLabel_1_3_1_3);
JLabel lblNewLabel_1_3_1_4 = new JLabel("Father Name");
lblNewLabel_1_3_1_4.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3_1_4.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1_4.setBounds(10, 519, 123, 27);
contentPane.add(lblNewLabel_1_3_1_4);
JLabel lblNewLabel_1_3_1_4_1 = new JLabel("Mother Name\r\n");
lblNewLabel_1_3_1_4_1.setForeground(new Color(0, 128, 128));
lblNewLabel_1_3_1_4_1.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1_4_1.setBounds(10, 557, 123, 27);
contentPane.add(lblNewLabel_1_3_1_4_1);
JLabel lblNewLabel_1_3_1_4_2 = new JLabel("DateOfBirth");
lblNewLabel_1_3_1_4_2.setForeground(new Color(0, 128, 128));
44
lblNewLabel_1_3_1_4_2.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_1_3_1_4_2.setBounds(10, 253, 123, 27);
contentPane.add(lblNewLabel_1_3_1_4_2);
tf1 = new JTextField();
tf1.setBackground(new Color(224, 255, 255));
tf1.setForeground(new Color(0, 0, 0));
tf1.setBounds(166, 95, 134, 32);
contentPane.add(tf1);
tf1.setColumns(10);
tf2 = new JTextField();
tf2.setBackground(new Color(224, 255, 255));
tf2.setColumns(10);
tf2.setBounds(166, 140, 134, 32);
contentPane.add(tf2);
tf3 = new JTextField();
tf3.setBackground(new Color(224, 255, 255));
tf3.setColumns(10);
tf3.setBounds(166, 191, 134, 32);
contentPane.add(tf3);
tf5 = new JTextField();
tf5.setBackground(new Color(224, 255, 255));
tf5.setColumns(10);
tf5.setBounds(166, 329, 134, 32);
contentPane.add(tf5);
tf6 = new JTextField();
tf6.setBackground(new Color(224, 255, 255));
tf6.setColumns(10);
tf6.setBounds(166, 367, 134, 32);
contentPane.add(tf6);
tf7 = new JTextField();
tf7.setBackground(new Color(224, 255, 255));
tf7.setColumns(10);
tf7.setBounds(166, 405, 134, 32);
contentPane.add(tf7);
tf8 = new JTextField();
tf8.setBackground(new Color(224, 255, 255));
tf8.setColumns(10);
tf8.setBounds(166, 519, 134, 32);
contentPane.add(tf8);
tf9 = new JTextField();
tf9.setBackground(new Color(224, 255, 255));
tf9.setColumns(10);
tf9.setBounds(166, 557, 134, 32);
contentPane.add(tf9);
final JComboBox comboBox_1 = new JComboBox();
comboBox_1.setForeground(new Color(0, 128, 0));
comboBox_1.setBackground(new Color(224, 255, 255));
comboBox_1.setFont(new Font("Tahoma", Font.BOLD, 18));
comboBox_1.setModel(new DefaultComboBoxModel(new String[] {"Select
45
Class", "First Year", "Second Year", "Third Year"}));
comboBox_1.setBounds(166, 481, 134, 27);
contentPane.add(comboBox_1);
tf4 = new JTextField();
tf4.setBackground(new Color(224, 255, 255));
tf4.setColumns(10);
tf4.setBounds(166, 248, 134, 32);
contentPane.add(tf4);
JButton btnNewButton = new JButton("Load\r\n");
btnNewButton.setForeground(new Color(0, 0, 205));
btnNewButton.setBackground(new Color(100, 149, 237));
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
showData();
}
});
btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 18));
btnNewButton.setBounds(394, 600, 105, 32);
contentPane.add(btnNewButton);
JButton btnInsert = new JButton("Insert");
btnInsert.setForeground(new Color(0, 0, 205));
btnInsert.setBackground(new Color(100, 149, 237));
btnInsert.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String query = "Insert into studentdatamgmt values(?,?,?,?,?,?,?,?,?,?,?,?)";
try {
PreparedStatement ps = conn.prepareStatement(query);
ps.setString(1, tf1.getText());
ps.setString(2, tf2.getText());
ps.setInt(3, Integer.parseInt(tf3.getText()));
ps.setInt(4, Integer.parseInt(tf4.getText()));
ps.setString(5, tf11.getText());
ps.setInt(6, Integer.parseInt(tf5.getText()));
ps.setInt(7, Integer.parseInt(tf6.getText()));
ps.setInt(8, Integer.parseInt(tf7.getText()));
ps.setString(9, tf12.getText());
ps.setString(10, String.valueOf(comboBox_1.getSelectedItem()));
ps.setString(11, tf8.getText());
ps.setString(12, tf9.getText());
ps.execute();
JOptionPane.showMessageDialog(null, "Data Insertion Successfully!");
showData();
} catch (SQLException e1) {
JOptionPane.showMessageDialog(null, "Data Insertion Failed!");
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
46
btnInsert.setFont(new Font("Tahoma", Font.BOLD, 18));
btnInsert.setBounds(562, 600, 105, 32);
contentPane.add(btnInsert);
JButton btnUpdate = new JButton("Update");
btnUpdate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String q = "UPDATE studentdatamgmt set FirstName=? , Surname=? ,
Age=? , DateOfBirth=? , Gender=? , contactNo=? , YearOfJoin=? , Id=? ,
Department=? , class=? , FatherName=? , MotherName=? where Id=?";
try {
PreparedStatement ps = conn.prepareStatement(q);
ps.setString(1, tf1.getText());
ps.setString(2, tf2.getText());
ps.setInt(3, Integer.parseInt(tf3.getText()));
ps.setInt(4, Integer.parseInt(tf4.getText()));
ps.setString(5, tf11.getText());
ps.setInt(6, Integer.parseInt(tf5.getText()));
ps.setInt(7, Integer.parseInt(tf6.getText()));
ps.setInt(8, Integer.parseInt(tf7.getText()));
ps.setString(9, tf12.getText());
ps.setString(10, String.valueOf(comboBox_1.getSelectedItem()));
ps.setString(11, tf8.getText());
ps.setString(12, tf9.getText());
ps.setInt(13, Integer.parseInt(tf7.getText()));
ps.execute();
JOptionPane.showMessageDialog(null, "Data Updated Successfully!");
showData();
addItemToComboBox();
} catch (SQLException e1) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "Data Updated Failed!");
e1.printStackTrace();
}
}
});
btnUpdate.setForeground(new Color(0, 0, 205));
btnUpdate.setBackground(new Color(100, 149, 237));
btnUpdate.setFont(new Font("Tahoma", Font.BOLD, 18));
btnUpdate.setBounds(742, 600, 105, 32);
contentPane.add(btnUpdate);
JButton btnPrint = new JButton("Print");
btnPrint.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
if(table.print()) {
JOptionPane.showMessageDialog(null, "Printing
Successfully!","RoshniPrinter", JOptionPane.INFORMATION_MESSAGE);
}else {
JOptionPane.showMessageDialog(null,"Printing
47
Failed!","RoshniPrinter",JOptionPane.ERROR_MESSAGE);
}
}catch(PrinterException e1) {
e1.printStackTrace();
}
}
});
btnPrint.setForeground(new Color(0, 0, 205));
btnPrint.setBackground(new Color(100, 149, 237));
btnPrint.setFont(new Font("Tahoma", Font.BOLD, 18));
btnPrint.setBounds(913, 600, 105, 32);
contentPane.add(btnPrint);
JButton btnDelete = new JButton("Delete");
btnDelete.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String query = "DELETE from studentdatamgmt where Id=?";
try {
PreparedStatement ps = conn.prepareStatement(query);
ps.setInt(1, Integer.parseInt(tf7.getText()));
ps.execute();
JOptionPane.showMessageDialog(null, "Data Deleted Successfully!");
showData();
} catch (SQLException e1) {
JOptionPane.showMessageDialog(null, "Data Deleted Failed!");
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
btnDelete.setForeground(new Color(0, 0, 205));
btnDelete.setBackground(new Color(100, 149, 237));
btnDelete.setFont(new Font("Tahoma", Font.BOLD, 18));
btnDelete.setBounds(1084, 600, 105, 32);
contentPane.add(btnDelete);
JLabel lblNewLabel_2 = new JLabel("STUDENT'S DATA:-");
lblNewLabel_2.setForeground(new Color(46, 139, 87));
lblNewLabel_2.setBackground(new Color(51, 204, 204));
lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 22));
lblNewLabel_2.setBounds(362, 106, 221, 32);
contentPane.add(lblNewLabel_2);
table = new JTable();
table.setBackground(new Color(240, 248, 255));
table.setForeground(new Color(0, 100, 0));
table.setFont(new Font("Tahoma", Font.PLAIN, 12));
table.setModel(new DefaultTableModel(
new Object[][] {
{"First Name", "Surname", "Age", "DateOfBirth", "Gender", "Contact No",
"YearOfJoin", "Id", "Department", "Class", "Father Name", "Mother Name"},
{null, null, null, null, null, null, null, null, null, null, null, null},
48
{null, null, null, null, null, null, null, null, null, null, null, null},
{null, null, null, null, null, null, null, null, null, null, null, null},
},
new String[] {
"First Name", "Surname", "Age", "DateOfBirth", "Gender", "Contact No",
"YearOfjoin", "Id", "Department", "Class", "Father Name", "Mother Name"
}
));
table.setBorder(new MatteBorder(4, 4, 4, 4, (Color) new Color(0, 0, 0)));
table.setBounds(349, 154, 900, 435);
contentPane.add(table);
comboBox = new JComboBox();
comboBox.setBackground(new Color(224, 255, 255));
comboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String query = "SELECT * from studentdatamgmt where FirstName=?";
try {
PreparedStatement ps = conn.prepareStatement(query);
ps.setString(1, String.valueOf(comboBox.getSelectedItem()));
ResultSet rs = ps.executeQuery();
if(rs.next()) {
tf1.setText(rs.getString("FirstName"));
tf2.setText(rs.getString("Surname"));
tf3.setText(rs.getString("Age"));
tf4.setText(rs.getString("DateOfBirth"));
tf5.setText(rs.getString("contactNo"));
tf6.setText(rs.getString("YearOfJoin"));
tf7.setText(rs.getString("Id"));
tf8.setText(rs.getString("FatherName"));
tf9.setText(rs.getString("MotherName"));
}
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
comboBox.setBounds(597, 105, 237, 33);
contentPane.add(comboBox);
tf10 = new JTextField();
tf10.setBackground(new Color(224, 255, 255));
tf10.setToolTipText("Search Here");
tf10.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
String q ="Select * from studentdatamgmt where FirstName =?";
try {
PreparedStatement ps = conn.prepareStatement(q);
ps.setString(1, tf10.getText());
49
ResultSet rs = ps.executeQuery();
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
tf10.setBounds(869, 106, 380, 31);
contentPane.add(tf10);
tf10.setColumns(10);
tf11 = new JTextField();
tf11.setBackground(new Color(224, 255, 255));
tf11.setBounds(166, 291, 49, 26);
contentPane.add(tf11);
tf11.setColumns(10);
JLabel lblNewLabel_3 = new JLabel("M/F/O");
lblNewLabel_3.setForeground(new Color(34, 139, 34));
lblNewLabel_3.setFont(new Font("Tahoma", Font.BOLD, 16));
lblNewLabel_3.setBounds(218, 289, 64, 33);
contentPane.add(lblNewLabel_3);
tf12 = new JTextField();
tf12.setBackground(new Color(224, 255, 255));
tf12.setForeground(new Color(0, 0, 0));
tf12.setBounds(166, 443, 57, 26);
contentPane.add(tf12);
tf12.setColumns(10);
JLabel lblNewLabel_4 = new JLabel("CS / IT");
lblNewLabel_4.setForeground(new Color(0, 128, 128));
lblNewLabel_4.setFont(new Font("Tahoma", Font.BOLD, 18));
lblNewLabel_4.setBounds(233, 443, 67, 23);
contentPane.add(lblNewLabel_4);
}
protected void showData() {
// TODO Auto-generated method stub
String query = "Select * from studentdatamgmt";
try {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(query);
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
protected String getDepartment() {
// TODO Auto-generated method stub
if(r4.isSelected())
return"CS";
50
else if(r5.isSelected())
return"IT";
else
return"NULL";
}
}

9.1 RESULTS AND DISCUSSION


9.11 GUI DESIGN

51
9.12 DATA BASE DESIGN

9.13 INPUT AND OUTPUT OF DATA:

52
10. CONCLUSION

The Student Data Management System made managing student data easier for
educational institutions by greatly improving data efficiency and accuracy. The
system effectively handled the issues associated with maintaining student data.
During development, it became clear how important it was to have strong security
measures in place and how necessary it was to have regular maintenance and
upgrades. By offering a comprehensive solution for student data administration, the
project achieved its goals.

11.REFERENCES

https://docs.oracle.com/javase/tutorial/uiswing/
https://docs.oracle.com/javase/tutorial/jdbc/
https://dev.mysql.com/doc/
https://www.oracle.com/java/technologies/javase/seccodeguide.html
https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
53
https://commons.apache.org/proper/commons-dbutils/

54

You might also like