0% found this document useful (1 vote)
121 views

Dbms

The document describes a mini project report for a College Database Management System developed by two students. It includes an abstract, introduction, system specifications, module descriptions, system design diagram, and coding samples. The project aims to develop a web application to manage various academic and non-academic activities of a college through a database system with different modules for students, faculty, and administration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
121 views

Dbms

The document describes a mini project report for a College Database Management System developed by two students. It includes an abstract, introduction, system specifications, module descriptions, system design diagram, and coding samples. The project aims to develop a web application to manage various academic and non-academic activities of a college through a database system with different modules for students, faculty, and administration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

1

COLLEGE DATABASE MANAGEMENT SYSTEM


A MINI-PROJECT REPORT
Submitted by
ABISHEK V 180701009
ADHITHYAN G 180701012

in partial fulfillment of the award of the degree

of

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE AND ENGINEERING

RAJALAKSHMI ENGINEERING COLLEGE, CHENNAI


CHENNAI

APRIL 2019
2

BONAFIDE CERTIFICATE

Certified that this project “COLLEGE DATABASE MANAGEMENT SYSTEM” is


the bona fide work of “ABISHEK V, ADHITHYAN G” who carried out the project
work under my supervision.

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

__________________

INTERNAL EXAMINER EXTERNAL EXAMINER


3

ABSTRACT

College management system is an integrated web application that handles various


academic and non-academic activities of a College/Academic Institute. The system can
access by every students/faculties/employees of the institution through internet connected
computers or internet enabled mobile devices with the aid of his user name and password.

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 TITLE PAGE


NO NO
ABSTRACT 3
1 INTRODUCTION 5
1.1 INTRODUCTION
1.2 SCOPE OF THE WORK
1.3 AIM AND OBJECTIVES OF THE
PROJECT
2 SYSTEM SPECIFICATIONS 6
2.1 HARDWARE SPECIFICATIONS
2.2 SOFTWARE SPECIFICATIONS
3 MODULE DESCRIPTION 7
3.1 APP DESCRIPTION
3.2 SIGN-UP
3.3 SIGN-IN
4 SYSTEM DESIGN 8
4.1 ARCHITECTURE DIAGRAM
5 CODING 9
6 SCREENSHOTS 27
7 CONCLUSION 31
8 REFERENCES 32
5

CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION

This project is an effort to help a college management effectively manage their


records. This is an effective way of recording student details, as people cannot
note each and every record in a paper. This application takes in user details and
stores it in separate relational tables. The details recorded by the user can be
viewed later, the application returns necessary details for every hierarchy of users.

1.2 SCOPE OF THE WORK

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.

1.3 AIM AND OBJECTIVES OF THE PROJECT

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

2.1 HARDWARE SPECIFICATIONS

Processor : Intel i7

Memory Size : 8GB (Minimum)

HDD : 1 TB (Minimum)

2.2 SOFTWARE SPECIFICATIONS

Operating System : WINDOWS 10

Front – End : Java

Back – End : Oracle

Language : Java
7

CHAPTER 3

MODULE DESCRIPTION

3.1 APP 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.

3.2 SIGN-UP MODULE:


If a person needs to use this app, the person has to first register by entering their
username, password, name, mobile number and email id. Once the registration is done,
people can log in anytime they want and they are directed to their respective pages.

3.3 BASIC DETAILS MODULE:


This module asks for the basic details of that the person which is used to create an
account for the user and validates the details and verify the email.

3.4 SIGN-IN MODULE:


If you are an already existing user, just click on to the Sign in button after entering your
email and password. Once Signed in, the app will redirect you to the page where you
can access or perform task and details depending on your title and position.

3.5 FACULTY OPTION MODULE:


This module contains the various things a faculty can perform. The actions a faculty can
perform depends on faculties position and authority.

3.5.1 PERSONAL DETAILS MODULE:


Faculty members are asked to enter their personal details and details about there
position and department.
8

3.5.2 STUDENT OPTION MODULE:


