“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
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:-
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)
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
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
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())
{
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
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.