You are on page 1of 43

RESULT ANALYSIS AUTOMATION

A MINI PROJECT REPORT

Submitted by

ABDUL RAHMAN SHEAIK S 113218104004


DEVAMUTHAN S 113218104025
DILLI RAJA D 113218104026

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE AND ENGINEERING

VELAMMAL ENGINEERING COLLEGE


[An Autonomous Institution]

ANNA UNIVERSITY: CHENNAI 600 025

APRIL 2021
BONAFIDE CERTIFICATE

Certified that this Mini project report “RESULT ANALYSIS AUTOMATION” is the bonafide
work of ABDUL RAHMAN SHEAIK S (113218104004), DEVAMUTHAN S (113218104025)
and DILLI RAJA D (113218104026) who carried out the Mini project work under my
supervision.

SIGNATURE SIGNATURE

MRS. JENA CATHERINE BEL DR.B.MURUGESHWARI

SUPERVISOR HEAD OF THE DEPARTMENT

Computer Science and Engineering Computer Science and Engineering,

Velammal Engineering College Velammal Engineering College,

Ambattur – Red hills Road, Ambattur–Red hills Road,


Chennai – 600066. Chennai – 600066.

2
MINI PROJECT EXAMINATION

The MINI PROJECT Examination of this project work “RESULT ANALYSIS


AUTOMATION” is a bonafide record of project done at the Department of Computer Science
and Engineering, Velammal Engineering College during the academic year 2020 – 2021 by

ABDUL RAHMAN SHEAIK S 113218104004


DEVAMUTHAN S 113218104025
DILLI RAJA D 113218104026

of Third year Bachelor of Engineering in Computer Science and Engineering submitted for the
university examination held on

INTERNAL EXAMINER EXTERNAL EXAMINER

3
ABSTRACT

Technology in today’s world has reached to extent that it can be used to do various task in
day to day life easily with less effort and time. World today has realized importance of education
in one’s life which has led to revolution in field of education. Universities, colleges, schools
today have loads of task to be completed in given timeline. In today’s scenario colleges
needs to analyze student results manually which takes lots of time and effort by faculties
working on it. Hence in order to simplify this tasks a web based system is introduced
which can perform student result analysis. The system takes file of student results obtained by
universities in pdf format as an input. This system runs on web browser on computer with well-
connected network. Using Report Analysis Automation will make the examination cell activities
more efficient by wrapping the drawbacks of manual systems like accuracy, time, speed and
simplicity. This system will ensure examination activities are carried more effectively and it can
be accessible and will be convenient for staff by making it a centralized system. Finally this
product would an aimed automation system, which will replace present examination cell process.
Result Analysis Automation is a new concept which came into existence to reduce heavy burden
on examination cell and it made analysis of results a monotonous task, apart from the large amount
of data that is generated in a college for various branches of all semesters. This system will make
the analysis process much organized and will require data to be pre-existing. This automation,
however will manage a great deal of menial work. Finally this system will minimize the manual
work, which leads to ease of generating reports, reducing confusions and increase in work rate
effectively.

4
TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ABSTRACT 4

LIST OF FIGURES 8

LIST OF ABBREVATIONS 9

1 INTRODUCTION 10

1.1 PURPOSE OF THE PROJECT 10

1.2 TABULA-JAVA 10

1.3 LAYERED ARCHITECTURE 11

1.4 SCOPE OF THE PROJECT 11

2 SYSTEM ANALYSIS 12

2.1 EXISTING SYSTEM 12

2.1.1 DISADVANTAGES IN THE EXISTING SYSTEM 12

2.2 PROPOSED SYSTEM 12

2.2.1 ADVANTAGES IN THE PROPOSED SYSTEM 13

5
3 SYSTEM SPECIFICATION 14

3.1 HARDWARE REQUIREMENTS 14

3.2 SOFTWARE REQUIREMENTS 14

3.3 TECHNOLOGIES USED 14

4 SYSTEM DESIGN 15

4.1 SYSTEM ARCHITECTURE DIAGRAM 15

4.2 UML DIAGRAMS 16

4.2.1 USECASE DIAGRAM 17

4.2.2 CLASS DIAGRAM 18

4.2.3 SEQUENCE DIAGRAM 19

4.4 DATA FLOW DIAGRAM 20

5 SYSTEM IMPLEMENTATION 21

5.1 MODULES 21

5.2 MODULE DESCRIPTION 21

5.2.1 Login 21

5.2.2 Add Students 21

5.2.3 Add Marks 22

5.2.4 View Marks 22

6
6 CONCLUSION AND FUTURE WORK 24
6.1 CONCLUSION 24

6.2 FUTURE WORK 24

APPENDIX I- SOURCE CODE 25

APPENDIX II-SNAPSHOTS 38

REFERENCES 43

7
LIST OF FIGURES

F.NO NAME OF THE FIGURE PAGE NO

1.1 Layered Architecture(3-tier) 11

4.1 System Architecture 15

4.2 Use Case Diagram 17

4.3 Class Diagram 18

4.4 Sequence Diagram 19

4.5 Data flow Diagram 20

8
LIST OF ABBREVATIONS

TERMS ABBREVATION

DBMS Database Management System

SQL Structured Query Language

JS Java Script

CSV Comma Separated Values

DAO Data Access Object

DTO Data Transfer Object

DB Database

UI User Interface

GPA Grade Point Average

UML Unified Model Language

ADL Architecture Description Languages

DFD Data Flow Diagram

OOD Object-Oriented Development

9
CHAPTER 1
INTRODUCTION
1.1 PURPOSE OF THE PROJECT:
Result Analysis Automation is a web based application developed for colleges to
analyze the result and keep track of students. We are able to see the individual
candidate’s results separately. Result Analysis Automation system has been designed to carry out
the mark analysis process in an educational institution. The results of respective departments
can be efficiently computed without much of manual involvement [1].

The basic challenge of an institution is to carry out result analysis from each and every corner of
the students’ performance, track and resolve various students issues before and after examination
and manage the whole of these operations in a flawless manner and deliver quality result oriented
education. If we just glance on a day to day basis, there are most basic problems faced by an
institution [2].

a) Operations are mostly carried out in administrative offices.

b) Procedures are highly administrative.

c) Information needs to be updated from time to time.

d) Information is inconsistent.

e) Functionality is divided between certain organized units.

So to curb all these problems Result Analysis Automation is proposed. This will reduce much
paper work and burden of storage. Also, it makes the task easier for the staffs to access their result
whenever required, if we share it on local/global network.

1.2 TABULA-JAVA

Tabula is free and available under the MIT open-source license. Tabula lets you feed a (table-
based) PDF file into the library and automatically pull tabular data into CSV format. Tabula is
available for the 3 major operating systems. It works on any java environment installed in a
computer. Extracting the table from pdf can be done efficiently using tabula [3].

10
1.3 LAYERED ARCHITECTURE:

The most common architecture pattern is the layered architecture pattern. This is also known as
the n-tier architecture pattern. Components within the layered architecture pattern are organized
into horizontal layers, each layer performing a specific role within the application (e.g.,
presentation logic or business logic). Although the layered architecture pattern does not specify
the number and types of layers that must exist in the pattern, most layered architectures consist of
four standard layers:

 Presentation layer (known as view layer)

 Application layer (known as controller layer)

 Domain layer (known as service layer)

 Persistence layer (known as DAO layer)

Fig: 1.1 Layered Architecture (3-tier) [4]


The smaller applications may have only three layers, whereas larger and more complex business
applications may contain five or more layers. Each layer of the layered architecture pattern has a
specific role and responsibility within the application [5]. In this project, controller layer, service
layer, DAO, model layer along with data transfer object (DTO) has been used.

1.4 SCOPE OF THE PROJECT

This project aims at developing and implementing a web-based student result management system
for the Universities, replacing the old manually done paper work and to minimize the security
issues and the problems it possesses. The proposed is a multi-user system, developed using JS
libraries and frameworks (REACT JS and NODE JS) and MySQL DBMS support. The system is
confined to and intended for the staffs. The entire system is managed by university staff, who
possesses the full control of the system, to read, write and execute the results and to assign
privileges to teachers. The teachers have the privilege to enter the student’s marks by uploading a
pdf, through which, a result will be generated either for individual students, or for entire class, or
for entire department automatically.

11
CHAPTER 2

SYSTEM ANALYSIS

2.1. EXISTING SYSTEM:

Today there exist some computer program which helps user to find and store basic
Information such as student’s name, marks, class, sec and department. Rest all the computational
work either needs a different program or is done manually by faculties of that institution.
This huge amount of workload makes the user process very slow and clumsy. This system requires
maintaining a lot of files and documents. Handling of such important documents is again a tedious
work, also if in future if we wants to retrieve important facts and statistics this will again lead to a
lot of time consumption even it becomes difficult for staff as they have to manually do a lot of
work starting from gathering all previous grades of the student. Hence, there arises a need for a
better system.

2.1.1. DISADVANTAGES IN THE EXISTING SYSTEM

 Not User Friendly: The existing system is not user friendly because the retrieval of data
is very slow and data is not maintained efficiently.

 Difficulty in report generating: We require more calculations to generate the report so it


is generated at the end of the session. And the student not get a single chance to improve
their attendance.

 Manual control: All calculations to generate report is done manually so there is greater
chance of errors.

2.2. PROPOSED SYSTEM


Result Analysis Automation is a student driven system that is designed in order to keep record
of student data by use of technology. Now-a-day result analysis is done manually taking lots
of effort and time then too desired accuracy is not achieved. Also updating of data is very

12
difficult as all data needs to revise again. In addition more paperwork and documentation is
required.

 Marks obtained by student in every semester.

 Generation of reports.

 Analysis of data based on aspects.

Result Analysis Automation is simple web based application designed using React JS as front-
end and Node JS as back-end technology. In this system DB is designed using MySQL. Logical
coding is done using JS (Node JS in Server Side) which contains main logic of overall
system functionality. To design web pages, CSS is used. The system is covered under all validation
checks for authentication. Data is been imported from PDF (Published by Anna University) into
database. These student data is been analyzed based on various aspects like GPA, grade [6].
System will be designed in such a way that it can be later updated to accept different format.

2.2.1. ADVANTAGES IN THE PROPOSED SYSTEM

 User friendly.

 ALL time availability.

 Easy computation.

 Easy Storage of data.

 More efficient.

 Requires less effort and time.

13
CHAPTER 3
SYSTEM SPECIFICAION

3.1 HARDWARE REQUIREMENT

 CPU: Intel core I3 – 4130 CPU @ 3.40GHz.

 OPERATING SYSTEM: Windows 7 or above

 RAM: 4GB.

 HARD DISK: 32GB

3.2 SOFTWARE REQUIREMENT

 MySQL Community Server.

 Node Package Manager (NPM).

 Any Browser with latest updates

3.3 TECHNOLOGIES USED

 Node JS for Server-Side

 React JS for Front-Side

14
CHAPTER 4
SYSTEM DESIGN
4.1 SYSTEM ARCHITECTURE
A system architecture is the conceptual model that defines the structure, behavior, and
more views of a system. It is an important tool as it provides an overall view of the physical
deployment of the software system and its evolution roadmap. An architecture description is a
formal description and representation of a system, organized in a way that supports reasoning about
the structures and behaviors of the system. A system architecture can consist of
system components and the sub-systems developed, that will work together to implement the
overall system. There have been efforts to formalize languages to describe system architecture,
collectively these are called ADL [7].

Fig 4.1 System Architecture


15
4.2 UML DIAGRAMS

UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. It’s a rich language to model software solutions, application
structures, and system behavior and business processes [8]. UML provides a comprehensive
notation for the full lifecycle of OOD. UML is not a programming language but tools can be
used to generate code in various languages using UML diagrams. The goal of UML can be defined
as a simple modeling mechanism to model all possible practical systems in today’s complex
environment.

ADVANTAGES
1. To represent complete systems (instead of only the software portion)
using object oriented concepts.
2. To establish an explicit coupling between concepts and executable
code.
3. To take into account the scaling factors that are inherent to complex
and critical systems.
4. To creating a modelling language usable by both humans and machines.

UML defines several models for representing systems

1. The use case model describes the requirements of the user.


2. The class model captures the static structure.
3. A sequence diagram simply depicts interaction between objects in a sequential
order.

16
4.2.1 USE CASE DIAGRAM

A use case diagram at its simplest is a representation of a user's interaction with the system
and depicting the specifications of a use case. A use case diagram can portray the different types
of users of a system and the various ways that they interact with the system.

Fig 4.2 Use case diagram

17
4.2.2 CLASS DIAGRAM

The class diagram is the main building block of object-oriented modeling. It is used for
general conceptual modeling of the structure of the application, and for detailed modeling,
translating the models into programming code. Class diagrams can also be used for data
modeling. The classes in a class diagram represent both the main elements, interactions in the
application, and the classes to be programmed. In the design of a system, a number of classes
are identified and grouped together in a class diagram that helps to determine the static relations
between them. In detailed modeling, the classes of the conceptual design are often split into
subclasses [9].

Fig 4.3 Class Diagram

18
4.2.3 SEQUENCE DIAGRAM

A sequence diagram simply depicts interaction between objects in a sequential order,


the order in which these interactions take place. Sequence diagrams describe how and in what
order the objects in a system function. These diagrams are widely used by businessmen and
software developers to document and understand requirements for new and existing systems.

Fig 4.4 Sequence Diagram

19
4.3 DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) is a traditional visual representation of the information flows
within a system. A neat and clear DFD can depict the right amount of the system requirement
graphically. It can be manual, automated, or a combination of both.

It shows how data enters and leaves the system, what changes the information, and where data is
stored.

The objective of a DFD is to show the scope and boundaries of a system as a whole. It may be
used as a communication tool between a system analyst and any person who plays a part in the
order that acts as a starting point for redesigning a system. The DFD is also called as a data flow
graph or bubble chart [10].

Fig 4.5 Data flow diagram

20
CHAPTER 5
SYSTEM IMPLEMENTATION

5.1 MODULES

 Login
 Add Students
 Add Marks
 View Marks
5.2 MODULE DESCRIPTION
5.2.1 LOGIN:
Login Page is the landing page for the Web Application, through which only the
authorized faculties will be allowed.
5.2.2 Add Students:
Add Students Module is used to add the student details like student’s name,
student’s registration number, student’s department, student’s section, student’s
batch. This process is done only once per student. The mode of adding the students
may vary, so there are various options in which student’s data can be added based
on the number of students.
1. Add student’s data of entire department:
In this sub-module, the data of an entire department can be added by uploading
a excel/csv file which contains data like student name, registration number,
section. The department and batch can be entered in the UI next to which the
file will be uploaded.
2. Add student’s data of entire class:
In this sub-module, the data of entire class can be added by uploading a
excel/csv file which contains data like student name and registration number.
The department, batch and section can be entered in the UI next to which the
file will be uploaded.
3. Add individual student’s data:
This sub-module exists because, some students may be joined late like Lateral
21
Entry, so to handle situations like that, and the data of an individual student can
be added into the DB. All the data of the student which includes student name,
registration number, batch, department, section entered into a UI form will be
collected, validated and added to the DB.
5.2.3 Add Marks:
Add Marks Module is used to add the student’s result into the database. Here again
there are two modes to add the data.
1. Add Individual Data:
In this sub-module, the marks data of a single student’s in a particular semester
into the database. The data will be collected in a UI form.
2. Add PDF Data:
In this sub-module, the PDF of result published by the University will be
uploaded and then the data from the PDF will be extracted using a JS library
called ‘tabula-js’ which basically uses ‘tabula-java’ in the background and
returns the extracted data as a JS object, which then will be mapped to the
respective relations in the DB.
5.2.4 View Marks:
This module is used to view the added marks of the students in various forms like
marks of an individual student, marks of an entire class, marks of an entire
department, and marks of an entire college.
1. View Individual Marks:
In this sub-module, the data such as, history of GPA (in graph form), Grades in
all the semester (in table form) can be viewed by entering the registration
number of the student.s
2. View Class Marks:
In this sub-module, the data of the entire class can be viewed. Data like the
result of the entire class (in table form), subject wise pass percentage (in bar
graph), and pass percentage vs fail percentage (in pie graph). Along with all the
arrear results which also contains the same table and the graphs as mentioned
above. Additionally, at any instance, the data of the individual student can be
22
viewed by just clicking on the registration number of the student that is
underlined in the table of data. After clicking, the page will be redirected to
View Individual Marks page that is filled with the data of the registration
number clicked.
3. View Department Marks:
In this sub-module, the data of an entire department can be viewed. The data to
be displayed are, marks of all the students in the department (in table view),
subject wise pass percentage (in bar graph), pass percentage vs fail percentage
(in pie graph), comparison between pass percentages of all the sections (in pie
graph). Along with all the arrear results which also contains the same table and
graphs as mentioned above. Here again, the data of the individual student can
be viewed by clicking the underlined registration number of the student from
the table.

23
CHAPTER 6

CONCLUSION AND FUTURE WORK

8.1 CONCLUSION

Considering the extremely intermixed nature of university faculties, a centralized and


automated solution to these vital activities like result analysis and report generation would be of
great addition. Thus development of this project can be easily used in universities for result
analysis of students. This system helps to calculate result fast so it optimizes the manpower. This
Result Analysis Automation brings a drastic reduction in time consumption taken to maintaining
student records. This was built keeping in mind all possible mistakes a user can make and thus
system is user friendly.

8.2 FUTURE WORK