Students can view various actions or details a student can access or perform.

3.5.2.1 ENTER MARKS/ATTENDENCE MODULE:


Faculty members have the privilege to enter their student’s marks and attendance
which will be updated on the database and can be viewed by students thereafter.

3.5.2.2 STUDENT DETAILS MODULE:


HOD & Principle have the privilege to view student’s details by entering students roll
number. This module cannot be accessed by teaching faculty.

3.5.2.3 VIEW CLASS MODULE:


Faculty members are allowed to view to the students based on their position . Principal
is allowed to access all student details. Hod’s are allowed to access students of that
particular department. Teaching faculty can access details of students who belong to
their class.

3.5.2.4 EDIT PERSONAL DETAILS MODULE:


Faculty /student member are allowed to edit most their details in this module.

3.5.2.5 LOGOUT MODULE:


Redirects to the login page.

3.5.2.6 EXIT MODULE:


Terminates the program.

3.6 STUDENT MODULE:


This module contains the various things a student can perform.

3.6.1 PERSONAL DETAILS MODULE:


Students are asked to enter their personal details.
9

3.6.2 STUDENT OPTION MENU:


Students can view various actions or information they have access to.

3.6.2.1 VIEW CGPA/ATTENDENCE MODULE:


Student is allowed to view their CGPA and attendance if entered by their class in
charge.

3.6.2.2 EDIT PERSONAL DETAILS MODULE:


Student can edit most of their personal details in this module.

3.6.2.3 LOGOUT MODULE:


Redirects to the login page.

3.6.2.4 EXIT MODULE:


Terminates the program.
10

CHAPTER 4
SYSTEM DESIGN

4.1 ARCHITECTURE DIAGRAM

Login page

Sign-in Sign-up

Basic
Student Faculty Details

Option Personal Personal Option


menu Details Details menu

View CGPA Edit Personal Enter Marks/ Student View Edit Personal
/ Attendance Details Attendance Details Class Details

Logout Exit
11

CHAPTER 5

CODING

FILE LOGIN PAGE:

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;

public class mainframe extends JFrame {

private JPanel contentPane;

private JTextField user;

// Launch the application.

public static void main(String[] args) {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

Class.forName("oracle.jdbc.driver.OracleDriver");
//link

mainframe frame = new mainframe();

frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace(); } }

}); }

JLabel lblDate;

private JPasswordField pass;

public void clock()


//date block imptrtd
13

Calendar cal=new GregorianCalendar();

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);

// Create the frame.

public mainframe() {

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setBounds(100, 100, 979, 642);

contentPane = new JPanel();

contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

setContentPane(contentPane);

contentPane.setLayout(new GridLayout(0, 1, 0, 0));

JPanel main = new JPanel();

main.setBackground(Color.WHITE);

main.setForeground(new Color(0, 0, 0));

contentPane.add(main);
14

user = new JTextField();

user.setText("@gmail.com");

user.setBounds(372, 151, 311, 49);

user.setFont(new Font("Tahoma", Font.PLAIN, 17));

user.setColumns(10);

JLabel lblUserName = new JLabel("USER NAME");

lblUserName.setBounds(122, 165, 91, 21);

lblUserName.setFont(new Font("Tahoma", Font.PLAIN, 17));

JLabel lblPassword = new JLabel("PASSWORD");

lblPassword.setBounds(125, 298, 88, 21);

lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 17));

JButton sign = new JButton("SIGN UP");

sign.setBounds(599, 420, 129, 55);

sign.setBackground(Color.WHITE);

sign.setFont(new Font("Agency FB", Font.BOLD, 18));

sign.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {// sign up

form1 f1=new form1();

f1.setVisible(true);
15

dispose(); }

});

lblDate = new JLabel("DATE:");

lblDate.setBounds(783, 29, 246, 37);

lblDate.setFont(new Font("Tahoma", Font.PLAIN, 18))

JButton btnSign = new JButton("SIGN IN");

btnSign.addActionListener(new ActionListener() {

// Sign IN bUTTON

public void actionPerformed(ActionEvent arg0) {

try {

Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe"
,"ADHI","iyguo");

System.out.println("connected");

PreparedStatement stmt=con.prepareStatement("select * from login where


name='"+user.getText()+"'and pass='"+pass.getText()+"'");

ResultSet rs=stmt.executeQuery();

rs.next();

if (rs !=null)

{ //Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","ADHI","ad
hi123");
16

PreparedStatement stmt_=con.prepareStatement("select pos from faculty


where email = '"+user.getText()+ "' ");

ResultSet rs_=stmt_.executeQuery();

rs_.next();

System.out.print(rs_.getString(1));

//System.out.print();

if(rs_.getString(1)!=null)

t_option f1=new t_option(user.getText());

f1.setVisible(true);

dispose(); }

else

t_form1 f2=new t_form1(user.getText());

f2.setVisible(true);

dispose(); }} }

catch(Exception e)

{ e.printStackTrace();

try {
17

Connection con=DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:xe"


,"ADHI","adhsdf3");

PreparedStatement stmt_1=con.prepareStatement("select dept_id from student where


email='"+user.getText()+"'");

ResultSet rs_1=stmt_1.executeQuery();

rs_1.next();

if(rs_1.getString(1)!=null)

{ s_option f1=new s_option(user.getText());


f1.setVisible(true);dispose(); }

else

{s_form1 f2=new s_form1(user.getText());

f2.setVisible(true);

dispose();

} }

catch(Exception e1)

{ JOptionPane.showMessageDialog(null,"Authecation failed");

e1.printStackTrace();

} } }

});

btnSign.setBounds(308, 420, 129, 55);

btnSign.setFont(new Font("Agency FB", Font.BOLD, 18));


18

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);

JLabel lblEmail = new JLabel("(EMAIL)");

lblEmail.setBounds(132, 184, 56, 16);

main.add(lblEmail);

JLabel lblLoginDetails = new JLabel("LOGIN DETAILS");

lblLoginDetails.setFont(new Font("Stencil", Font.BOLD, 28));

lblLoginDetails.setBounds(337, 34, 319, 73);

main.add(lblLoginDetails);

pass = new JPasswordField();

pass.setFont(new Font("Tahoma", Font.PLAIN, 22));

pass.setBounds(372, 258, 311, 49);


19

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

public class t_form1 extends JFrame {

private JPanel contentPane;

private JLabel lblGender;

private JLabel lblDob;

private JLabel lblDoj;

private JLabel lblSalary;

private JLabel lblDesignation;

private JTextField sal;

private JTextField d1;

private JTextField m1;

private JTextField y1;

private JTextField d2;

private JTextField m2;

private JTextField y2;

private JLabel lblNewLabel_1;

public static void main(String[] args) {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {
21

t_form1 frame = new t_form1("123");

frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();} }

});

public t_form1(String mail) {

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setBounds(100, 100, 905, 593);

contentPane = new JPanel();

contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

setContentPane(contentPane);

contentPane.setLayout(null);

JScrollPane scrollPane = new JScrollPane();

scrollPane.setBounds(5, 5, 2, 2);

contentPane.add(scrollPane);

JLabel lblNewLabel = new JLabel("DEPPARTMENT");

lblNewLabel.setBounds(165, 101, 147, 33);

lblNewLabel.setFont(new Font("Dialog", Font.PLAIN, 20));


22

contentPane.add(lblNewLabel);

JComboBox dept = new JComboBox();

dept.setBounds(340, 99, 277, 35);

dept.setBackground(Color.WHITE);

dept.setForeground(Color.BLACK);

dept.setModel(new DefaultComboBoxModel(new String[] {"CSE",


"MECH", "ECE", "EEE", "IT", "AERO"}));

contentPane.add(dept);

lblGender = new JLabel("GENDER");

lblGender.setBounds(165, 165, 139, 27);

lblGender.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblGender);

JComboBox gender = new JComboBox();

gender.setBounds(340, 157, 277, 35);

gender.setBackground(Color.WHITE);

gender.setForeground(Color.BLACK);

gender.setModel(new DefaultComboBoxModel(new String[] {"MALE",


"FEMALE"}));

contentPane.add(gender);

lblDob = new JLabel("DOB");


23

lblDob.setBounds(165, 223, 139, 27);

lblDob.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblDob);

lblDoj = new JLabel("DOJ");

lblDoj.setBounds(165, 263, 139, 27);

lblDoj.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblDoj);

lblSalary = new JLabel("SALARY");

lblSalary.setBounds(165, 303, 139, 27);

lblSalary.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblSalary);

sal = new JTextField();

sal.setText("12312");

sal.setBounds(340, 305, 277, 36);

sal.setColumns(10);

contentPane.add(sal);

JComboBox pos = new JComboBox();

pos.setBounds(340, 354, 277, 35);

pos.setBackground(Color.WHITE);
24

pos.setForeground(Color.BLACK);

pos.setModel(new DefaultComboBoxModel(new String[] {"HOD",


"TEACHER", "PRINCIPAL"}));

contentPane.add(pos);

lblDesignation = new JLabel("DESIGNATION");

lblDesignation.setBounds(162, 351, 139, 38);

lblDesignation.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblDesignation);

JButton btnNewButton = new JButton("SUBMIT");

btnNewButton.setBounds(308, 431, 91, 38);

btnNewButton.addActionListener(new ActionListener() {
//register action

public void actionPerformed(ActionEvent arg0) {

try {

System.out.print(mail);

Connection con=DriverManager.getConnection("jdbc:oracle:thin:
@localhost:1521:xe" ,"ADHI","adhi123");

PreparedStatement stmt1=con.prepareStatement("select id from dept1


where name='"+dept.getSelectedItem()+"'");

ResultSet rs=stmt1.executeQuery();

rs.next();
25

String id =rs.getString(1);

String dob =(String)(d1.getText()+"/"+m1.getText()+"/"+y1.getText());

String doj =(String)(d2.getText()+"/"+m2.getText()+"/"+y2.getText());

PreparedStatement stmt=con.prepareStatement("update faculty set


dept_id=?,gender=?,dob=?,doj=?,sal=?,pos=? where email='"+mail+"'");

stmt.setString(1, id);

stmt.setString(2, (String) gender.getSelectedItem());

stmt.setString(3, dob);

stmt.setString(4, doj);

stmt.setString(5, sal.getText());

stmt.setString(6, (String) pos.getSelectedItem());

stmt.executeQuery();

t_option f1=new t_option(mail);

f1.setVisible(true);

dispose(); }

Catch(Exception e1)

{e1.printStackTrace(); }

});

contentPane.add(btnNewButton);
26

d1 = new JTextField();

d1.setText("1");

d1.setColumns(10);

d1.setBounds(340, 221, 59, 29);

contentPane.add(d1);

m1 = new JTextField();

m1.setText("12");

m1.setColumns(10);

m1.setBounds(427, 221, 59, 29);

contentPane.add(m1);

y1 = new JTextField();

y1.setText("2000");

y1.setColumns(10);

y1.setBounds(511, 219, 106, 29);

contentPane.add(y1);

d2 = new JTextField();

d2.setText("1");

d2.setColumns(10);

d2.setBounds(340, 261, 59, 29);


27

contentPane.add(d2);

m2 = new JTextField();

m2.setText("11");

m2.setColumns(10);

m2.setBounds(427, 261, 59, 29);

contentPane.add(m2);

y2 = new JTextField();

y2.setText("2000");

y2.setColumns(10);

y2.setBounds(511, 259, 106, 29);

contentPane.add(y2);

JLabel label = new JLabel("/");

label.setFont(new Font("Tahoma", Font.PLAIN, 26));

label.setBounds(411, 224, 22, 27);

contentPane.add(label);

JLabel label_1 = new JLabel("/");

label_1.setFont(new Font("Tahoma", Font.PLAIN, 26));

label_1.setBounds(411, 263, 22, 27);

contentPane.add(label_1);
28

JLabel label_2 = new JLabel("/");

label_2.setFont(new Font("Tahoma", Font.PLAIN, 26));

label_2.setBounds(492, 223, 22, 27);

contentPane.add(label_2);

JLabel label_3 = new JLabel("/");

label_3.setFont(new Font("Tahoma", Font.PLAIN, 26));

label_3.setBounds(492, 263, 22, 27);

contentPane.add(label_3);

lblNewLabel_1 = new JLabel("ENTER PERSONAL DETAILS ");

lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 28));

lblNewLabel_1.setBounds(235, 33, 376, 33);

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;

public class t_sdetail extends JFrame {

private JPanel contentPane;

private JTextField stu;

public static void main(String[] args) {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

t_sdetail frame = new t_sdetail("1");

frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();
30

} }

}); }

public t_sdetail(String mail) {

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setBounds(100, 100, 1037, 643);

contentPane = new JPanel();

contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

setContentPane(contentPane);

contentPane.setLayout(null);

JLabel lblStudentId = new JLabel("STUDENT ID :");

lblStudentId.setFont(new Font("Tahoma", Font.PLAIN, 20));

lblStudentId.setBounds(166, 64, 166, 38);

contentPane.add(lblStudentId);

stu = new JTextField();

stu.setFont(new Font("Yu Gothic UI", Font.PLAIN, 18));

stu.setColumns(10);

stu.setBounds(328, 64, 344, 34);

contentPane.add(stu);

JTextArea txt = new JTextArea();


31

txt.setFont(new Font("Monospaced", Font.PLAIN, 24));

txt.setEditable(false);

txt.setText("HELLO!!!");

txt.setBounds(78, 117, 861, 383);

contentPane.add(txt);

JButton btnExit = new JButton("EXIT");

btnExit.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

t_option f=new t_option(mail);

f.setVisible(true);

dispose(); }

});

btnExit.setFont(new Font("Tahoma", Font.PLAIN, 16));

btnExit.setBounds(419, 535, 125, 48);

contentPane.add(btnExit);

JButton btnSearch = new JButton("SEARCH");

btnSearch.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

try {
32

Connection con=DriverManager.getConnection ("jdbc:oracle:thin:


@localhost:1521:xe" ,"ADHI","adhi123");

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)); }

catch (Exception e1) {

e1.printStackTrace();

txt.append("NOT FOUND!!!");

} }

});

btnSearch.setFont(new Font("Tahoma", Font.PLAIN, 16));

btnSearch.setBounds(729, 64, 137, 38);

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;

public class s_mark extends JFrame {

private JPanel contentPane;

private JTextField cgpa;

private JTextField atta;

private JLabel lblCgpa;

private JLabel lblAttencance;

private JButton btnBack;

public static void main(String[] args) {


34

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

s_mark frame = new s_mark("0");

frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace(); }

}); }

public void getval(String mail)

