尊敬的 微信汇率:1円 ≈ 0.046606 元 支付宝汇率:1円 ≈ 0.046698元 [退出登录]
SlideShare a Scribd company logo
Kendriya Vidyalaya Durg
A Project Report
on
Vidyarthy
Darpan
For
Class 12 Examination
[As a part of the Informatics Practices Course
(065)]
SUBMITTED BY:-
Gaurav Kumar
[Roll No. 6647663]
Under the Guidance of :-
Pratibha Bhele
PGT (Comp.Sc)
CERTIFICATE
This is to certify that the Project / Dissertation
entitled Vidyarthy Darpan is a bonafide work
done by Master Gaurav Kumar of class XII
Session 2016-17 in partial fulfillment of CBSE
Examination 2017 and has been carried out under
my direct supervision and guidance. This report or
a similar report on the topic has not been
submitted for any other examination and does not
form a part of any other course undergone by the
candidate.
…………………………
……………………………..
Signature of Student Signature of
Teacher/Guide
Name.: Gaurav Kumar Name.: Pratibha Bhele
Roll No.: 6647663 Designation.: PGT (Comp.Sc.)
……….…………………
Signature of Principal
Name: Gloria Minj
ACKNOWLEDGEMENT
undertook this Project work, as the part of my XII-
Informatics Practices course. I had tried to apply my best of
knowledge and experience, gained during the study and
class work experience. However, developing software system is
generally a quite complex and time-consuming process. It
requires a systematic study, insight vision and professional
approach during the design and development. Moreover, the
developer always feels the need, the help and good wishes of the
people near you, who have considerable experience and idea.
I
I would like to extend my sincere thanks and gratitude to my
teacher Pratibha Bhele. I am very much thankful to our Principal
Ms. Gloria Minj for giving valuable time and moral support to
develop this software.
I would like to take the opportunity to extend my sincere thanks
and gratitude to my father Shri Rajpal Singh, and my mother
Mrs. Krishna Devi for being a source of inspiration and
providing time and freedom to develop this software project.
I also feel indebted to my Friends for the valuable suggestions
during the project work.
Gaurav
Kumar.
Class
XIIth
C o n t e n t s
………………………… ……………………………..--------------------------------------3
Signature of Student Signature of Teacher/Guide--------------------------------------3
Signature of Principal....................................................................................4
3.1 The Hardware used: -------------------------------------------------------------------------9
3.2 The Softwares used:-------------------------------------------------------------------------9
4.1 Database Design:---------------------------------------------------------------------------10
Table Design:..................................................................................................10
4.3 jFrames Design & Event Coding:--------------------------------------------------------13
5.1 How to install Software:.-------------------------------------------------------------------33
Database Installation.......................................................................................33
1. Introduction
This software project is developed to automate the functionalities of
Students. The purpose of the software project is to develop the Management
Information System (MIS) to automate the record keeping of Students.
A MIS mainly consists of a computerized database, a collection of inter-
related tables for a particular subject or purpose, capable to produce
different reports relevant to the user. An application program is tied with
the database for easy access and interface to the database. Using
Application program or front-end, we can store, retrieve and manage all
information in proper way.
This software, being simple in design and working, does not require much
of training to users, and can be used as a powerful tool for Storing Student
Details.
During coding and design of the software Project, Java NetBeans IDE, a
powerful front-end tool is used for getting Graphical User Interface (GUI)
based integrated platform and coding simplicity. As a back-end a powerful,
open source RDBMS, My SQL is used as per requirement of the CBSE
curriculum of Informatics Practices Course.
2. Objective & Scope of the Project
he objective of the software project is to develop a computerized MIS to automate the
functions of Student Details. This software project is also aimed to enhance the current
record keeping system, which will help managers to retrieve the up-to-date information at
right time in right shape.
T
The proposed software system is expected to do the following functionality-
 To provide a user friendly, Graphical User Interface (GUI) based integrated and
centralized environment for MIS activities.
 The proposed system should maintain all the records and transactions, and should generate
the required reports and information when required.
 To provide graphical and user-friendly interface to interact with a centralized database
based on client-server architecture.
 To identify the critical operation procedure and possibilities of simplification using
modern IT tools and practices.
In its current scope, the software enables user to retrieve and update the information from
centralized database designed with MySQL . This software does not require much training time of
the users due to limited functionality and simplicity.
During the development of Public Library Information System project, Java NetBeans IDE, a
powerful, open source event-driven form-based development environment is used for modular
design and future expandability of the system.
Despite of the best effort of the developer, the following limitations and functional boundaries are
visible, which limits the scope of this application software.
1. This software can store records and produce reports in pre-designed format in soft copy.
There is no facility yet to produce customized reports. Only specified reports are covered.
2. There is no provision to calculate fine or penalty etc. for defaulter members; however it
can be developed easily with the help of adding modules.
3. Some application area like accounting of books and fines etc. are not implemented in the
project. It facilitates librarian to record and update only transaction record.
3. System Implementation
3.1 The Hardware used:
While developing the system, the used hardware are:
HP PC with i7 processor or sometimes, PC with (2.40 GHz) processor having 8GB RAM,
other required devices.
3.2 The Softwares used:
 Microsoft Windows® 8.1 as Operating System.
 Java NetBeans 8.0.2 as Front-end Development environment.
 MySQL as Back-end Sever with Database for Testing.
 MS-Word 2016 for documentation.