The system can be expanded in the future by integrating it with mobile development frameworks
so that it can be available as an android/iOS application which further increases the reach of this
system. This system can be further expanded by allowing the user to upload different forms of
data. Further, this system will be made available for student’s use to view their performances
individually.

24
APPENDIX 1
SOURCE CODE
Program to add students’ marks data of entire department (PDF upload):
Controller Layer:
router.post( '/', ( req, res ) => addMarks( req, res ) )
const addMarks = async ( req, res ) => {
logger.info( 'Entering | MarksController::addMarks' )
let marksDTO = new MarksDT0( true, null, '', null )
let form = new formidable.IncomingForm()
await form.parse( req, async function ( err, fields, files ) {
if ( err ) {
marksDTO.success = false
marksDTO.description = err
}
if ( marksDTO.success ) {
marksDTO = await marksService.addMarks( files.file, fields, marksDTO )
}
res.json( marksDTO.json )
logger.info( 'Exiting | MarksController::addMarks' )
res.end()
} )}
Service Layer:
async addMarks ( file, fields, marksDTO ) {
logger.info( 'Entering | MarksService::addMarks' )
const data = await this.extractData( file.path )
if ( data.error !== '' ) {
marksDTO.success = false
marksDTO.description = data.error
}
let newData = data.output.split( "\n" )
marksDTO.marksData = {
25
data: newData,
type: fields.type
}
if ( marksDTO.success ) {
marksDTO = marksDao.addMarks( marksDTO )
}
logger.info( 'Exiting | MarksService::addMarks' )
return marksDTO
}
Dao Layer:
async addMarks ( marksDTO ) {
logger.info( 'Entering | MarksDao::addMarks' )
this.conn = await mysql.createConnection( config )
const data = marksDTO.marksData.data
const type = marksDTO.marksData.type
const grades = {
'O': 10,
'A+': 9,
'A': 8,
'B+': 7,
'B': 6,
'U': 0
}
if ( type === 'before_revaluation' ) {
let prevNum = null, dept = null, batch = null, sem = null, tableCheck = false
let subjects = [], credits = {}, tableName
const regEx1 = /Subjectcode->/i
const regEx2 = /([1-9])([0-9]{11})/
try {
for ( let i = 0; i < data.length; i++ ) {
const row = data[ i ].split( '\r' )[ 0 ].split( ',' )
26
if ( regEx1.test( row[ 1 ] ) ) {
subjects = []
prevNum = null
for ( let j = 2; j < row.length; j++ ) {
subjects.push( row[ j ] )
}
continue
}
if ( subjects === [] ) {
continue
}
if ( regEx2.test( row[ 0 ] ) ) {
// Getting Dept, Batch, Sem when new sem comes
if ( prevNum === null ) {
prevNum = row[ 0 ]
let result
result = await this.findStudent( row[ 0 ] )
dept = result[ 'Class' ]
batch = result[ 'Batch' ]
sem = await this.findSemester( subjects[ 0 ], dept )
tableName = dept + "_" + batch + "_s" + sem

credits = await this.findCredits( subjects, dept )


tableCheck = await this.tableCheck( tableName, subjects )
}
// Getting Dept and batch when batches change (i.e) arrears result to current result
if ( Math.floor( parseInt( prevNum ) / 1000 ) !== Math.floor( parseInt( row[ 0 ] ) /
1000 ) ) {
prevNum = row[ 0 ]
let result = await this.findStudent( row[ 0 ] )
dept = result[ 'Class' ]

27
batch = result[ 'Batch' ]
tableName = dept + "_" + batch + "_s" + sem
tableCheck = await this.tableCheck( tableName, subjects )
}

// Check for arrears and get the table suffix


const suffix = await this.checkForArrears( row[ 0 ], tableName )
let creditPoint = 0
if ( suffix === '' ) {
// If Suffix is empty => Current Sem
if ( row[ i + 2 ] !== '' ) {
for ( let i = 0; i < subjects.length; i++ ) {
creditPoint += grades[ row[ i + 2 ] ] * credits[ subjects[ i ] ]
// console.log("UPDATE " + tableName + " SET " + subjects[ i ] + "='" +
row[ i + 2 ] + "' WHERE Registration_Number=" + row[ 0 ])
await this.conn.execute( "UPDATE " + tableName + " SET " + subjects[ i
] + "='" + row[ i + 2 ] + "' WHERE Registration_Number=" + row[ 0 ] )
if ( row[ i + 2 ].toUpperCase() === 'U' ) {
// console.log("INSERT INTO " + tableName + '_failures' + "
VALUES(" + row[ 0 ] + ",'" + subjects[ i ] + "')")
await this.conn.execute( "INSERT INTO " + tableName + '_failures' + "
VALUES(" + row[ 0 ] + ",'" + subjects[ i ] + "')" )
}
}
}
await this.conn.execute( "UPDATE " + tableName + " SET Credit=" +
creditPoint + " WHERE Registration_Number=" + row[ 0 ] )
} else {
// If Suffix is present => Add to respective arrears tables
for ( let i = 0; i < subjects.length; i++ ) {
creditPoint += grades[ row[ i + 2 ] ] * credits[ subjects[ i ] ]
28
if ( row[ i + 2 ] !== '' ) {
await this.conn.execute( "INSERT INTO " + tableName + suffix + "
VALUES(" + row[ 0 ] + ",'" + subjects[ i ] + "','" + row[ i + 2 ] + "'," + grades[ row[ i + 2 ] ] *
credits[ subjects[ i ] ] + ")" )
if ( row[ i + 2 ].toUpperCase() !== 'U' ) {
await this.conn.execute( "DELETE FROM " + tableName + '_failures' +
" WHERE Registration_Number=" + row[ 0 ] + " and Subject_Code='" + subjects[ i ] + "'" )
}
}
}
}
}
}
} catch ( err ) {
// console.log( err )
marksDTO.success = false
marksDTO.description = err
marksDTO.status = 500
marksDTO.marksData = null
logger.info( 'Exiting | MarksDao::addMarks | Error' )
return marksDTO
}
}
marksDTO.success = true
marksDTO.status = 200
marksDTO.description = DATA_ADDED_SUCCESSFULLY
marksDTO.marksData = null
logger.info( 'Exiting | MarksDao::addMarks' )
return marksDTO
}
29
Program to add students’ data of entire department (excel/csv upload):
Controller Layer:
router.post( '/', ( req, res ) => addStudents(req, res) )
const addStudents = async (req, res) => {
logger.info('Entering | StudentController::addStudents')
let studentDTO = new StudentDTO(true,null,'',null)
let form = new formidable.IncomingForm()
await form.parse( req, async function ( err, fields, files ) {
if ( err ) {
studentDTO.success = false
studentDTO.description = err
}
if(studentDTO.success){
studentDTO = await studentService.addStudents(files.file, fields, studentDTO)
}
res.json(studentDTO.json)
logger.info('Exiting | StudentController::addStudents')
res.end()
})
}
Service Layer:
async addStudents(file, fields, studentDTO){
logger.info('Entering | StudentService::addStudents')
let records
if(fields.type === 'department'){
const fileContent = await fs.readFile(file.path)
records = await parse(fileContent, {
columns: true,
skip_empty_lines: true
})
30
studentDTO.studentData = {
data: records,
dept: fields.dept,
batch : parseInt(fields.batch)
}
studentDTO = await studentDao.addStudents(studentDTO)
}
logger.info('Exiting | StudentService::addStudents')
return studentDTO
}
Dao Layer:
async addStudents ( studentDTO ) {
logger.info( 'Entering | StudentDao::addStudents' )
const data = studentDTO.studentData.data
const conn = await mysql.createConnection( config )

try {
let tablePresent = false
const [ rows ] = await conn.execute( 'SHOW TABLES' )
rows.forEach( row => {
if ( row[ 'Tables_in_raa' ] === (studentDTO.studentData.dept + '_' +
studentDTO.studentData.batch.toString() + '_' + (studentDTO.studentData.batch + 4).toString() +
'_S1').toLowerCase() ) {
tablePresent = true
}
})
if ( !tablePresent ) {
for ( let sem = 1; sem <= 8; sem++ ) {
const tableName = studentDTO.studentData.dept + '_' +
studentDTO.studentData.batch.toString() + '_' + (studentDTO.studentData.batch + 4).toString() +
'_S' + sem.toString()

31
await conn.execute( "CREATE TABLE " + tableName + "(Registration_Number
VARCHAR(12) PRIMARY KEY,Credit INT)" )
await conn.execute( "CREATE TABLE " + tableName + '_AfterRevaluation' +
"(Registration_Number varchar(12),Subject_Code VARCHAR(6),Credit INT,Grade
VARCHAR(2), PRIMARY KEY(Registration_Number,Subject_Code))" )
await conn.execute( "CREATE TABLE " + tableName + '_AfterReview' +
"(Registration_Number VARCHAR(12),Subject_Code VARCHAR(6),Credit INT,Grade
VARCHAR(2), PRIMARY KEY(Registration_Number,Subject_Code))" )
await conn.execute( "CREATE TABLE " + tableName + '_Arrear1' +
"(Registration_Number VARCHAR(12),Subject_Code VARCHAR(6),Grade
VARCHAR(2),Credit INT, PRIMARY KEY(Registration_Number,Subject_Code))" )
await conn.execute( "CREATE TABLE " + tableName + '_Arrear2' +
"(Registration_Number VARCHAR(12),Subject_Code VARCHAR(6),Grade
VARCHAR(2),Credit INT, PRIMARY KEY(Registration_Number,Subject_Code))" )
await conn.execute( "CREATE TABLE " + tableName + '_Arrear3' +
"(Registration_Number VARCHAR(12),Subject_Code VARCHAR(6),Grade
VARCHAR(2),Credit INT, PRIMARY KEY(Registration_Number,Subject_Code))" )
await conn.execute( "CREATE TABLE " + tableName + '_Failures' +
"(Registration_Number VARCHAR(12),Subject_Code VARCHAR(6), PRIMARY
KEY(Registration_Number,Subject_Code) )" )
}
}
for ( let i in data ) {
const row = data[ i ]
const keys = Object.keys( row )
const regNo = row[ keys[ 0 ] ]
const name = row[ keys[ 1 ] ]
const studClass = studentDTO.studentData.dept + '_' + row[ keys[ 2 ] ]
const batch = studentDTO.studentData.batch.toString() + '_' +
(studentDTO.studentData.batch + 4).toString()
await conn.execute( "INSERT INTO students VALUES(" + regNo + ",'" + name + "','"

32
+ studClass + "','" + batch + "')" )
for ( let sem = 1; sem <= 8; sem++ ) {
const tableName = studentDTO.studentData.dept + '_' +
studentDTO.studentData.batch.toString() + '_' + (studentDTO.studentData.batch + 4).toString() +
'_S' + sem.toString()
await conn.execute( "INSERT INTO " + tableName + "(Registration_Number)
VALUES(" + regNo + ")" )
}
}
studentDTO.success = true
} catch
( err ) {
studentDTO.success = false
studentDTO.description = err
studentDTO.status = 500
}
if ( studentDTO.success ) {
studentDTO.status = 200
studentDTO.description = DATA_ADDED_SUCCESSFULLY
}
studentDTO.studentData = null
logger.info( 'Exiting | StudentDao::addStudents' )
return studentDTO
}

Program to view individual student’s marks (returning JS object):


Controller Layer:
router.get( '/', ( req, res ) => getIndividualMarks( req, res ) )
const getIndividualMarks = async ( req, res ) => {
logger.info( "Entering | MarksController::getIndividualMarks" )
let marksDTO = new MarksDT0( true, null, '', null )
33
const RegNum = req.query.RegNum
marksDTO = await marksService.getIndividualMarks( RegNum, marksDTO )
res.json( marksDTO.json )
logger.info( "Exiting | MarksController::getIndividualMarks" )
res.end()
}
Service Layer:
async getIndividualMarks ( RegNum, marksDTO ) {
logger.info( 'Entering | MarksService::getIndividualMarks' )
if ( RegNum === '' || RegNum == null ) {
marksDTO.success = false
marksDTO.description = REGISTRATION_NUMBER_IS_EMPTY
marksDTO.status = 500
}
if ( marksDTO.success ) {
marksDTO = marksDao.getIndividualMarks( RegNum, marksDTO )
}
logger.info( 'Exiting | MarksService::getIndividualMarks' )
return marksDTO
}
Dao Layer:
async getIndividualMarks ( RegNum, marksDTO ) {
logger.info( 'Entering | MarksDao::getIndividualMarks' )
this.conn = await mysql.createConnection( config )
try {
const data = []
let name, studClass, batch
let result = await this.findStudent( RegNum )
studClass = result[ 'Class' ]
batch = result[ 'Batch' ]
let table = studClass + '_' + batch + '_S'
34
//Getting the Name of the Student
const [ rows ] = await this.conn.execute( 'SELECT Student_Name FROM students
WHERE Registration_Number=' + RegNum )
name = rows[ 0 ][ 'Student_Name' ]
// Iterating for each sem
for ( let i = 1; i < 8; i++ ) {
let subjects = []
let semMark = {
result: {}
}
let tableName = table + i
let [ rows1 ] = await this.conn.execute( 'SELECT * FROM ' + tableName + ' WHERE
Registration_Number=' + RegNum )
let keys = Object.keys( rows1[ 0 ] )
if ( keys.length > 2 ) {
semMark[ 'semester' ] = i
// Normal Result
for ( let j = 1; j < keys.length; j++ ) {
semMark.result[ keys[ j ] ] = rows1[ 0 ][ keys[ j ] ]
if ( j > 1 ) {
subjects.push( keys[ j ] )
}
}
let credits = await this.findCredits( subjects, studClass )
semMark.totalCredits = credits.totalCredits
// Getting the arrear1 results of sem i
let [ rows ] = await this.conn.execute( 'SELECT * FROM ' + tableName + '_Arrear1'
+ ' WHERE Registration_Number=' + RegNum )
if ( rows.length > 0 ) {
semMark.arrear1 = []
rows.forEach( row => {
35
let temp = {}
temp[ row[ 'Subject_Code' ] ] = row[ 'Grade' ]
temp[ 'Credit' ] = row[ 'Credit' ]
semMark.arrear1.push( temp )
})
}// Getting the arrear2 results of sem i
[ rows ] = await this.conn.execute( 'SELECT * FROM ' + tableName + '_Arrear2' + '
WHERE Registration_Number=' + RegNum )
if ( rows.length > 0 ) {
semMark.arrear2 = []
rows.forEach( row => {
let temp = {}
temp[ row[ 'Subject_Code' ] ] = row[ 'Grade' ]
temp[ 'Credit' ] = row[ 'Credit' ]
semMark.arrear2.push( temp )
})
}// Getting the arrear 3results of sem i
[ rows ] = await this.conn.execute( 'SELECT * FROM ' + tableName + '_Arrear3' + '
WHERE Registration_Number=' + RegNum )
if ( rows.length > 0 ) {
semMark.arrear3 = []
rows.forEach( row => {
let temp = {}
temp[ row[ 'Subject_Code' ] ] = row[ 'Grade' ]
33
temp[ 'Credit' ] = row[ 'Credit' ]
semMark.arrear3.push( temp )
})
}
data.push( semMark )
}
36
}
marksDTO.marksData = {
name: name,
dept: studClass,
batch: batch,
regNum: RegNum,
data: data
}
} catch ( err ) {
// console.log( err )
marksDTO.success = false
marksDTO.description = err
marksDTO.status = 500
marksDTO.marksData = null
logger.info( 'Exiting | MarksDao::getIndividualMarks | Error' )
return marksDTO
}

marksDTO.success = true
marksDTO.status = 200
marksDTO.description = DATA_RETRIEVED_SUCCESSFULLY
logger.info( 'Exiting | MarksDao::getIndividualMarks' )
return marksDTO
}

37
APPENDIX -2
SNAPSHOTS
Login Page:

View Individual Marks:


Before Entering Registration Number:

38
After Entering Registration Number(And clicked Search Button):

39
View Class Marks:
Before Entering Data:

After entering the data (and clicking the search button):

40
41
Report Generation:

42
REFERENCES
[1] Ashwin Mehta, Jugal Patel, Aditya Mewada “Student Result Analysis System” IRJET, Vol.
5, Issue. 4, April 2018, pg.2578-2580

[2] K.Himaja, lalam Sreevidya and N.Srinivasan “Result Analysis Automation System” ARPN,
Vol. 12, Issue. 12, July 2017, pg.4065-4068

[3] Tabula-Java accessed on 9th June 2021, < https://tabula.technology/>

[4] Layered Architecture accessed on 9th June 2021, <https://techbeacon.com/app-


dev- testing/top-5-software-architecture-patterns-how-make-right-choice/>

[5] Springboot dev accessed on 9th June 2021,


< https://springbootdev.com/2017/05/14/layered-architecture-n-tier-architecture/>

[6] Chew Li Sa, Dayang Hanani bt. Abang Ibrahim, Emmy Dahliana Hossain
“Student Performance Analysis System” IEEE, ISBN: 978-1-4799-6242-6 Nov 2014.

[7] Wikipedia accessed on 9th June 2021, <https://en.wikipedia.org/wiki/Systems_architecture/>

[8] UML Diagrams accessed on 9th June, <https://creately.com/blog/diagrams/uml-diagram-


types-examples/>

[9] Wikipedia accessed on 9th June 2021, < https://en.wikipedia.org/wiki/Class_diagram>

[10] Java T Point accessed on 9th June 2021, <https://www.javatpoint.com/software-engineering-


data-flow-diagrams/>

43

You might also like