{try {

Connection con=DriverManager.getConnection("jdbc:oracle:thin:
@localhost: 1521 :xe","ADHI","aadaed");

PreparedStatement stmt=con.prepareStatement("select cgpa,atta from


student where email='"+mail+"'");

ResultSet rs= stmt.executeQuery();

rs.next();

cgpa.setText(rs.getString(1));

atta.setText(rs.getString(2));

}
35

catch (Exception e1) {

e1.printStackTrace(); }

public s_mark(String mail) {

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setBounds(100, 100, 914, 573);

contentPane = new JPanel();

contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

setContentPane(contentPane);

contentPane.setLayout(null);

cgpa = new JTextField();

cgpa.setFont(new Font("Tahoma", Font.BOLD, 22));

cgpa.setEditable(false);

cgpa.setColumns(10);

cgpa.setBounds(349, 131, 282, 46);

contentPane.add(cgpa);

atta = new JTextField();

atta.setFont(new Font("Tahoma", Font.BOLD, 22));

atta.setEditable(false);
36

atta.setColumns(10);

atta.setBounds(349, 226, 282, 46);

contentPane.add(atta);

lblCgpa = new JLabel("CGPA :");

lblCgpa.setFont(new Font("Dialog", Font.PLAIN, 20));

lblCgpa.setBounds(160, 128, 132, 46);

contentPane.add(lblCgpa);

lblAttencance = new JLabel("ATTENCANCE (%) :");

lblAttencance.setFont(new Font("Dialog", Font.PLAIN, 20));

lblAttencance.setBounds(107, 223, 209, 46);

contentPane.add(lblAttencance);

btnBack = new JButton("BACK");

btnBack.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {


//back

s_option f=new s_option(mail);

f.setVisible(true);

dispose();

});
37

getval(mail);

btnBack.setBounds(325, 381, 154, 46);

contentPane.add(btnBack);

File Personal Details :

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;

public class t_form1 extends JFrame {


38

private JPanel contentPane;

private JLabel lblGender;

private JLabel lblDob;

private JLabel lblDoj;

private JLabel lblSalary;

private JLabel lblDesignation;

private JTextField sal;

private JTextField d1;

private JTextField m1;

private JTextField y1;

private JTextField d2;

private JTextField m2;

private JTextField y2;

private JLabel lblNewLabel_1;

public static void main(String[] args) {

EventQueue.invokeLater(new Runnable() {

public void run() {

try {

t_form1 frame = new t_form1("123");


39

frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

} }

}); }

public t_form1(String mail) {

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

setBounds(100, 100, 905, 593);

contentPane = new JPanel();

contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

setContentPane(contentPane);

contentPane.setLayout(null);

JScrollPane scrollPane = new JScrollPane();

scrollPane.setBounds(5, 5, 2, 2);

contentPane.add(scrollPane);

JLabel lblNewLabel = new JLabel("DEPPARTMENT");

lblNewLabel.setBounds(165, 101, 147, 33);

lblNewLabel.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblNewLabel);
40

JComboBox dept = new JComboBox();

dept.setBounds(340, 99, 277, 35);

dept.setBackground(Color.WHITE);

dept.setForeground(Color.BLACK);

dept.setModel(new DefaultComboBoxModel(new String[] {"CSE",


"MECH", "ECE", "EEE", "IT", "AERO"}));

contentPane.add(dept);

lblGender = new JLabel("GENDER");

lblGender.setBounds(165, 165, 139, 27);

lblGender.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblGender);

JComboBox gender = new JComboBox();

gender.setBounds(340, 157, 277, 35);

gender.setBackground(Color.WHITE);

gender.setForeground(Color.BLACK);

gender.setModel(new DefaultComboBoxModel(new String[] {"MALE",


"FEMALE"}));

contentPane.add(gender);

lblDob = new JLabel("DOB");

lblDob.setBounds(165, 223, 139, 27);


41

lblDob.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblDob);

lblDoj = new JLabel("DOJ");

lblDoj.setBounds(165, 263, 139, 27);

lblDoj.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblDoj);

lblSalary = new JLabel("SALARY");

lblSalary.setBounds(165, 303, 139, 27);

lblSalary.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblSalary);

sal = new JTextField();

sal.setText("12312");

sal.setBounds(340, 305, 277, 36);

sal.setColumns(10);

contentPane.add(sal);

JComboBox pos = new JComboBox();

pos.setBounds(340, 354, 277, 35);

pos.setBackground(Color.WHITE);

pos.setForeground(Color.BLACK);
42

pos.setModel(new DefaultComboBoxModel(new String[] {"HOD",


"TEACHER", "PRINCIPAL"}));

contentPane.add(pos);

lblDesignation = new JLabel("DESIGNATION");

lblDesignation.setBounds(162, 351, 139, 38);

lblDesignation.setFont(new Font("Dialog", Font.PLAIN, 20));

contentPane.add(lblDesignation);

JButton btnNewButton = new JButton("SUBMIT");