4. System Design & Development
4.1 Database Design:
An important aspect of system design is the design of data storage structure. To begin with a
logical model of data structure is developed first. A database is a container object which contains
tables, queries, reports and data validation policies enforcement rules or contraints etc. A logical
data often represented as a records are kept in different tables after reducing anomalies and
redundancies. The goodness of data base design lies in the table structure and its relationship.
This software project maintains a database named Student which contains the following tables.
Table Design:
The database Student contains 2 tables. The tables are normalized to minimize the redundancies
of data and enforcing the validation rules of the organization. The tables are designed to store
records. The tables and their structure are given below.
Table: St
Column Name Type Size Null Key
S_ID Integer 0011 No Primary Key
Fname Varchar 0050 Yes
Lname Varchar 0050 Yes
CLASS Integer 0002 Yes
Aadhar_no Char 0012 Yes
E_mail Varchar 0012 Yes
Per_co Char 0010 Yes
Pa_contact Char 0010 Yes
cur_address Varchar 0100 Yes
Home_address Varchar 0100 Yes
POST Char 0006 Yes
Gender Char 0006 Yes
SECTION Char 0008 Yes
DOB Date Yes
Path Varchar 2000 Yes
Table: Login_Info
Column Name Type Size Null Key
Username Varchar 500 Yes Primary Key
Date Varchar 500 Yes
Time Varchar 500 Yes
Remark varchar 007 Yes
Table: ids
Column Name Type Size Null Key
Username Varchar 200 Yes Primary key
Password Varchar 100 Yes
MySQL Commands
Create database student;
Use student;
CREATE TABLE st
(
S_ID int(11) Primary Key NOT NULL,
Fname varchar(50),
Lname varchar(50)
CLASS int(2),
Aadhar_no char(12),
E_mail varchar(100),
per_Contact char(10),
pa_Contact char(10),
cur_address varchar(100),
Home_address varchar(100),
POST char(6),
Gender char(6,
SECTION char(8),
DOB date,
path varchar(2000)
);
CREATE TABLE Login_Info
(
Username Varchar(500) Primary Key,
Date Varchar(500),
Time Varchar(500),
Remark Varchar(7)
);
CREATE TABLE ids
(
Username Varchar(200) Primary Key,
Password Varchar(100)
);
4.3 jFrames Design & Event Coding:
The software project for Student contains various forms along with programming codes. Forms
(JFrames) and their event coding are given below.
Frame: Login.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
get_pass.setVisible(false);
jLabel3.setVisible(false);
this.setVisible(false);
JOptionPane.showMessageDialog(null, "Welcome to Vidyarthy Darpan App...!!!");
this.setVisible(true);
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
Statement stmt=(Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
}
private void LoginActionPerformed(java.awt.event.ActionEvent evt) {
String u_name=username.getText();
String U_pass=pass.getText();
if(u_name.equals("")&&U_pass.equals(""))
{
JOptionPane.showMessageDialog(null, "Please Enter Your Username Or Password");
}
else if(u_name.equals(""))
{
JOptionPane.showMessageDialog(null, "Please Enter Your Username");
}
else if(U_pass.equals(""))
{
JOptionPane.showMessageDialog(null, "Please Enter Your Password");
}
try
{
String u,p;
u=username.getText().toUpperCase();
p=pass.getText();
String insert ="select password from ids where username = '"+u+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(insert);
while(rs.next())
{
String ps=rs.getString("password");
get_pass.setText(ps);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
try
{
String remark ="Fail",Pass=pass.getText();
if(pass.getText().equals(get_pass.getText()))
remark="Pass";
jLabel3.setText(remark);
String insrt ="insert into login_info values('"+username.getText()+"',date(now()),time(now()),'"+jLabel3.getText()
+"');";
Class.forName("java.sql.Driver");
java.sql.Connection con= (java.sql.Connection) DriverManager.getConnection("jdbc:mysql://localhost/student",
"root", "");
java.sql.Statement stmt= (java.sql.Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
if(pass.getText().equals(get_pass.getText()))
{
this.setVisible(false);
JOptionPane.showMessageDialog(null, "WELCOME!!!");
new Student_Manager().setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null, "This Username & Password you have entered is not correct. Try
Again!!!");
}
}
private void ExitActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
private void createBTActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new CREATE().setVisible(true);
}
For Login.java
Control Name of Control Purpose
1. jMenuBar 1. date
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. Login
2. Exit
3. create
To Login(Enter) into the Program
To Exit the Program
Go to Create new User-ID Page
3. jTextField 1. username User can Enter their username
4. jPasswordField 1. pass User can Enter their Secrete
Password
Frame: CREATE.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
Statement stmt=(Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void logoutActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Login().setVisible(true);
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
jLabel4.setVisible(false);
int msg=JOptionPane.showConfirmDialog(null,"Wanna Create The New Account???");
if(pass.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"Please Enter Password");
}
else if(C_pass.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"Please Enter Confirm Password");
}
else if(pass.getText().equals(C_pass.getText()))
{
if(msg==JOptionPane.YES_OPTION)
try
{
String u,p,q;
u=username.getText();
p=pass.getText();
jLabel4.setText(p);
String insrt ="insert into ids values('"+u+"','"+jLabel4.getText()+"');";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"This Username is Already Exist", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
}
else
{
JOptionPane.showMessageDialog(null,"Password not Match..!!", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
For CREATE.java
Control Name of Control Purpose
1. jMenuBar 1. date
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. create
2. logout
To Create the new User-ID
To Logout from the Program
3. jTextField 1. username User can Enter their username
4. jPasswordField 1. pass
2. C_pass
User can Enter their Secrete
Password
To Confirm user’s, Secrete Password
Frame: Student_Manager.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void logoutActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Login().setVisible(true);
}
private void Login_infoActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Login_Information().setVisible(true);
}
private void show_RecordsActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Show_records().setVisible(true);
}
private void Student_managerActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Student_detail().setVisible(true);
}
For Student_Manager.java
Control Name of Control Purpose
1. jMenuBar 1. date
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. Logout
2. Student_manager
3. show_Records
4. Login_info
To Logout from the Program
To jump on Student-detail Page
To jump on Show all Records Page
To jump on Login-Info Page
Frame: Login_Information.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
DefaultTableModel model= (DefaultTableModel) jTable1.getModel();
jTable1.setVisible(true);
try
{
String s="Select * From login_info;";
Class.forName("java.sql.Driver");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(s);
int row=model.getRowCount();
for(int i=1;i<=row;i++)
{
model.removeRow(0);
}
while(rs.next())
{
String n,d,t,r;
n=rs.getString("username");
d=rs.getString("Date");
t=rs.getString("Time");
r=rs.getString("Remark");
model.addRow(new Object[] {n,d,t,r});
}
}
catch(Exception e)
{ }
}
private void BACKActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Student_Manager().setVisible(true);
}
For Login_information.java
Control Name of Control Purpose
1. jButton 1. Back To Back on Student-Manager Page
2. jTable 1. show To show records related to login-Info
Frame: Show_records.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
DefaultTableModel model= (DefaultTableModel) jTable1.getModel();
try
{
String s="Select * From st;";
Class.forName("java.sql.Driver");
Connection conn= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) conn.createStatement();
ResultSet rs =stmt.executeQuery(s);
while(rs.next())
{
String
SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HAD
DRESS,POST;
SID=rs.getString("S_ID");
FNAME=rs.getString("Fname");
LNAME=rs.getString("Lname");
CLASS=rs.getString("CLASS");
AADHAR=rs.getString("Aadhar_no");
MAIL=rs.getString("E_mail");
CONTACT=rs.getString("per_Contact");
PCONTACT=rs.getString("pa_Contact");
CADDRESS=rs.getString("cur_address");
HADDRESS=rs.getString("Home_address");
POST=rs.getString("POST");
SEX=rs.getString("gender");
SECTION=rs.getString("SECTION");
DOB=rs.getString("DOB");
model.addRow(new Object[]
{SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HA
DDRESS,POST});
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void search_TFKeyReleased(java.awt.event.KeyEvent evt) {
DefaultTableModel model= (DefaultTableModel) jTable1.getModel();
try
{
String ID=search_TF.getText();
String s="Select * From st where S_ID='"+ID+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(s);
int r=model.getRowCount();
for(int i=1;i<=r;i++)
{
model.removeRow(0);
}
while(rs.next())
{
String
SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HAD
DRESS,POST;
SID=rs.getString("S_ID");
FNAME=rs.getString("Fname");
LNAME=rs.getString("Lname");
CLASS=rs.getString("CLASS");
AADHAR=rs.getString("Aadhar_no");
MAIL=rs.getString("E_mail");
CONTACT=rs.getString("per_Contact");
PCONTACT=rs.getString("pa_Contact");
CADDRESS=rs.getString("cur_address");
HADDRESS=rs.getString("Home_address");
POST=rs.getString("POST");
SEX=rs.getString("gender");
SECTION=rs.getString("SECTION");
DOB=rs.getString("DOB");
model.addRow(new Object[]
{SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HA
DDRESS,POST});
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void BACKActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Student_Manager().setVisible(true);
}
For Show_records.java
Control Name of Control Purpose
1. jMenuBar 1. date
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. Back To Back on Student-Manager Page
3. jTable 2. show To show all details related to
Students
Frame: Student_detail.java
Coding:-
private void formWindowOpened(java.awt.event.WindowEvent evt) {
update.setEnabled(false);
path.setVisible(false);
changeID.setEnabled(false);
updateRecord.setEnabled(false);
section.setEnabled(false);
section_CB.setEnabled(false);
try
{
String Date="Select Date(now()), time(now());";
Class.forName("java.sql.Driver");
Connection con= (Connection)DriverManager.getConnection("jdbc:mysql://localhost", "root", "");
com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement();
ResultSet rs= stmt.executeQuery(Date);
while(rs.next())
{
String d,t;
d=rs.getString("Date(now())");
t=rs.getString("time(now())");
date.setText("Date:- "+d);
time.setText("Time:- "+t);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void BACKActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Student_Manager().setVisible(true);
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{
String ID=search_TF.getText();
String s="Select * From st where S_ID='"+ID+"';";
Class.forName("java.sql.Driver");
com.mysql.jdbc.Connection con= (com.mysql.jdbc.Connection)
DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
ResultSet rs =stmt.executeQuery(s);
while(rs.next())
{
String
SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDR
ESS,HADDRESS,POST,PATH;
SID=rs.getString("S_ID");
FNAME=rs.getString("Fname");
LNAME=rs.getString("Lname");
CLASS=rs.getString("CLASS");
AADHAR=rs.getString("Aadhar_no");
MAIL=rs.getString("E_mail");
CONTACT=rs.getString("per_Contact");
PCONTACT=rs.getString("pa_Contact");
CADDRESS=rs.getString("cur_address");
HADDRESS=rs.getString("Home_address");
POST=rs.getString("POST");
SEX=rs.getString("gender");
SECTION=rs.getString("SECTION");
DOB=rs.getString("DOB");
PATH=rs.getString("path");
if(SEX.equals("Male"))
{
sex.setSelectedIndex(0);
}
if(SEX.equals("Female"))
{
sex.setSelectedIndex(1);
}
if(SEX.equals("Other"))
{
sex.setSelectedIndex(2);
}
if(SECTION.equals("null"))
{
section_CB.setSelectedIndex(-1);
}
if(SECTION.equals("MATH"))
{
section_CB.setSelectedIndex(0);
}
if(SECTION.equals("BIOLOGY"))
{
section_CB.setSelectedIndex(1);
}
if(SECTION.equals("COMMERCE"))
{
section_CB.setSelectedIndex(2);
}
if(SECTION.equals("ART"))
{
section_CB.setSelectedIndex(3);
}
studentID_TF.setText(""+SID);
fname_TF.setText(""+FNAME);
lname_TF.setText(""+LNAME);
dob_TF.setText(""+DOB);
class_TF.setText(""+CLASS);
aadhar_TF.setText(""+AADHAR);
email_TF.setText(""+MAIL);
percontact_TF.setText(""+CONTACT);
patcontact_TF.setText(""+PCONTACT);
curaddress_TF.setText(""+CADDRESS);
hometaddress_TF.setText(""+HADDRESS);
post_TF.setText(""+POST);
int w=photo.getWidth();
int h=photo.getHeight();
ImageIcon imageIcon = new ImageIcon(new ImageIcon(PATH).getImage().getScaledInstance(w, h,
Image.SCALE_DEFAULT));
photo.setIcon(imageIcon);
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR",
JOptionPane.ERROR_MESSAGE);
}
studentID_TF.setEditable(false);
fname_TF.setEditable(false);
lname_TF.setEditable(false);
dob_TF.setEditable(false);
sex.setEnabled(false);
class_TF.setEditable(false);
section_CB.setEnabled(false);
aadhar_TF.setEditable(false);
email_TF.setEditable(false);
percontact_TF.setEditable(false);
patcontact_TF.setEditable(false);
curaddress_TF.setEditable(false);
hometaddress_TF.setEditable(false);
post_TF.setEditable(false);
changeID.setSelected(false);
updateRecord.setSelected(false);
updateRecord.setEnabled(true);
}
private void updateRecordItemStateChanged(java.awt.event.ItemEvent evt) {
if(updateRecord.isSelected())
{
changeID.setEnabled(true);
studentID_TF.setEditable(false);
fname_TF.setEditable(true);
lname_TF.setEditable(true);
dob_TF.setEditable(true);
sex.setEnabled(true);
class_TF.setEditable(true);
section_CB.setEnabled(true);
aadhar_TF.setEditable(true);
email_TF.setEditable(true);
percontact_TF.setEditable(true);
patcontact_TF.setEditable(true);
curaddress_TF.setEditable(true);
hometaddress_TF.setEditable(true);
post_TF.setEditable(true);
changeID.setEnabled(true);
}
else
{
studentID_TF.setEditable(false);
fname_TF.setEditable(false);
lname_TF.setEditable(false);
dob_TF.setEditable(false);
sex.setEnabled(false);
class_TF.setEditable(false);
section_CB.setEnabled(false);
aadhar_TF.setEditable(false);
email_TF.setEditable(false);
percontact_TF.setEditable(false);
patcontact_TF.setEditable(false);
curaddress_TF.setEditable(false);
hometaddress_TF.setEditable(false);
post_TF.setEditable(false);
changeID.setEnabled(false);
}
}
private void changeIDItemStateChanged(java.awt.event.ItemEvent evt) {
if(changeID.isSelected())
{
studentID_TF.setEditable(true);
update.setEnabled(false);
}
else
{
studentID_TF.setEditable(false);
update.setEnabled(true);
}
}
private void photoMouseClicked(java.awt.event.MouseEvent evt) {
path.setText("");
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("Select Image");
chooser.showOpenDialog(null);
File f=chooser.getSelectedFile();
String PATH=f.getAbsolutePath();
path.setText(PATH.replace('', '/' ));
int w=photo.getWidth();
int h=photo.getHeight();
ImageIcon imageIcon = new ImageIcon(new ImageIcon(PATH).getImage().getScaledInstance(w, h,
Image.SCALE_DEFAULT));
photo.setIcon(imageIcon);
}
private void class_TFKeyReleased(java.awt.event.KeyEvent evt) {
int Cl=Integer.parseInt(class_TF.getText());
if(Cl>12)
{
JOptionPane.showMessageDialog(null,"Enter Valid Class !!!");
class_TF.setText("");
}
else if(Cl>=11)
{
section.setEnabled(true);
section_CB.setEnabled(true);
}
else if(Cl<11)
{
section.setEnabled(false);
section_CB.setEnabled(false);
}
}
private void addrecordActionPerformed(java.awt.event.ActionEvent evt) {
int msg=JOptionPane.showConfirmDialog(null,"Wanna Save the record for sure???");
if(msg==JOptionPane.YES_OPTION)
try
{
String SID=studentID_TF.getText();
String Fname=fname_TF.getText();
String Lname=lname_TF.getText();
String CLASS=class_TF.getText();
String AADHAR_NO=aadhar_TF.getText();
String E_mail=email_TF.getText();
String P_Contact=percontact_TF.getText();
String Pa_Contact=patcontact_TF.getText();
String CUR_address=curaddress_TF.getText();
String Home_address=hometaddress_TF.getText();
String POST=post_TF.getText();
String Sex,SECTION;
Sex=(String) sex.getSelectedItem();
SECTION=(String) section_CB.getSelectedItem();
String DOB=dob_TF.getText();
String PATH=path.getText();
String insrt ="insert into st
values('"+SID+"','"+Fname+"','"+Lname+"','"+CLASS+"','"+AADHAR_NO+"','"+E_mail+"','"+P_Contact+"','"+Pa_
Contact+"','"+CUR_address+"','"+Home_address+"','"+POST+"','"+Sex+"','"+SECTION+"','"+DOB+"',
'"+PATH+"');";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void updateActionPerformed(java.awt.event.ActionEvent evt) {
int msg=JOptionPane.showConfirmDialog(null,"Wanna Update the record for sure???");
if(msg==JOptionPane.YES_OPTION)
try
{
String SID=studentID_TF.getText();
String Fname=fname_TF.getText();
String Lname=lname_TF.getText();
String CLASS=class_TF.getText();
String AADHAR_NO=aadhar_TF.getText();
String E_mail=email_TF.getText();
String P_Contact=percontact_TF.getText();
String Pa_Contact=patcontact_TF.getText();
String CUR_address=curaddress_TF.getText();
String Home_address=hometaddress_TF.getText();
String POST=post_TF.getText();
String Sex,SECTION;
Sex=(String) sex.getSelectedItem();
SECTION=(String) section_CB.getSelectedItem();
String DOB=dob_TF.getText();
String PATH=path.getText().replace('', '/');
String insrt ="update st set Fname='"+Fname+"', Lname='"+Lname+"', CLASS='"+CLASS+"',
Aadhar_no='"+AADHAR_NO+"', E_mail='"+E_mail+"', per_Contact='"+P_Contact+"',
pa_Contact='"+Pa_Contact+"',cur_address='"+CUR_address+"', Home_address='"+Home_address+"',
POST='"+POST+"', gender='"+Sex+"', SECTION='"+SECTION+"', DOB='"+DOB+"', path='"+PATH+"' where
S_ID='"+SID+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void clearActionPerformed(java.awt.event.ActionEvent evt) {
path.setText("");
section.setEnabled(false);
section_CB.setEnabled(false);
studentID_TF.setText("");
fname_TF.setText("");
lname_TF.setText("");
dob_TF.setText("");
class_TF.setText("");
aadhar_TF.setText("");
email_TF.setText("");
percontact_TF.setText("");
patcontact_TF.setText("");
curaddress_TF.setText("");
hometaddress_TF.setText("");
post_TF.setText("");
search_TF.setText("");
sex.setSelectedIndex(0);
section_CB.setSelectedIndex(-1);
changeID.setSelected(false);
changeID.setEnabled(false);
updateRecord.setSelected(false);
updateRecord.setEnabled(false);
photo.setIcon(newImageIcon("C:UsersGaurav_2DocumentsNetBeansProjectsStudentbuildclassesProject
profile-icon.png"));
}
private void deleteRecordActionPerformed(java.awt.event.ActionEvent evt) {
int msg=JOptionPane.showConfirmDialog(null,"Wanna Delete the record for sure???");
if(msg==JOptionPane.YES_OPTION)
try
{
String SID=studentID_TF.getText();
String insrt ="delete from st where S_ID='"+SID+"';";
Class.forName("java.sql.Driver");
Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", "");
Statement stmt= (Statement) con.createStatement();
stmt.executeUpdate(insrt);
section.setEnabled(false);
section_CB.setEnabled(false);
studentID_TF.setText("");
fname_TF.setText("");
lname_TF.setText("");
dob_TF.setText("");
class_TF.setText("");
aadhar_TF.setText("");
email_TF.setText("");
percontact_TF.setText("");
patcontact_TF.setText("");
curaddress_TF.setText("");
hometaddress_TF.setText("");
post_TF.setText("");
search_TF.setText("");
sex.setSelectedIndex(0);
section_CB.setSelectedIndex(-1);
changeID.setSelected(false);
updateRecord.setSelected(false);
changeID.setEnabled(false);
updateRecord.setEnabled(false);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE);
}
}
private void exitPActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
private void showalldataActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Show_records().setVisible(true);
}
For Student_detail.java
Control Name of Control Purpose
1. jMenuBar 1. date
2. time
To Display the Current Date
To Display the Current Time
2. jButton 1. BACK
2. addrecord
3. update
4. clear
5. deleteRecord
To Back on Student-Manager Page
To add a new student record
To update a record that already Exist
To clear Enter Data Currently
To delete currently open record
6. jCheckBox 1. updateRecord
2. changeID
To enable option to update the record
7. jComboBox 1. sex
2. section_CB
User can select their gender
User can select their School Section
3. jTextField 1. path
2. search_TF
3. studentID_TF
4. fname_TF
5. lname_TF
6. dob_TF
7. class_TF
8. aadhar_TF
9. email_TF
10. percontact_TF
To set photo Path
To search stdent record
User can enter their student ID
User can enter their First Name
User can enter their Last Name
User can enter their Date of Birth
User can enter their class
User can enter their Aadhar no
User can enter their email address
User can enter their personal no
11. patcontact_TF
12. curaddress_TF
13. hometaddress_TF
14. post_TF
User can enter their parents contact no
User can enter their current address
User can enter their home address
User can enter their Post code
5. User Manual
5.1 How to install Software:.
Database Installation
The software project is distributed with a backup copy of a Database named Student with
required tables. Some dummy records are present in the tables for testing purposes, which can be
deleted before inserting real data. The project is shipped with Student.SQL file which installs a
database and tables in the computer system.
Note:- The PC must have MySQL server with user (root) and password ( ) . If root password is
any other password, it can be changed by running MySQL Server Instance Configure Wizard.
Start Program  MySQL MySQL Server MySQL Server Instance Config Wizard
Provide current password of root and new password as “” , this will change the root password.
To install a MySQL database from a dump file ( Student.sql), simply follow the following steps.
Step 1: Copy the Student.sql file in C:Program filesMysqlMySql server 5.1Bin folder.
Step 2: Open MySQL and type the following command to create the dabase named Student.
mysql> create database Student;
Step 3: Open Command Window (Start Run  cmd)
Step 4: Go to the following folder using CD command
C:Program filesMysqlMySql server 5.1Bin>
Step 5: type the following command on above prompt -
C:….bin> mysql -u root -p Student < Student.sql
This will create a Student database with required tables.

More Related Content

What's hot

IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
Sylvester Correya
 
CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL
Rishabh-Rawat
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12
OmRanjan2
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12
Self-employed
 
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfCOMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
AkshatTiwari530170
 
Computer project final for class 12 Students
Computer project final for class 12 StudentsComputer project final for class 12 Students
Computer project final for class 12 Students
Shahban Ali
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
Harsh Kumar
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
Darshit Vaghasiya
 
Clothing Store and Management System
Clothing Store and Management SystemClothing Store and Management System
Clothing Store and Management System
Ashwini0951
 
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
Anushka Rai
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgement
Anupam Narang
 
Acknowledgement
AcknowledgementAcknowledgement
Acknowledgement
Utkarsh0825
 
Computer Science investigatory project class 12
Computer Science investigatory project class 12Computer Science investigatory project class 12
Computer Science investigatory project class 12
Raunak Yadav
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
HarshitSachdeva17
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload last
Arunav Ray
 
Project report
Project reportProject report
Project report
VISHAL VERMA
 
Ip project
Ip projectIp project
Ip project
Jasmeet Singh
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentation
Chaudhry Sajid
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
ArkaSarkar23
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
Aditya Shah
 

What's hot (20)

IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
 
CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12
 
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdfCOMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
COMPUTER SCIENCE PROJECT OF RAILWAY RESERVATION SYSTEM PYTHON PROGRAMMING.pdf
 
Computer project final for class 12 Students
Computer project final for class 12 StudentsComputer project final for class 12 Students
Computer project final for class 12 Students
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
Library Management Python, MySQL
Library Management Python, MySQLLibrary Management Python, MySQL
Library Management Python, MySQL
 
Clothing Store and Management System
Clothing Store and Management SystemClothing Store and Management System
Clothing Store and Management System
 
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgement
 
Acknowledgement
AcknowledgementAcknowledgement
Acknowledgement
 
Computer Science investigatory project class 12
Computer Science investigatory project class 12Computer Science investigatory project class 12
Computer Science investigatory project class 12
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload last
 
Project report
Project reportProject report
Project report
 
Ip project
Ip projectIp project
Ip project
 
Banking Management System Project documentation
Banking Management System Project documentationBanking Management System Project documentation
Banking Management System Project documentation
 
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 

Similar to class 12 board project on database connectivity (java to SQL)

Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
 Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination... Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
Sarthak Khabiya
 
INDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdfINDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdf
DevaPrakash20
 
E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)
Yashraj Nigam
 
Studentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyrStudentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyr
053VENKADESHKUMARVK
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual
Chitrarasan Kathiravan
 
Password management
Password managementPassword management
Password management
Sai Kumar
 
Student database management system
Student database management systemStudent database management system
Student database management system
Snehal Raut
 
Project 2
Project 2Project 2
Project 2
Brandon Sine
 
Online examination management system..pdf
Online examination management system..pdfOnline examination management system..pdf
Online examination management system..pdf
Kamal Acharya
 
Tutorial Hub presentation
Tutorial Hub  presentationTutorial Hub  presentation
Tutorial Hub presentation
Harishpatil75
 
3 job adda doc 1
3 job adda doc 13 job adda doc 1
3 job adda doc 1
SURAJ KUMAR YADAVA
 
Student information management system.pdf
Student information management system.pdfStudent information management system.pdf
Student information management system.pdf
Kamal Acharya
 
Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)
Reinier Eiman
 
Vade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docxVade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docx
GeetaShreeprabha
 
3 job adda doc 1
3 job adda doc 13 job adda doc 1
3 job adda doc 1
SURAJ KUMAR YADAVA
 
Standalone desktop application
Standalone desktop applicationStandalone desktop application
Standalone desktop application
Shreya Dandavate
 
Final project se
Final project seFinal project se
Final project se
nadeem shahzad
 
Nagacv
NagacvNagacv
Project report
Project report Project report
Project report
MansiKulkarni18
 
Student result management system project using angular.pdf
Student result management system project using angular.pdfStudent result management system project using angular.pdf
Student result management system project using angular.pdf
AbhilashBanki1
 

Similar to class 12 board project on database connectivity (java to SQL) (20)

Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
 Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination... Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
Java Project "JPS-School Management System" CBSE AISSCE Pratical Examination...
 
INDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdfINDUSTRIAL TRAINING SAMPLE.pdf
INDUSTRIAL TRAINING SAMPLE.pdf
 
E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)E learning project report (Yashraj Nigam)
E learning project report (Yashraj Nigam)
 
Studentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyrStudentinformationmanagementsystem.pdf iyr
Studentinformationmanagementsystem.pdf iyr
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual
 
Password management
Password managementPassword management
Password management
 
Student database management system
Student database management systemStudent database management system
Student database management system
 
Project 2
Project 2Project 2
Project 2
 
Online examination management system..pdf
Online examination management system..pdfOnline examination management system..pdf
Online examination management system..pdf
 
Tutorial Hub presentation
Tutorial Hub  presentationTutorial Hub  presentation
Tutorial Hub presentation
 
3 job adda doc 1
3 job adda doc 13 job adda doc 1
3 job adda doc 1
 
Student information management system.pdf
Student information management system.pdfStudent information management system.pdf
Student information management system.pdf
 
Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)Phase 1 Documentation (Added System Req)
Phase 1 Documentation (Added System Req)
 
Vade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docxVade Meccum_Book reading and publishing software NetBeans.docx
Vade Meccum_Book reading and publishing software NetBeans.docx
 
3 job adda doc 1
3 job adda doc 13 job adda doc 1
3 job adda doc 1
 
Standalone desktop application
Standalone desktop applicationStandalone desktop application
Standalone desktop application
 
Final project se
Final project seFinal project se
Final project se
 
Nagacv
NagacvNagacv
Nagacv
 
Project report
Project report Project report
Project report
 
Student result management system project using angular.pdf
Student result management system project using angular.pdfStudent result management system project using angular.pdf
Student result management system project using angular.pdf
 

Recently uploaded

Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 

Recently uploaded (20)

Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 

class 12 board project on database connectivity (java to SQL)

  • 1. Kendriya Vidyalaya Durg A Project Report on Vidyarthy Darpan For Class 12 Examination [As a part of the Informatics Practices Course (065)] SUBMITTED BY:-
  • 2. Gaurav Kumar [Roll No. 6647663] Under the Guidance of :- Pratibha Bhele PGT (Comp.Sc)
  • 3. CERTIFICATE This is to certify that the Project / Dissertation entitled Vidyarthy Darpan is a bonafide work done by Master Gaurav Kumar of class XII Session 2016-17 in partial fulfillment of CBSE Examination 2017 and has been carried out under my direct supervision and guidance. This report or a similar report on the topic has not been submitted for any other examination and does not form a part of any other course undergone by the candidate. ………………………… …………………………….. Signature of Student Signature of Teacher/Guide Name.: Gaurav Kumar Name.: Pratibha Bhele Roll No.: 6647663 Designation.: PGT (Comp.Sc.)
  • 4. ……….………………… Signature of Principal Name: Gloria Minj ACKNOWLEDGEMENT undertook this Project work, as the part of my XII- Informatics Practices course. I had tried to apply my best of knowledge and experience, gained during the study and class work experience. However, developing software system is generally a quite complex and time-consuming process. It requires a systematic study, insight vision and professional approach during the design and development. Moreover, the developer always feels the need, the help and good wishes of the people near you, who have considerable experience and idea. I I would like to extend my sincere thanks and gratitude to my teacher Pratibha Bhele. I am very much thankful to our Principal Ms. Gloria Minj for giving valuable time and moral support to develop this software. I would like to take the opportunity to extend my sincere thanks and gratitude to my father Shri Rajpal Singh, and my mother Mrs. Krishna Devi for being a source of inspiration and providing time and freedom to develop this software project.
  • 5. I also feel indebted to my Friends for the valuable suggestions during the project work. Gaurav Kumar. Class XIIth C o n t e n t s ………………………… ……………………………..--------------------------------------3 Signature of Student Signature of Teacher/Guide--------------------------------------3 Signature of Principal....................................................................................4 3.1 The Hardware used: -------------------------------------------------------------------------9 3.2 The Softwares used:-------------------------------------------------------------------------9 4.1 Database Design:---------------------------------------------------------------------------10 Table Design:..................................................................................................10 4.3 jFrames Design & Event Coding:--------------------------------------------------------13 5.1 How to install Software:.-------------------------------------------------------------------33 Database Installation.......................................................................................33
  • 6. 1. Introduction This software project is developed to automate the functionalities of Students. The purpose of the software project is to develop the Management Information System (MIS) to automate the record keeping of Students. A MIS mainly consists of a computerized database, a collection of inter- related tables for a particular subject or purpose, capable to produce different reports relevant to the user. An application program is tied with the database for easy access and interface to the database. Using Application program or front-end, we can store, retrieve and manage all information in proper way. This software, being simple in design and working, does not require much of training to users, and can be used as a powerful tool for Storing Student Details. During coding and design of the software Project, Java NetBeans IDE, a powerful front-end tool is used for getting Graphical User Interface (GUI) based integrated platform and coding simplicity. As a back-end a powerful, open source RDBMS, My SQL is used as per requirement of the CBSE curriculum of Informatics Practices Course.
  • 7. 2. Objective & Scope of the Project he objective of the software project is to develop a computerized MIS to automate the functions of Student Details. This software project is also aimed to enhance the current record keeping system, which will help managers to retrieve the up-to-date information at right time in right shape. T The proposed software system is expected to do the following functionality-  To provide a user friendly, Graphical User Interface (GUI) based integrated and centralized environment for MIS activities.  The proposed system should maintain all the records and transactions, and should generate the required reports and information when required.  To provide graphical and user-friendly interface to interact with a centralized database based on client-server architecture.  To identify the critical operation procedure and possibilities of simplification using modern IT tools and practices. In its current scope, the software enables user to retrieve and update the information from centralized database designed with MySQL . This software does not require much training time of the users due to limited functionality and simplicity. During the development of Public Library Information System project, Java NetBeans IDE, a powerful, open source event-driven form-based development environment is used for modular design and future expandability of the system. Despite of the best effort of the developer, the following limitations and functional boundaries are visible, which limits the scope of this application software. 1. This software can store records and produce reports in pre-designed format in soft copy. There is no facility yet to produce customized reports. Only specified reports are covered. 2. There is no provision to calculate fine or penalty etc. for defaulter members; however it can be developed easily with the help of adding modules.
  • 8. 3. Some application area like accounting of books and fines etc. are not implemented in the project. It facilitates librarian to record and update only transaction record.
  • 9. 3. System Implementation 3.1 The Hardware used: While developing the system, the used hardware are: HP PC with i7 processor or sometimes, PC with (2.40 GHz) processor having 8GB RAM, other required devices. 3.2 The Softwares used:  Microsoft Windows® 8.1 as Operating System.  Java NetBeans 8.0.2 as Front-end Development environment.  MySQL as Back-end Sever with Database for Testing.  MS-Word 2016 for documentation.
  • 10. 4. System Design & Development 4.1 Database Design: An important aspect of system design is the design of data storage structure. To begin with a logical model of data structure is developed first. A database is a container object which contains tables, queries, reports and data validation policies enforcement rules or contraints etc. A logical data often represented as a records are kept in different tables after reducing anomalies and redundancies. The goodness of data base design lies in the table structure and its relationship. This software project maintains a database named Student which contains the following tables. Table Design: The database Student contains 2 tables. The tables are normalized to minimize the redundancies of data and enforcing the validation rules of the organization. The tables are designed to store records. The tables and their structure are given below. Table: St Column Name Type Size Null Key S_ID Integer 0011 No Primary Key Fname Varchar 0050 Yes Lname Varchar 0050 Yes CLASS Integer 0002 Yes Aadhar_no Char 0012 Yes E_mail Varchar 0012 Yes Per_co Char 0010 Yes Pa_contact Char 0010 Yes cur_address Varchar 0100 Yes Home_address Varchar 0100 Yes POST Char 0006 Yes Gender Char 0006 Yes SECTION Char 0008 Yes DOB Date Yes Path Varchar 2000 Yes
  • 11. Table: Login_Info Column Name Type Size Null Key Username Varchar 500 Yes Primary Key Date Varchar 500 Yes Time Varchar 500 Yes Remark varchar 007 Yes Table: ids Column Name Type Size Null Key Username Varchar 200 Yes Primary key Password Varchar 100 Yes MySQL Commands Create database student; Use student; CREATE TABLE st ( S_ID int(11) Primary Key NOT NULL, Fname varchar(50), Lname varchar(50)
  • 12. CLASS int(2), Aadhar_no char(12), E_mail varchar(100), per_Contact char(10), pa_Contact char(10), cur_address varchar(100), Home_address varchar(100), POST char(6), Gender char(6, SECTION char(8), DOB date, path varchar(2000) ); CREATE TABLE Login_Info ( Username Varchar(500) Primary Key, Date Varchar(500), Time Varchar(500), Remark Varchar(7) ); CREATE TABLE ids ( Username Varchar(200) Primary Key, Password Varchar(100) );
  • 13. 4.3 jFrames Design & Event Coding: The software project for Student contains various forms along with programming codes. Forms (JFrames) and their event coding are given below. Frame: Login.java Coding:- private void formWindowOpened(java.awt.event.WindowEvent evt) { get_pass.setVisible(false); jLabel3.setVisible(false); this.setVisible(false); JOptionPane.showMessageDialog(null, "Welcome to Vidyarthy Darpan App...!!!"); this.setVisible(true); try { String Date="Select Date(now()), time(now());"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", ""); Statement stmt=(Statement) con.createStatement(); ResultSet rs= stmt.executeQuery(Date); while(rs.next()) { String d,t; d=rs.getString("Date(now())"); t=rs.getString("time(now())"); date.setText("Date:- "+d); time.setText("Time:- "+t);
  • 14. } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void LoginActionPerformed(java.awt.event.ActionEvent evt) { String u_name=username.getText(); String U_pass=pass.getText(); if(u_name.equals("")&&U_pass.equals("")) { JOptionPane.showMessageDialog(null, "Please Enter Your Username Or Password"); } else if(u_name.equals("")) { JOptionPane.showMessageDialog(null, "Please Enter Your Username"); } else if(U_pass.equals("")) { JOptionPane.showMessageDialog(null, "Please Enter Your Password"); } try { String u,p; u=username.getText().toUpperCase(); p=pass.getText(); String insert ="select password from ids where username = '"+u+"';"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); ResultSet rs =stmt.executeQuery(insert); while(rs.next()) { String ps=rs.getString("password"); get_pass.setText(ps); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } try { String remark ="Fail",Pass=pass.getText(); if(pass.getText().equals(get_pass.getText())) remark="Pass"; jLabel3.setText(remark); String insrt ="insert into login_info values('"+username.getText()+"',date(now()),time(now()),'"+jLabel3.getText() +"');"; Class.forName("java.sql.Driver"); java.sql.Connection con= (java.sql.Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); java.sql.Statement stmt= (java.sql.Statement) con.createStatement(); stmt.executeUpdate(insrt); }
  • 15. catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } if(pass.getText().equals(get_pass.getText())) { this.setVisible(false); JOptionPane.showMessageDialog(null, "WELCOME!!!"); new Student_Manager().setVisible(true); } else { JOptionPane.showMessageDialog(null, "This Username & Password you have entered is not correct. Try Again!!!"); } } private void ExitActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); } private void createBTActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new CREATE().setVisible(true); } For Login.java Control Name of Control Purpose 1. jMenuBar 1. date 2. time To Display the Current Date To Display the Current Time 2. jButton 1. Login 2. Exit 3. create To Login(Enter) into the Program To Exit the Program Go to Create new User-ID Page 3. jTextField 1. username User can Enter their username 4. jPasswordField 1. pass User can Enter their Secrete Password Frame: CREATE.java
  • 16. Coding:- private void formWindowOpened(java.awt.event.WindowEvent evt) { try { String Date="Select Date(now()), time(now());"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", ""); Statement stmt=(Statement) con.createStatement(); ResultSet rs= stmt.executeQuery(Date); while(rs.next()) { String d,t; d=rs.getString("Date(now())"); t=rs.getString("time(now())"); date.setText("Date:- "+d); time.setText("Time:- "+t); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void logoutActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Login().setVisible(true); } private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { jLabel4.setVisible(false); int msg=JOptionPane.showConfirmDialog(null,"Wanna Create The New Account???"); if(pass.getText().equals("")) { JOptionPane.showMessageDialog(null,"Please Enter Password"); } else if(C_pass.getText().equals("")) { JOptionPane.showMessageDialog(null,"Please Enter Confirm Password"); } else if(pass.getText().equals(C_pass.getText()))
  • 17. { if(msg==JOptionPane.YES_OPTION) try { String u,p,q; u=username.getText(); p=pass.getText(); jLabel4.setText(p); String insrt ="insert into ids values('"+u+"','"+jLabel4.getText()+"');"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); stmt.executeUpdate(insrt); } catch(Exception e) { JOptionPane.showMessageDialog(null,"This Username is Already Exist", "ERROR", JOptionPane.ERROR_MESSAGE); } } else { JOptionPane.showMessageDialog(null,"Password not Match..!!", "ERROR", JOptionPane.ERROR_MESSAGE); } } For CREATE.java Control Name of Control Purpose 1. jMenuBar 1. date 2. time To Display the Current Date To Display the Current Time 2. jButton 1. create 2. logout To Create the new User-ID To Logout from the Program 3. jTextField 1. username User can Enter their username 4. jPasswordField 1. pass 2. C_pass User can Enter their Secrete Password To Confirm user’s, Secrete Password Frame: Student_Manager.java
  • 18. Coding:- private void formWindowOpened(java.awt.event.WindowEvent evt) { try { String Date="Select Date(now()), time(now());"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", ""); com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement(); ResultSet rs= stmt.executeQuery(Date); while(rs.next()) { String d,t; d=rs.getString("Date(now())"); t=rs.getString("time(now())"); date.setText("Date:- "+d); time.setText("Time:- "+t); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void logoutActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Login().setVisible(true); } private void Login_infoActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Login_Information().setVisible(true); } private void show_RecordsActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Show_records().setVisible(true); } private void Student_managerActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Student_detail().setVisible(true);
  • 19. } For Student_Manager.java Control Name of Control Purpose 1. jMenuBar 1. date 2. time To Display the Current Date To Display the Current Time 2. jButton 1. Logout 2. Student_manager 3. show_Records 4. Login_info To Logout from the Program To jump on Student-detail Page To jump on Show all Records Page To jump on Login-Info Page Frame: Login_Information.java Coding:- private void formWindowOpened(java.awt.event.WindowEvent evt) { DefaultTableModel model= (DefaultTableModel) jTable1.getModel(); jTable1.setVisible(true); try { String s="Select * From login_info;"; Class.forName("java.sql.Driver"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); ResultSet rs =stmt.executeQuery(s); int row=model.getRowCount(); for(int i=1;i<=row;i++) { model.removeRow(0); } while(rs.next()) {
  • 20. String n,d,t,r; n=rs.getString("username"); d=rs.getString("Date"); t=rs.getString("Time"); r=rs.getString("Remark"); model.addRow(new Object[] {n,d,t,r}); } } catch(Exception e) { } } private void BACKActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Student_Manager().setVisible(true); } For Login_information.java Control Name of Control Purpose 1. jButton 1. Back To Back on Student-Manager Page 2. jTable 1. show To show records related to login-Info
  • 22.
  • 23. Coding:- private void formWindowOpened(java.awt.event.WindowEvent evt) { try { String Date="Select Date(now()), time(now());"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost", "root", ""); com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement(); ResultSet rs= stmt.executeQuery(Date); while(rs.next()) { String d,t; d=rs.getString("Date(now())"); t=rs.getString("time(now())"); date.setText("Date:- "+d); time.setText("Time:- "+t); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } DefaultTableModel model= (DefaultTableModel) jTable1.getModel(); try { String s="Select * From st;"; Class.forName("java.sql.Driver"); Connection conn= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) conn.createStatement(); ResultSet rs =stmt.executeQuery(s); while(rs.next()) { String SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HAD DRESS,POST; SID=rs.getString("S_ID"); FNAME=rs.getString("Fname"); LNAME=rs.getString("Lname"); CLASS=rs.getString("CLASS"); AADHAR=rs.getString("Aadhar_no"); MAIL=rs.getString("E_mail"); CONTACT=rs.getString("per_Contact"); PCONTACT=rs.getString("pa_Contact"); CADDRESS=rs.getString("cur_address"); HADDRESS=rs.getString("Home_address"); POST=rs.getString("POST"); SEX=rs.getString("gender"); SECTION=rs.getString("SECTION"); DOB=rs.getString("DOB"); model.addRow(new Object[] {SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HA DDRESS,POST}); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } }
  • 24. private void search_TFKeyReleased(java.awt.event.KeyEvent evt) { DefaultTableModel model= (DefaultTableModel) jTable1.getModel(); try { String ID=search_TF.getText(); String s="Select * From st where S_ID='"+ID+"';"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); ResultSet rs =stmt.executeQuery(s); int r=model.getRowCount(); for(int i=1;i<=r;i++) { model.removeRow(0); } while(rs.next()) { String SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HAD DRESS,POST; SID=rs.getString("S_ID"); FNAME=rs.getString("Fname"); LNAME=rs.getString("Lname"); CLASS=rs.getString("CLASS"); AADHAR=rs.getString("Aadhar_no"); MAIL=rs.getString("E_mail"); CONTACT=rs.getString("per_Contact"); PCONTACT=rs.getString("pa_Contact"); CADDRESS=rs.getString("cur_address"); HADDRESS=rs.getString("Home_address"); POST=rs.getString("POST"); SEX=rs.getString("gender"); SECTION=rs.getString("SECTION"); DOB=rs.getString("DOB"); model.addRow(new Object[] {SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDRESS,HA DDRESS,POST}); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void BACKActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Student_Manager().setVisible(true); } For Show_records.java Control Name of Control Purpose 1. jMenuBar 1. date 2. time To Display the Current Date To Display the Current Time 2. jButton 1. Back To Back on Student-Manager Page 3. jTable 2. show To show all details related to
  • 25. Students Frame: Student_detail.java Coding:- private void formWindowOpened(java.awt.event.WindowEvent evt) { update.setEnabled(false); path.setVisible(false); changeID.setEnabled(false); updateRecord.setEnabled(false); section.setEnabled(false);
  • 26. section_CB.setEnabled(false); try { String Date="Select Date(now()), time(now());"; Class.forName("java.sql.Driver"); Connection con= (Connection)DriverManager.getConnection("jdbc:mysql://localhost", "root", ""); com.mysql.jdbc.Statement stmt=(com.mysql.jdbc.Statement) con.createStatement(); ResultSet rs= stmt.executeQuery(Date); while(rs.next()) { String d,t; d=rs.getString("Date(now())"); t=rs.getString("time(now())"); date.setText("Date:- "+d); time.setText("Time:- "+t); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void BACKActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Student_Manager().setVisible(true); } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try { String ID=search_TF.getText(); String s="Select * From st where S_ID='"+ID+"';"; Class.forName("java.sql.Driver"); com.mysql.jdbc.Connection con= (com.mysql.jdbc.Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); ResultSet rs =stmt.executeQuery(s); while(rs.next()) { String SID,FNAME,LNAME,DOB,SEX,CLASS,SECTION,AADHAR,MAIL,CONTACT,PCONTACT,CADDR ESS,HADDRESS,POST,PATH; SID=rs.getString("S_ID"); FNAME=rs.getString("Fname"); LNAME=rs.getString("Lname"); CLASS=rs.getString("CLASS"); AADHAR=rs.getString("Aadhar_no"); MAIL=rs.getString("E_mail"); CONTACT=rs.getString("per_Contact"); PCONTACT=rs.getString("pa_Contact"); CADDRESS=rs.getString("cur_address"); HADDRESS=rs.getString("Home_address"); POST=rs.getString("POST"); SEX=rs.getString("gender"); SECTION=rs.getString("SECTION"); DOB=rs.getString("DOB"); PATH=rs.getString("path"); if(SEX.equals("Male")) {
  • 27. sex.setSelectedIndex(0); } if(SEX.equals("Female")) { sex.setSelectedIndex(1); } if(SEX.equals("Other")) { sex.setSelectedIndex(2); } if(SECTION.equals("null")) { section_CB.setSelectedIndex(-1); } if(SECTION.equals("MATH")) { section_CB.setSelectedIndex(0); } if(SECTION.equals("BIOLOGY")) { section_CB.setSelectedIndex(1); } if(SECTION.equals("COMMERCE")) { section_CB.setSelectedIndex(2); } if(SECTION.equals("ART")) { section_CB.setSelectedIndex(3); } studentID_TF.setText(""+SID); fname_TF.setText(""+FNAME); lname_TF.setText(""+LNAME); dob_TF.setText(""+DOB); class_TF.setText(""+CLASS); aadhar_TF.setText(""+AADHAR); email_TF.setText(""+MAIL); percontact_TF.setText(""+CONTACT); patcontact_TF.setText(""+PCONTACT); curaddress_TF.setText(""+CADDRESS); hometaddress_TF.setText(""+HADDRESS); post_TF.setText(""+POST); int w=photo.getWidth(); int h=photo.getHeight(); ImageIcon imageIcon = new ImageIcon(new ImageIcon(PATH).getImage().getScaledInstance(w, h, Image.SCALE_DEFAULT)); photo.setIcon(imageIcon); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } studentID_TF.setEditable(false); fname_TF.setEditable(false); lname_TF.setEditable(false); dob_TF.setEditable(false); sex.setEnabled(false); class_TF.setEditable(false); section_CB.setEnabled(false);
  • 28. aadhar_TF.setEditable(false); email_TF.setEditable(false); percontact_TF.setEditable(false); patcontact_TF.setEditable(false); curaddress_TF.setEditable(false); hometaddress_TF.setEditable(false); post_TF.setEditable(false); changeID.setSelected(false); updateRecord.setSelected(false); updateRecord.setEnabled(true); } private void updateRecordItemStateChanged(java.awt.event.ItemEvent evt) { if(updateRecord.isSelected()) { changeID.setEnabled(true); studentID_TF.setEditable(false); fname_TF.setEditable(true); lname_TF.setEditable(true); dob_TF.setEditable(true); sex.setEnabled(true); class_TF.setEditable(true); section_CB.setEnabled(true); aadhar_TF.setEditable(true); email_TF.setEditable(true); percontact_TF.setEditable(true); patcontact_TF.setEditable(true); curaddress_TF.setEditable(true); hometaddress_TF.setEditable(true); post_TF.setEditable(true); changeID.setEnabled(true); } else { studentID_TF.setEditable(false); fname_TF.setEditable(false); lname_TF.setEditable(false); dob_TF.setEditable(false); sex.setEnabled(false); class_TF.setEditable(false); section_CB.setEnabled(false); aadhar_TF.setEditable(false); email_TF.setEditable(false); percontact_TF.setEditable(false); patcontact_TF.setEditable(false); curaddress_TF.setEditable(false); hometaddress_TF.setEditable(false); post_TF.setEditable(false); changeID.setEnabled(false); } } private void changeIDItemStateChanged(java.awt.event.ItemEvent evt) { if(changeID.isSelected()) { studentID_TF.setEditable(true); update.setEnabled(false); } else
  • 29. { studentID_TF.setEditable(false); update.setEnabled(true); } } private void photoMouseClicked(java.awt.event.MouseEvent evt) { path.setText(""); JFileChooser chooser = new JFileChooser(); chooser.setDialogTitle("Select Image"); chooser.showOpenDialog(null); File f=chooser.getSelectedFile(); String PATH=f.getAbsolutePath(); path.setText(PATH.replace('', '/' )); int w=photo.getWidth(); int h=photo.getHeight(); ImageIcon imageIcon = new ImageIcon(new ImageIcon(PATH).getImage().getScaledInstance(w, h, Image.SCALE_DEFAULT)); photo.setIcon(imageIcon); } private void class_TFKeyReleased(java.awt.event.KeyEvent evt) { int Cl=Integer.parseInt(class_TF.getText()); if(Cl>12) { JOptionPane.showMessageDialog(null,"Enter Valid Class !!!"); class_TF.setText(""); } else if(Cl>=11) { section.setEnabled(true); section_CB.setEnabled(true); } else if(Cl<11) { section.setEnabled(false); section_CB.setEnabled(false); } } private void addrecordActionPerformed(java.awt.event.ActionEvent evt) { int msg=JOptionPane.showConfirmDialog(null,"Wanna Save the record for sure???"); if(msg==JOptionPane.YES_OPTION) try { String SID=studentID_TF.getText(); String Fname=fname_TF.getText(); String Lname=lname_TF.getText(); String CLASS=class_TF.getText(); String AADHAR_NO=aadhar_TF.getText(); String E_mail=email_TF.getText(); String P_Contact=percontact_TF.getText(); String Pa_Contact=patcontact_TF.getText(); String CUR_address=curaddress_TF.getText(); String Home_address=hometaddress_TF.getText(); String POST=post_TF.getText(); String Sex,SECTION; Sex=(String) sex.getSelectedItem(); SECTION=(String) section_CB.getSelectedItem(); String DOB=dob_TF.getText();
  • 30. String PATH=path.getText(); String insrt ="insert into st values('"+SID+"','"+Fname+"','"+Lname+"','"+CLASS+"','"+AADHAR_NO+"','"+E_mail+"','"+P_Contact+"','"+Pa_ Contact+"','"+CUR_address+"','"+Home_address+"','"+POST+"','"+Sex+"','"+SECTION+"','"+DOB+"', '"+PATH+"');"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); stmt.executeUpdate(insrt); } catch (Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void updateActionPerformed(java.awt.event.ActionEvent evt) { int msg=JOptionPane.showConfirmDialog(null,"Wanna Update the record for sure???"); if(msg==JOptionPane.YES_OPTION) try { String SID=studentID_TF.getText(); String Fname=fname_TF.getText(); String Lname=lname_TF.getText(); String CLASS=class_TF.getText(); String AADHAR_NO=aadhar_TF.getText(); String E_mail=email_TF.getText(); String P_Contact=percontact_TF.getText(); String Pa_Contact=patcontact_TF.getText(); String CUR_address=curaddress_TF.getText(); String Home_address=hometaddress_TF.getText(); String POST=post_TF.getText(); String Sex,SECTION; Sex=(String) sex.getSelectedItem(); SECTION=(String) section_CB.getSelectedItem(); String DOB=dob_TF.getText(); String PATH=path.getText().replace('', '/'); String insrt ="update st set Fname='"+Fname+"', Lname='"+Lname+"', CLASS='"+CLASS+"', Aadhar_no='"+AADHAR_NO+"', E_mail='"+E_mail+"', per_Contact='"+P_Contact+"', pa_Contact='"+Pa_Contact+"',cur_address='"+CUR_address+"', Home_address='"+Home_address+"', POST='"+POST+"', gender='"+Sex+"', SECTION='"+SECTION+"', DOB='"+DOB+"', path='"+PATH+"' where S_ID='"+SID+"';"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); stmt.executeUpdate(insrt); } catch (Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } } private void clearActionPerformed(java.awt.event.ActionEvent evt) { path.setText(""); section.setEnabled(false); section_CB.setEnabled(false); studentID_TF.setText(""); fname_TF.setText("");
  • 31. lname_TF.setText(""); dob_TF.setText(""); class_TF.setText(""); aadhar_TF.setText(""); email_TF.setText(""); percontact_TF.setText(""); patcontact_TF.setText(""); curaddress_TF.setText(""); hometaddress_TF.setText(""); post_TF.setText(""); search_TF.setText(""); sex.setSelectedIndex(0); section_CB.setSelectedIndex(-1); changeID.setSelected(false); changeID.setEnabled(false); updateRecord.setSelected(false); updateRecord.setEnabled(false); photo.setIcon(newImageIcon("C:UsersGaurav_2DocumentsNetBeansProjectsStudentbuildclassesProject profile-icon.png")); } private void deleteRecordActionPerformed(java.awt.event.ActionEvent evt) { int msg=JOptionPane.showConfirmDialog(null,"Wanna Delete the record for sure???"); if(msg==JOptionPane.YES_OPTION) try { String SID=studentID_TF.getText(); String insrt ="delete from st where S_ID='"+SID+"';"; Class.forName("java.sql.Driver"); Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost/student", "root", ""); Statement stmt= (Statement) con.createStatement(); stmt.executeUpdate(insrt); section.setEnabled(false); section_CB.setEnabled(false); studentID_TF.setText(""); fname_TF.setText(""); lname_TF.setText(""); dob_TF.setText(""); class_TF.setText(""); aadhar_TF.setText(""); email_TF.setText(""); percontact_TF.setText(""); patcontact_TF.setText(""); curaddress_TF.setText(""); hometaddress_TF.setText(""); post_TF.setText(""); search_TF.setText(""); sex.setSelectedIndex(0); section_CB.setSelectedIndex(-1); changeID.setSelected(false); updateRecord.setSelected(false); changeID.setEnabled(false); updateRecord.setEnabled(false); } catch (Exception e) { JOptionPane.showMessageDialog(null,"Error in Conectivity", "ERROR", JOptionPane.ERROR_MESSAGE); } }
  • 32. private void exitPActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); } private void showalldataActionPerformed(java.awt.event.ActionEvent evt) { this.setVisible(false); new Show_records().setVisible(true); } For Student_detail.java Control Name of Control Purpose 1. jMenuBar 1. date 2. time To Display the Current Date To Display the Current Time 2. jButton 1. BACK 2. addrecord 3. update 4. clear 5. deleteRecord To Back on Student-Manager Page To add a new student record To update a record that already Exist To clear Enter Data Currently To delete currently open record 6. jCheckBox 1. updateRecord 2. changeID To enable option to update the record 7. jComboBox 1. sex 2. section_CB User can select their gender User can select their School Section 3. jTextField 1. path 2. search_TF 3. studentID_TF 4. fname_TF 5. lname_TF 6. dob_TF 7. class_TF 8. aadhar_TF 9. email_TF 10. percontact_TF To set photo Path To search stdent record User can enter their student ID User can enter their First Name User can enter their Last Name User can enter their Date of Birth User can enter their class User can enter their Aadhar no User can enter their email address User can enter their personal no
  • 33. 11. patcontact_TF 12. curaddress_TF 13. hometaddress_TF 14. post_TF User can enter their parents contact no User can enter their current address User can enter their home address User can enter their Post code 5. User Manual 5.1 How to install Software:. Database Installation The software project is distributed with a backup copy of a Database named Student with required tables. Some dummy records are present in the tables for testing purposes, which can be deleted before inserting real data. The project is shipped with Student.SQL file which installs a database and tables in the computer system. Note:- The PC must have MySQL server with user (root) and password ( ) . If root password is any other password, it can be changed by running MySQL Server Instance Configure Wizard. Start Program  MySQL MySQL Server MySQL Server Instance Config Wizard
  • 34. Provide current password of root and new password as “” , this will change the root password. To install a MySQL database from a dump file ( Student.sql), simply follow the following steps. Step 1: Copy the Student.sql file in C:Program filesMysqlMySql server 5.1Bin folder. Step 2: Open MySQL and type the following command to create the dabase named Student. mysql> create database Student; Step 3: Open Command Window (Start Run  cmd) Step 4: Go to the following folder using CD command C:Program filesMysqlMySql server 5.1Bin> Step 5: type the following command on above prompt - C:….bin> mysql -u root -p Student < Student.sql This will create a Student database with required tables.
  翻译: