Dbms
Dbms
of
BACHELOR OF ENGINEERING
IN
APRIL 2019
2
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Dr. N. SANKARRAM RAJARAMAN. P. V
HEAD OF THE DEPARTMENT ASSISTANT PROFESSOR(SS)
Dept. of Computer Science and Engg, Dept. of Computer Science and Engg,
Rajalakshmi Engineering College, Rajalakshmi Engineering College,
Chennai Chennai
This mini project report is submitted for the viva voce examination to be held on
__________________
ABSTRACT
Every user will have a customized home page with his/her profile management facilities.
Through links that displays in the home page the user can access different options of the
website assigned to him.
Although a standard password policy will be followed in the designing of the system to
prevent the possibilities of malicious activities of itching users. A self-driven module in
the proposed system will accomplish the automated tasks such as Email Alerts to the
administrator etc.
4
TABLE OF CONTENTS
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Our management system will make sure that the user does not have any trouble in
managing the records. This helps the user effectively record and retrieve, by
keeping note of all the records done by the user.
The objective of this application is to manage the college records. This project is
done to help people handle college records effectively. This also helps to view
the details that is already recorded so that the user can modify or view the
records easily.
6
CHAPTER 2
SYSTEM SPECIFICATIONS
Processor : Intel i7
HDD : 1 TB (Minimum)
Language : Java
7
CHAPTER 3
MODULE DESCRIPTION
The application first directs to the Sign in or Sign up screen. If you are an already
existing user, click on the Sign in button and proceed on with record your details. Else,
click on Sign up, enter your details and then Sign in, to record and retrieve. Once you
have logged in, you have to enter your basic details. This lets the app to store the details
and proceed respective pages.
CHAPTER 4
SYSTEM DESIGN
Login page
Sign-in Sign-up
Basic
Student Faculty Details
View CGPA Edit Personal Enter Marks/ Student View Edit Personal
/ Attendance Details Attendance Details Class Details
Logout Exit
11
CHAPTER 5
CODING
package sample;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.sql.*;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridLayout;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;
12
import javax.swing.JPasswordField;
EventQueue.invokeLater(new Runnable() {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
//link
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace(); } }
}); }
JLabel lblDate;
int day=cal.get(Calendar.DAY_OF_MONTH);
int mon=cal.get(Calendar.MONTH);
int year=cal.get(Calendar.YEAR);
lblDate.setText(day+"/"+mon+"/"+year);
public mainframe() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
main.setBackground(Color.WHITE);
contentPane.add(main);
14
user.setText("@gmail.com");
user.setColumns(10);
sign.setBackground(Color.WHITE);
sign.addActionListener(new ActionListener() {
f1.setVisible(true);
15
dispose(); }
});
btnSign.addActionListener(new ActionListener() {
// Sign IN bUTTON
try {
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe"
,"ADHI","iyguo");
System.out.println("connected");
ResultSet rs=stmt.executeQuery();
rs.next();
if (rs !=null)
{ //Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","ADHI","ad
hi123");
16
ResultSet rs_=stmt_.executeQuery();
rs_.next();
System.out.print(rs_.getString(1));
//System.out.print();
if(rs_.getString(1)!=null)
f1.setVisible(true);
dispose(); }
else
f2.setVisible(true);
dispose(); }} }
catch(Exception e)
{ e.printStackTrace();
try {
17
ResultSet rs_1=stmt_1.executeQuery();
rs_1.next();
if(rs_1.getString(1)!=null)
else
f2.setVisible(true);
dispose();
} }
catch(Exception e1)
{ JOptionPane.showMessageDialog(null,"Authecation failed");
e1.printStackTrace();
} } }
});
btnSign.setBackground(Color.WHITE);
clock();
main.setLayout(null);
main.add(lblDate);
main.add(btnSign);
main.add(sign);
main.add(lblUserName);
main.add(lblPassword);
main.add(user);
main.add(lblEmail);
main.add(lblLoginDetails);
main.add(pass);
} }
FILE TEACHER_INFORMATION:
package sample;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.awt.event.ActionEvent;
import com.toedter.calendar.JYearChooser;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
20
EventQueue.invokeLater(new Runnable() {
try {
21
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();} }
});
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
contentPane.setLayout(null);
scrollPane.setBounds(5, 5, 2, 2);
contentPane.add(scrollPane);
contentPane.add(lblNewLabel);
dept.setBackground(Color.WHITE);
dept.setForeground(Color.BLACK);
contentPane.add(dept);
contentPane.add(lblGender);
gender.setBackground(Color.WHITE);
gender.setForeground(Color.BLACK);
contentPane.add(gender);
contentPane.add(lblDob);
contentPane.add(lblDoj);
contentPane.add(lblSalary);
sal.setText("12312");
sal.setColumns(10);
contentPane.add(sal);
pos.setBackground(Color.WHITE);
24
pos.setForeground(Color.BLACK);
contentPane.add(pos);
contentPane.add(lblDesignation);
btnNewButton.addActionListener(new ActionListener() {
//register action
try {
System.out.print(mail);
Connection con=DriverManager.getConnection("jdbc:oracle:thin:
@localhost:1521:xe" ,"ADHI","adhi123");
ResultSet rs=stmt1.executeQuery();
rs.next();
25
String id =rs.getString(1);
stmt.setString(1, id);
stmt.setString(3, dob);
stmt.setString(4, doj);
stmt.setString(5, sal.getText());
stmt.executeQuery();
f1.setVisible(true);
dispose(); }
Catch(Exception e1)
{e1.printStackTrace(); }
});
contentPane.add(btnNewButton);
26
d1 = new JTextField();
d1.setText("1");
d1.setColumns(10);
contentPane.add(d1);
m1 = new JTextField();
m1.setText("12");
m1.setColumns(10);
contentPane.add(m1);
y1 = new JTextField();
y1.setText("2000");
y1.setColumns(10);
contentPane.add(y1);
d2 = new JTextField();
d2.setText("1");
d2.setColumns(10);
contentPane.add(d2);
m2 = new JTextField();
m2.setText("11");
m2.setColumns(10);
contentPane.add(m2);
y2 = new JTextField();
y2.setText("2000");
y2.setColumns(10);
contentPane.add(y2);
contentPane.add(label);
contentPane.add(label_1);
28
contentPane.add(label_2);
contentPane.add(label_3);
contentPane.add(lblNewLabel_1);
Student Details:
package sample;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
29
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.sql.*;
import java.awt.event.ActionEvent;
import javax.swing.JTextArea;
EventQueue.invokeLater(new Runnable() {
try {
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
30
} }
}); }
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
contentPane.setLayout(null);
contentPane.add(lblStudentId);
stu.setColumns(10);
contentPane.add(stu);
txt.setEditable(false);
txt.setText("HELLO!!!");
contentPane.add(txt);
btnExit.addActionListener(new ActionListener() {
f.setVisible(true);
dispose(); }
});
contentPane.add(btnExit);
btnSearch.addActionListener(new ActionListener() {
try {
32
PreparedStatement stmt1=con.prepareStatement("select
FA_ID,FA_NAME,GENDER ,PH,DOB,DOJ,DEPT_ID from student where
FA_ID='"+stu.getText()+"'");
ResultSet rs=stmt1.executeQuery();
rs.next();
txt.setText("");
txt.append("\n\nSTUDENT ID:\t"+rs.getString(1)+"\nNAME : \t
"+rs.getString(2)+"\nGENDER : \t"+rs.getString(3)+"\nPHONE NUMBER :
"+rs.getString(4)+"\nDOB : \t"+rs.getString(5)+"\nDOJ :
\t"+rs.getString(6)+"\nDEPARTMENT:\t"+rs.getString(7)); }
e1.printStackTrace();
txt.append("NOT FOUND!!!");
} }
});
contentPane.add(btnSearch);
}
33
Displaying Marks:
package sample;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.*;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.sql.*;
import java.awt.event.ActionEvent;
EventQueue.invokeLater(new Runnable() {
try {
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace(); }
}); }
{try {
Connection con=DriverManager.getConnection("jdbc:oracle:thin:
@localhost: 1521 :xe","ADHI","aadaed");
rs.next();
cgpa.setText(rs.getString(1));
atta.setText(rs.getString(2));
}
35
e1.printStackTrace(); }
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
contentPane.setLayout(null);
cgpa.setEditable(false);
cgpa.setColumns(10);
contentPane.add(cgpa);
atta.setEditable(false);
36
atta.setColumns(10);
contentPane.add(atta);
contentPane.add(lblCgpa);
contentPane.add(lblAttencance);
btnBack.addActionListener(new ActionListener() {
f.setVisible(true);
dispose();
});
37
getval(mail);
contentPane.add(btnBack);
package sample;
import java.awt.EventQueue;
import javax.swing.*;
import java.awt.Font;
import javax.swing.*;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.awt.event.ActionEvent;
EventQueue.invokeLater(new Runnable() {
try {
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
} }
}); }
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(contentPane);
contentPane.setLayout(null);
scrollPane.setBounds(5, 5, 2, 2);
contentPane.add(scrollPane);
contentPane.add(lblNewLabel);
40
dept.setBackground(Color.WHITE);
dept.setForeground(Color.BLACK);
contentPane.add(dept);
contentPane.add(lblGender);
gender.setBackground(Color.WHITE);
gender.setForeground(Color.BLACK);
contentPane.add(gender);
contentPane.add(lblDob);
contentPane.add(lblDoj);
contentPane.add(lblSalary);
sal.setText("12312");
sal.setColumns(10);
contentPane.add(sal);
pos.setBackground(Color.WHITE);
pos.setForeground(Color.BLACK);
42
contentPane.add(pos);
contentPane.add(lblDesignation);
btnNewButton.addActionListener(new ActionListener() {
//register action
try {
ResultSet rs=stmt1.executeQuery();
rs.next();
String id =rs.getString(1);
stmt.setString(1, id);
stmt.setString(3, dob);
stmt.setString(4, doj);
stmt.setString(5, sal.getText());
stmt.executeQuery();
f1.setVisible(true);
dispose();
System.out.print("printed"); }
catch(Exception e1{
e1.printStackTrace();} }
});
contentPane.add(btnNewButton);
d1 = new JTextField();
44
d1.setText("1");
d1.setColumns(10);
contentPane.add(d1);
m1 = new JTextField();
m1.setText("12");
m1.setColumns(10);
contentPane.add(m1);
y1 = new JTextField();
y1.setText("2000");
y1.setColumns(10);
contentPane.add(y1);
d2 = new JTextField();
d2.setText("1");
d2.setColumns(10);
contentPane.add(d2);
45
m2 = new JTextField();
m2.setText("11");
m2.setColumns(10);
contentPane.add(m2);
y2 = new JTextField();
y2.setText("2000");
y2.setColumns(10);
contentPane.add(y2);
contentPane.add(label);
contentPane.add(label_1);
contentPane.add(label_2);
contentPane.add(label_3);
contentPane.add(lblNewLabel_1);
}
47
CHAPTER 6
SCREEN SHOTS
CHAPTER 7
However, this project can be improved in such a way that it turns into a real time
application. It can be created into an App that could be helpful and beneficial to many
universities to efficiently manage their records.
53
REFERENCES
1. https://www.w3schools.com/
2. https://www.tutorialspoint.com/
3. https://www.geeksforgeeks.org/
4. https://www.youtube.com/
5. https://www.javatpoint.com