btnNewButton.setBounds(308, 431, 91, 38);

btnNewButton.addActionListener(new ActionListener() {
//register action

public void actionPerformed(ActionEvent arg0) {

try {

Connection con =DriverManager.getConnection


("jdbc:oracle:thin: @localhost:1521:xe" ,"ADHI","adhi123");

PreparedStatement stmt1=con.prepareStatement("select id from


dept1 where name='"+dept.getSelectedItem()+"'");

ResultSet rs=stmt1.executeQuery();

rs.next();

String id =rs.getString(1);

String dob =(String)(d1.getText()+"/"+m1.getText()+"/"+y1.getText());


43

String doj =(String)(d2.getText()+"/"+m2.getText()+"/"+y2.getText());

PreparedStatement stmt=con.prepareStatement("update faculty


set dept_id=?,gender=?,dob=?,doj=?,sal=?,pos=? where email='"+mail+"'");

stmt.setString(1, id);

stmt.setString(2, (String) gender.getSelectedItem());

stmt.setString(3, dob);

stmt.setString(4, doj);

stmt.setString(5, sal.getText());

stmt.setString(6, (String) pos.getSelectedItem());

stmt.executeQuery();

t_option f1=new t_option(mail);

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);

d1.setBounds(340, 221, 59, 29);

contentPane.add(d1);

m1 = new JTextField();

m1.setText("12");

m1.setColumns(10);

m1.setBounds(427, 221, 59, 29);

contentPane.add(m1);

y1 = new JTextField();

y1.setText("2000");

y1.setColumns(10);

y1.setBounds(511, 219, 106, 29);

contentPane.add(y1);

d2 = new JTextField();

d2.setText("1");

d2.setColumns(10);

d2.setBounds(340, 261, 59, 29);

contentPane.add(d2);
45

m2 = new JTextField();

m2.setText("11");

m2.setColumns(10);

m2.setBounds(427, 261, 59, 29);

contentPane.add(m2);

y2 = new JTextField();

y2.setText("2000");

y2.setColumns(10);

y2.setBounds(511, 259, 106, 29);

contentPane.add(y2);

JLabel label = new JLabel("/");

label.setFont(new Font("Tahoma", Font.PLAIN, 26));

label.setBounds(411, 224, 22, 27);

contentPane.add(label);

JLabel label_1 = new JLabel("/");

label_1.setFont(new Font("Tahoma", Font.PLAIN, 26));

label_1.setBounds(411, 263, 22, 27);

contentPane.add(label_1);

JLabel label_2 = new JLabel("/");


46

label_2.setFont(new Font("Tahoma", Font.PLAIN, 26));

label_2.setBounds(492, 223, 22, 27);

contentPane.add(label_2);

JLabel label_3 = new JLabel("/");

label_3.setFont(new Font("Tahoma", Font.PLAIN, 26));

label_3.setBounds(492, 263, 22, 27);

contentPane.add(label_3);

lblNewLabel_1 = new JLabel("ENTER PERSONAL DETAILS ");

lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 28));

lblNewLabel_1.setBounds(235, 33, 376, 33);

contentPane.add(lblNewLabel_1);

}
47

CHAPTER 6

SCREEN SHOTS

Fig 6.1 Login Page:

Fig 6.2 Sign In (User Registration):


48

Fig 6.3 Teacher Personal Information:

Fig 6.4 Options For Teachers:


49

Fig 6.5 Enter Marks/Attendance:

Fig 6.6 Edit Personal Details:


50

Fig 6.7 View Student Details:

Fig 6.8 View Class Details:

Fig 6.9 Student Options:


51

Fig 6.10 View Marks/Attendance:

Fig 6.6 Edit Personal Details (Students):


52

CHAPTER 7

CONCLUSION AND FUTURE ENHANCEMENT

The project on COLLEGE DATABASE MANAGEMENT SYSTEM. It provides the


user a convenient method for storing details required by the management of the college
in an efficient way. This project includes concepts of Data Structures.

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

You might also like