70
Project Report on Accounts Management System of NIT Srinagar Submitted To Department of Information Technology, in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in Information Technology Submitted By: Ajay Singh (01/07) Anil Mulan (34/07) INFORMATION TECHNOLOGY Under The Guidance Of: Assistant Professor. Mohammad Ahsan Chishti Department of Computer Science & Engineering NATIONAL INSTITUTE OF TECHNOLOLY HAZRATBAL, SRINAGAR- 190006 (J&K)

Final Report

Embed Size (px)

DESCRIPTION

DBMS, Database management system, project report on DBMS,Account management system,PHP,Javascript,Mysql,Report final year,project

Citation preview

Page 1: Final Report

Project Report on

Accounts Management System of NIT Srinagar

Submitted To

Department of Information Technology,

in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in Information Technology

Submitted By:

Ajay Singh (01/07)

Anil Mulan (34/07)

INFORMATION TECHNOLOGY

Under The Guidance Of:

Assistant Professor. Mohammad Ahsan Chishti Department of Computer Science & Engineering

NATIONAL INSTITUTE OF TECHNOLOLY HAZRATBAL, SRINAGAR- 190006 (J&K)

Page 2: Final Report

i

STUDENT DECLARATION/CERTIFICATE

I Ajay Singh , I Anil Mulan students of Bachelor of Engineering in Information Technology discipline, National Institute of Technology Srinagar (J&K), here by declare that the work presented in this project entitled “Accounts Management System” is bonafide and correct to the best of our knowledge and this work has been carried out taking care of Engineering Ethics in the partial fulfillment of the requirements for the award of B.Tech. in Information Technology” degree in the session 2011, is an authentic record of our own work carried out under the supervision of Ahsan Chishti, Asst. prof. Department of Computer Science & Engg, National Institute of Technology, Srinagar. The work presented does not infringe any patented work and has not been submitted to any other university or anywhere else for the award of any degree or any professional diploma.

Dated__________ Ajay Singh (01/07)

Anil Mulan (34/07)

This is to certify that the above statements made by the candidates are correct to the best of my knowledge.

(Project Guide)

Ahsan Chishti

Assistant Professor (CSE)

N.I.T, Srinagar

DEPARTMENT OF INFORMATION TECHNOLOGY

NATIONAL INSTITUTE OF TECHNOLOGY, SRINAGAR

Page 3: Final Report

ii

CERTIFICATE

It is certify that Ajay Singh (01/07), Anil Mulan (34/07), have successfully completed the

project on “Accounts Management System” during their period of study in the department in

7th and 8th semester under my supervision in partial fulfillment to the reward of B.Tech. Degree

in Information Technology and the work under above mentioned quote has not been submitted

elsewhere simultaneously or earlier for the reward of the said degree.

Ajay Singh and Anil Mulan has fulfilled all the requirements as per status of NIT for the

submission of this report under my guidance and supervision.

Date__________ (Project Guide)

Mohammad Ahsan Chishti

Assistant professor (CSE)

NIT Srinagar

DEPARTMENT OF INFORMATION TECHNOLOGY

NATIONAL INSTITUTE OF TECHNOLOGY, SRINAGAR

Page 4: Final Report

iii

ACKNOWLEDGEMENT

Major projects indeed one of the most important aspects for all those students pursuing B.Tech in

all the way adding up to our practical knowledge and handling difficulties to make way out of it.

We take the opportunity to express our sincere gratitude and deep sense of indebtedness to our

guide “Asst. Prof. Mohammad Ahsan Chishti” for the valuable guidance and inspiration

throughout the project duration. We are grateful to him for his innovative ideas, which led to the

successful completion of this project. We are very fortunate to work under such an outstanding

mentor in the field of “Accounts Management System”. He has always welcomed our problems

and cleared our doubts. We will always be grateful to him for providing us the moral support and

sufficient time.

We take immense pleasure in thanking Dr. Roohie Naaz, Head of Deptt. Information

Technology for having permitted us to carry out this project work.

Ajay Singh Anil Mulan Enroll: 01/07 Enroll: 34/07 8th Semester 8th Semester Information Tech. Deptt. Information Tech. Deptt. NIT Srinagar. NIT Srinagar.

Page 5: Final Report

iv

ABSTRACT

As the name specifies “Accounts Management System” is a web enabled system designed to

manage the Salary of the Employees of NIT Srinagar. There is a lot of strain on the person who

are running the Accounts Management. This particular project deals with the problems on

managing Accounts and avoids the problems which occur when carried manually.

Identification of the drawbacks of the existing system leads to the designing of web enabled

system. The system which is more user friendly and more GUI oriented. We can improve the

efficiency of the system, thus overcome the drawbacks of the existing system.

⋅ Less Human error

⋅ Strength and strain of manual labour can be reduced

⋅ Data redundancy can be avoided to some extent

⋅ Easy to handle

⋅ Easy data updating

⋅ Easy record keeping

Page 6: Final Report

v

STUDENTS DECLARATION……………………………………………………………...... i CERTIFICATE……………………………………………………………………………….. ii ACKNOWLEDGEMENT……………………………………………………………………. iii ABSTRACT…………………………………………………………………………………... iv LIST OF FIGURES……………………………………………………………...................... x LIST OF TABLES……………………………………………………………………………. ix CHAPTER 1 – Introduction……………………………………………………………… … 1 1.1 Overview……………………………………………………………………………… 2 1.2 User Panel………………………………………………………………………… 2 1.2.1 User Login…………………………………………………………………... 2 1.2.1.1 Home………………………………………………………………….. 2 1.2.1.2 Registration Form…………………………………………………....... 2 1.3 Admin Panel………………………………………………………………………. 2 1.3.1 Admin Login………………………………………………………………... 2 1.3.1.1 Home………………………………………………………………….. 2 1.3.1.1.1 Add new Employee Details to the Records……………………... 3 1.3.1.1.2 Retrieve the details of Employees……………………………….. 3 1.3.1.1.3 Edit and Modify the Details……………………………………... 3 1.4 Features of Accounts Management System………………………………………. 3 CHAPTER 2 – Literature Survey…………………………………………………………... 4 2.1 Historical usage of RDBMS…………………………………………………………... 5 2.2 Popularity of PHP…………………………………………………………………….. 6 2.3 Considering Various of PHP………………………………………………………….. 6 2.4 PHP for Database Applications……………………………………………………….. 7 2.5 Previous versions of PHP……………………………………………………………... 8 2.6 History of SQL (A Research Project Conducted by IBM)…………………………… 8 CHAPTER 3 –Problem Defination…………………………………………………………. 10 3.1 Problem Defination…………………………………………………………………… 11 CHAPTER 4 –SDLC & Waterfall Model……………………………………………… ….. 12 4.1 Software Development Life Cycle……………………………………………………. 13 4.1.1 The need for a software life cycle model……………………………………….. 13 4.1.1.1 Different software life cycle models……………………………………… 14 4.2 Waterfall model & Phases of the waterfall model……………………………………. 14 4.3 Activities in each phase of the life cycle……………………………………………… 16 4.3.1 Activities undertaken during feasibility study…………………………………. 16 4.3.2 Activities undertaken during analysis & specification…………………………. 16 4.3.2.1 System Analysis…………………………………………………………... 16 4.3.2.1.1 Existing System…………………………………………………….. 16 4.3.3 Activities undertaken during system design……………………………………. 17 4.3.3.1 Input Design………………………………………………………………. 17 4.3.3.2 Process Design……………………………………………………………. 18 4.3.4 Activities undertaken during Database Design………………………………… 19 4.3.5 Activities undertaken during System Testing………………………………….. 21 CHAPTER 5 – Requirements………………………………………………………………. 22 5.1 Hardware Requirements………………………………………………………………. 23 5.2 Software Requirements……………………………………………………………….. 23

Page 7: Final Report

vi

5.2.1 Xampp…………………………………………………………………………... 23 5.2.2.1 Obtaining and Installing XAMPP………………………………………… 24 5.2.2.2 PHP Hellow World……………………………………………………….. 25 5.2.2.3 Creating a Database and Table, and Inserting Data………………………. 26 5.2.2 phpMyAdmin…………………………………………………………………… 27 CHAPTER 6 – PHP, MYSQL, JAVA SCRIPT, DBMS………………………………….. 31 6.1 PHP……………………………………………………………………………………. 32 6.1.1 Advantages of Using PHP with MySQL………………………………………... 33 6.1.2 Speed optimization……………………………………………………………… 33 6.1.3 Security………………………………………………………………………….. 34 6.1.1.1 Syntax……………………………………………………………………... 34 6.1.1.1.1 Data types…………………………………………………………… 35 6.1.1.1.2 Functions……………………………………………………………. 36 6.1.1.1.3 Resources…………………………………………………………… 36 6.2 MYSQL……………………………………………………………………………….. 37 6.2.1 Database Tables…………………………………………………………………. 37 6.2.1.1 Queries……………………………………………………………………. 37 6.2.1.2 Creating a connection with database……………………………………… 37 6.2.1.3 Closing a connection……………………………………………………… 38 6.2.1.1.1 Create a Database…………………………………………………… 39 6.2.1.1.2 Create a Table……………………………………………………….. 39 6.2.2 MySql Functions………………………………………………………………... 39 6.2.3 Request & Response Working………………………………………………….. 40 6.2.4 Apache Web Server……………………………………………………………... 41 6.3 JAVA SCRIPT………………………………………………………………………... 41 6.3.1 Java Script is Case Sensitive……………………………………………………. 42 6.3.1.1 White Space……………………………………………………………….. 42 6.3.1.2 Break up a Code…………………………………………………………... 42 6.3.2 Java Script and HTML………………………………………………………….. 42 6.3.2.1 Syntax……………………………………………………………………... 43 6.3.3 Java Script Functions…………………………………………………………... 44 6.4 DATABASE MANAGEMENT SYSTEM…………………………………………… 47 CHAPTER 7 – SNAPSHOTS……………………………………………………………….. 49 Account management system of NIT Srinagar…………………………………………… 50 Administrator Login & Settings………………………………………………………….. 51 Updating an Employee……………………………………………………………………. 52 Salary through bank………………………………………………………………………. 52 Employee salary info of an employee of a particular month……………………………... 52 Abstract Salary bill of Teaching staff…………………………………………………….. 53 CHAPTER 8 – IMPLEMENTATION………………………………………………… ….. 54 8.1 IMPLEMENTATION………………………………………………………………… 55 8.1.1 User Training……………………………………………………………………. 55 8.1.2 Security and Maintenance………………………………………………………. 56

Page 8: Final Report

vii

CHAPTER 9 – CONCLUSION…………………………………………………………….. 57 9.1 CONCLUSION………………………………………………………………………. 58 REFRENCES………………………………………………………………………………… 59

Page 9: Final Report

viii

LIST OF FIGURES

Figure – 4.1 Model Of Software development life cycle……………………………………. 13 Figure – 4.2 Waterfall Model………………………………………………………………... 15 Figure – 5.1 Installing Xampp for Windows…………………………………………………. 24 Figure – 5.2 Xampp Splash Screen…………………………………………………………... 25 Figure – 5.3 Resulting output of PHP file…………………………………………………… 26 Figure – 5.4 phpMyAdmin Start Page……………………………………………………….. 27 Figure – 5.5 Creating a new table in the database……………………………………………. 29 Figure – 6.1Working of PHP interpreter, MySQL, and the web server……………………... 40 Figure – 7.1 Account management system of NIT Srinagar…………………………………. 50 Figure – 7.2 Administrator Login……………………………………………………………. 50 Figure – 7.3 Settings for Future use………………………………………………………….. 51 Figure – 7.4 Updating an Employee………………………………………………………….. 51 Figure – 7.5 Salary through bank…………………………………………………………….. 52 Figure – 7.6 Employee salary info of an employee of a particular month…………………… 52 Figure – 7.7 Abstract Salary bill of Teaching staff…………………………………………... 53

Page 10: Final Report

ix

LIST OF TABLES

Table – 4.1 Employee account creation……………………………………………………..... 20 Table – 4.2 Administrator Login……………………………………………………………... 21 Table – 5.1 Table summary for the colleague table………………………………………….. 30 Table – 5.2 Fictional data for the colleague table………..…………………………………… 30 Table – 6.1 Creating and Working with Objects……………………………………………... 43 Table – 6.2 A table in a database……………………………………………………………... 48

Page 11: Final Report

Accounts Management System

1

1.INTRODUCTION

Page 12: Final Report

Accounts Management System

2

1.1. Overview

Campus Account Management System is a web enabled system designed to manage the

Salary of the Employees of an Institution. Campus Management System is a simple yet powerful

one joint integrated platform that manage the entire Operations of the Salary of the Employees of

an Institution.

It enables the users to store, modify, manipulate and retrieve information using the pull down

menus of the Employees of an Institution. The Campus Account Management System is also a

utilitarian tool which enables the user to access their details/summary of the salary of any month

using their Username and Password.

1.2 User Panel

1.2.1 User Login

1.2.1.1 Home

1. This consist a pop-up menu for users.

2. It contain a link to the NIT official web-site.

3. It allows the different users to access the registration forms.

4. User can view their own salary details of a particular month or from a particular month to

particular month.

1.2.1.2 Registration Form

This section provides an form to the Employees which can be filled by them and a copy of

the filled page can be taken in the printed form. This is later submitted to the Account authorities

which can be verified by them before alotting them unique Employee number.

1.3. Admin Panel

1.3.1 Administrator Login

1.3.1.1 Home

The Administrator can:

1. Add new Employee Details to the Records.

2. Add and Retrieve the details of every month.

3. Control the status of the Salary of Employees.

4. Edit the details of the Employees & modify the Employees records.

Page 13: Final Report

Accounts Management System

3

1.3.1.1.1 Add new Employee Details to the Records

This section is for the administrator. He can add the details of every employee of the

Institution.The details will saved in the database of every employee. Administrator does not need

to add the details in every month.

1.3.1.1.2 Retrieve the details of Employees

This section is used for retrieving the data of particular employee or from particular

employee no to particular employee number. This section is also is used for making the

statements of every month (salary through bank) and Abstract salary bill of all employees of

every month. Administrator can Print all these statements using Print Button on the screen.

1.3.1.1.3 Edit and Modify the Details

This section is used for modify the details of employees. For example if designation of the

employee change then it also need to change in database also and if percentage of TA, DA will

change then administrator can modify the details in settings.

1.4. Features of Accounts Management System

• User friendly

• Browser based

• Calender of Events

• Necessary security is provided against unauthorized access

• Exporting important reports to pdf.

Page 14: Final Report

Accounts Management System

4

2. LITERATURE SURVEY

Page 15: Final Report

Accounts Management System

5

2.1 Historical usage of the RDBMS

E. F. Codd introduced the term in his seminal paper "A Relational Model of Data for Large

Shared Data Banks", published in 1970. In this paper and later papers he defined what he meant

by relational. One well-known definition of what constitutes a relational database system is

Codd's 12 rules. However, many of the early implementations of the relational model did not

conform to all of Codd's rules, so the term gradually came to describe a broader class of database

systems. At a minimum, these systems:

• presented the data to the user as relations (a presentation in tabular form, i.e. as a

collection of tables with each table consisting of a set of rows and columns, can satisfy

this property)

• provided relational operators to manipulate the data in tabular form

The first systems that were relatively faithful implementations of the relational model were from

the University of Michigan; Micro DBMS (1969) and from IBM UK Scientific Centre at

Peterlee; IS1 (1970–72) and its followon PRTV (1973–79). The first system sold as an RDBMS

was Multics Relational Data Store, first sold in 1978. Others have been Berkeley Ingres QUEL

and IBM BS12.

The most popular definition of an RDBMS is a product that presents a view of data as a

collection of rows and columns, even if it is not based strictly upon relational theory. By this

definition, RDBMS products typically implement some but not all of Codd's 12 rules.[1]

A second, theory-based school of thought argues that if a database does not implement all of

Codd's rules (or the current understanding on the relational model, as expressed by Christopher J

Date, Hugh Darwen and others), it is not relational. This view, shared by many theorists and

other strict adherents to Codd's principles, would disqualify most DBMSs as not relational. For

clarification, they often refer to some RDBMSs as Truly-Relational Database Management

Systems (TRDBMS), naming others Pseudo-Relational Database Management Systems

(PRDBMS).

Page 16: Final Report

Accounts Management System

6

As of 2009, all commercial relational DBMSes employ SQL as their query language. Alternative

query languages have been proposed and implemented, notably the pre-1996 implementation of

Berkeley Ingres QUEL. With standardization of the SQL, both commercial and open source

DBMSes have adopted some degree of standards compliance.

2.2 popularity of PHP continues to grow rapidly because of its many advantages:

It’s fast: On Web sites, because it is embedded in HTML code, the time to process and load a

Web page is short.

It’s free: PHP is proof that free lunches do exist and that you can get more than you paid for.

It’s easy to use: The syntax is simple and easy to understand and use, even for non-

programmers. For use in Web sites, PHP code is designed to be included easily in an HTML file.

It’s versatile: PHP runs on a wide variety of operating systems —Windows, Linux, Mac OS,

and most varieties of Unix.

Technical support is widely available: You can join one of several e-mail discussion

lists offered on the PHP Web site (www.php.net), which cover topics such as general PHP, PHP

on Windows, or databases and PHP. In addition, a Web interface to the discussion lists is

available at news.php.net, where you can browse or search the messages.

It’s secure: As long as your scripts are designed correctly, the user does not see the PHP code.

It’s customizable: The open source license allows programmers to modify the PHP software,

adding or modifying features as needed to fit their own environments. PHP provides significant

control over the environment, reducing chances of failure.

2.3 Considering the Various Uses for PHP

PHP is a general-purpose language that can be used to write general-purpose scripts. Scripts are

computer files containing instructions in the PHP language that tell the computer to do things,

such as display Hello on the screen or store some specified data in a database. Most scripts

contain a series of instructions that can accomplish tasks from designing Web pages to

navigating your file system. Because PHP began life on the Web, it has many features

that are particularly well suited for use in scripts that create dynamic Web pages. Currently, you

find PHP most often hard at work in Web pages, but its use for other purposes is growing. PHP

is very popular for Web sites. According to the PHP Web site (www.php.net/usage.php), over 11

Page 17: Final Report

Accounts Management System

7

million domains are using PHP. Yahoo!, which is probably the world’s most visited site, recently

decided to change from its own proprietary language to PHP.[2]

PHP has many features designed specifically for use in Web sites, including the following:

Interact with HTML forms: PHP can display an HTML form and process the information

that the user types in.

Communicate with databases: PHP can interact with databases to store information from

the user or retrieve information that is displayed to the user.

Generate secure Web pages: PHP allows the developer to create secure Web pages that

require users to enter a valid username and password before seeing the Web page content. PHP

features make these and many other Web page tasks easy. PHP is only server-side, meaning it

can’t interact directly with the user’s computer. That means PHP can’t initiate actions based on

the status of the user’s computer, such as mouse actions or screen size. Therefore, PHP alone

can’t produce some popular effects, such as navigation menus that drop down or change color.

On the other hand, JavaScript, a client-side scripting language, can’t access the server, limiting

its possibilities. For example, you can’t use JavaScript to store data on the server or retrieve data

from the server. But wait! You don’t have to choose. You can use JavaScript and PHP together

to produce Web pages that neither can produce alone.[2]

2.4 PHP for database applications

PHP is particularly strong in its ability to interact with databases. PHP supports pretty much

every database you’ve ever heard of and some you haven’t. PHP handles connecting to the

database and communicating with it, so you don’t need to know the technical details for

connecting to a database or for exchanging messages with it. You tell PHP the name of the

database and where it is, and PHP handles the details. It connects to the database, passes

your instructions to the database, and returns the database response to you. Major databases

currently supported by PHP include the following:

• dBASE

• Informix

• Ingres

• Microsoft SQL Server

• MySQL

Page 18: Final Report

Accounts Management System

8

• Oracle

• PostgreSQL

• Sybase

PHP supports other databases as well, such as filePro, FrontBase, and InterBase. In addition,

PHP supports ODBC (Open Database Connectivity), a standard that allows you to communicate

with even more databases, such as Access and IBM DB2. PHP works well for a database-driven

Web site. PHP scripts in the Web site can store data in and retrieve data from any supported

database. PHP also can interact with supported databases outside a Web environment. Database

use is one of PHP’s best features.[2]

2.5 Previous versions of PHP

You should be aware of some significant changes in previous PHP versions because existing

scripts that work fine on earlier versions may have problems when they’re run on a later version,

and vice versa. The following are some changes you should be aware of:

Version 4.3.1: Fixed a security problem in 4.3.0. It’s not wise to continue to run a Web site

using versions 4.3.0 or earlier.

Version 4.3.0: Included significant improvements to the CLI version of PHP, which is now

built by default when you compile PHP from source code . You must disable its build with

installation options if you don’t want it to be built.

Version 4.2.0: Changed the default setting for register_globals to Off. Scripts running under

previous versions may depend on register_ globals being set to On and may stop running with

the new setting. It’s best to change the coding of the script so that it runs withregister_globals set

to Off.[2]

2.6 History of SQL (A Research Project Conducted by IBM)

The origins of the SQL language date back to a research project conducted by IBM at their

research laboratories in San Jose, California in the early 1970s. The aim of the project was to

develop an experimental

RDBMS which would eventually lead to a marketable product. At that time, there was a lot of

interest in the relational model for databases at the academic level, in conferences and seminars.

IBM, which already had a large share of the commercial database market with hierarchical and

network model DBMSs, realised quite quickly that the relational model would figure

Page 19: Final Report

Accounts Management System

9

prominently in future database products. The project at IBM's San Jose labs was started in 1974

and was named System R. A language called Sequel (for Structured English QUEry Language)

was chosen as the relational database language for System R. In the project, Sequel was

abbreviated to SQL. This is the reason why SQL is still generally pronounced as see-quel.

In the first phase of the System R project, researchers concentrated on developing a basic

version of the RDBMS. The main aim at this stage was to verify that the theories of the relational

model could be translated into a working, commercially viable product. This first phase was

successfully completed by the end of 1975, and resulted in a rudimentary, single-user DBMS

based on the relational model.

The subsequent phases of System R concentrated on further developing the DBMS from the first

phase. Additional features were added, multi-user capability was implemented, and by 1978, a

completed RDBMS was ready for user evaluation. The System R project was finally completed

in 1979. During this time, the SQL language was modified and added to as the needs of the

System R DBMS dictated.

During the development of System R and SQL/DS, other companies were also at work creating

their own relational database management systems. Some of them, Oracle being a prime

example, even implemented SQL as the relational database language for their DBMSs

concurrently with IBM.

Today, the SQL language has gained ANSI (American National Standards Institute) and ISO

(International Standards Organization) certification. A version of SQL is available for almost any

hardware platform from CRAY supercomputers to IBM PC microcomputers. In recent years,

there has been a marked trend for software manufacturers to move away from proprietary

database languages and settle on the SQL standard. The microcomputer platform especially has

seen a proliferation of previously proprietary packages that have implemented SQL functionality.

Even spreadsheet and word processing packages have added options which allow data to be sent

to and retrieved from SQL based databases via a Local Area or a Wide Area network

connection.[3]

Page 20: Final Report

Accounts Management System

10

3.PROBLEM

DEFINITION

Page 21: Final Report

Accounts Management System

11

3.1 Problem Statement

We have various teaching departments(IT,CSE,ECE etc.) in our Institute. Some of the

departments are Non Teaching Departments. All the departments consists more than 500

Employees. Salary Management of all these employees are done manually.

Thus there are a lot of repetitions which can be easily avoided. And hence there is a lot of strain

on the person who manage the salary of all the departments and software’s are not usually used

in this context.This particular project deals with the problems on managing Salary of the

Employees of various departments either it is Teaching or Non Teaching and avoids the

problems which occur when carried manually.

Identification of the drawbacks of the existing system leads to the designing of computerized

system that will be compatible to the existing system with the system which is more user friendly

and more GUI oriented. We can improve the efficiency of the system, thus overcome the

drawbacks of the existing system.

Page 22: Final Report

Accounts Management System

12

4. SDLC - WATERFALL

MODEL

Page 23: Final Report

4.1 Software development Life Cycle (SDLC)

A software life cycle model (also called process model) is a descriptive and diagrammatic

representation of the software life cycle. A life cycle model represents all the activities required

to make a software product transit through its life cycle phases.

which these activities are to be undertaken.

In other words, a life cycle model maps the different activities performed on a software product

from its inception to retirement. Different life cycle models may map the basic de

activities to phases in different ways. Thus, no matter which life cycle model is followed, the

basic activities are included in all life cycle models though the activities may be carried out in

different orders in different life cycle models. Du

may also be carried out. For example, the design phase might consist of the structured analysis

activity followed by the structured design activit

Figure –

4.1.1 The need for a software life cycle model

The development team must identify a suitable life cycle model for the particular project

and then adhere to it. Without using of a particular life cycle model the development of a

software product would not be in a systematic and disciplined manner. When a software product

Accounts Management System

13

Software development Life Cycle (SDLC)

A software life cycle model (also called process model) is a descriptive and diagrammatic

representation of the software life cycle. A life cycle model represents all the activities required

to make a software product transit through its life cycle phases. It also captures the order in

which these activities are to be undertaken.

In other words, a life cycle model maps the different activities performed on a software product

from its inception to retirement. Different life cycle models may map the basic de

activities to phases in different ways. Thus, no matter which life cycle model is followed, the

basic activities are included in all life cycle models though the activities may be carried out in

different orders in different life cycle models. During any life cycle phase, more than one activity

may also be carried out. For example, the design phase might consist of the structured analysis

activity followed by the structured design activity.[1]

4.1 Model Of Software development life cycle

4.1.1 The need for a software life cycle model

The development team must identify a suitable life cycle model for the particular project

and then adhere to it. Without using of a particular life cycle model the development of a

t would not be in a systematic and disciplined manner. When a software product

A software life cycle model (also called process model) is a descriptive and diagrammatic

representation of the software life cycle. A life cycle model represents all the activities required

It also captures the order in

In other words, a life cycle model maps the different activities performed on a software product

from its inception to retirement. Different life cycle models may map the basic development

activities to phases in different ways. Thus, no matter which life cycle model is followed, the

basic activities are included in all life cycle models though the activities may be carried out in

ring any life cycle phase, more than one activity

may also be carried out. For example, the design phase might consist of the structured analysis

cycle

The development team must identify a suitable life cycle model for the particular project

and then adhere to it. Without using of a particular life cycle model the development of a

t would not be in a systematic and disciplined manner. When a software product

Page 24: Final Report

Accounts Management System

14

is being developed by a team there must be a clear understanding among team members about

when and what to do. Otherwise it would lead to chaos and project failure.

This problem can be illustrated by using an example. Suppose a software development

problem is divided into several parts and the parts are assigned to the team members. From then

on, suppose the team members are allowed the freedom to develop the parts assigned to them in

whatever way they like. It is possible that one member might start writing the code for his part,

another might decide to prepare the test documents first, and some other engineer might begin

with the design phase of the parts assigned to him. This would be one of the perfect recipes for

project failure.[1]

4.1.1.1 Different software life cycle models

Many life cycle models have been proposed so far. Each of them has some advantages as

well as some disadvantages. A few important and commonly used life cycle models are as

follows:

• Waterfall Model

• Prototyping Model

• Evolutionary Model

• Spiral Model

4.2 Waterfall model & Phases of the waterfall model

The waterfall model is intuitively the most obvious way to develop software. Though the

waterfall model is elegant and intuitively obvious, it is not a practical model in the sense that it

can not be used in actual software development projects.

Thus, this model can be considered to be a theoretical way of developing software. But all

other life cycle models are essentially derived from the classical waterfall model. So, in order to

be able to appreciate other life cycle models it is necessary to learn the classical waterfall

model.[1]

Page 25: Final Report

Accounts Management System

15

waterfall model divides the life cycle into the following phases as shown in fig.2.1:

• Feasibility Study

• Requirements Analysis and Specification

• Design

• Coding and Unit Testing

• Integration and System Testing

• Maintenance

Figure – 4.2 Waterfall Model

Page 26: Final Report

Accounts Management System

16

4.3 Activities in each phase of the life cycle 4.3.1 Activities undertaken during feasibility study: - The main aim of feasibility study is to determine whether it would be financially and

technically feasible to develop the product.

• At first project managers or team leaders try to have a rough understanding of what is

required to be done by visiting the client side. They study different input data to the

system and output data to be produced by the system. They study what kind of processing

is needed to be done on these data and they look at the various constraints on the

behavior of the system.

• After they have an overall understanding of the problem they investigate the different

solutions that are possible. Then they examine each of the solutions in terms of what kind

of resources required, what would be the cost of development and what would be the

development time for each solution.

• Based on this analysis they pick the best solution and determine whether the solution is

feasible financially and technically. They check whether the customer budget would meet

the cost of the product and whether they have sufficient technical expertise in the area of

development.

4.3.2 Activities undertaken during requirements analysis and

specification: -

The aim of the requirements analysis and specification phase is to understand the exact

requirements of the customer and to document them properly. This phase consists of two distinct

activities, namely

• Requirements gathering and analysis, and

• Requirements specification

4.3.2.1 System Analysis

4.3.2.1.1 Existing System

For the past few years the number of educational institutions are increasing rapidly. Thereby

the number of Employees are also increasing for the students studying in this institution. And

Page 27: Final Report

Accounts Management System

17

hence there is a lot of strain on the person who are managing the Salary and software’s are not

usually used in this context. This particular project deals with the problems on managing Salary

and avoids the problems which occur when carried manually.

Identification of the drawbacks of the existing system leads to the designing of web enabled

system which is more user friendly and more GUI oriented. We can improve the efficiency of the

system, thus overcome the following drawbacks of the existing system.

⋅ More human error

⋅ More strength and strain of manual labour needed

⋅ Repetition of the same procedures

⋅ Low Security

⋅ Data redundancy

⋅ Difficult to handle

⋅ difficult to update data

⋅ record keeping is difficult

⋅ Backup data cannot be easily generate

4.3.3 Activities undertaken during System design: -

4.3.3.1 Input Design

The Administrator can:

1. Add new Employee Details to the Records.

2. Add and Retrieve the details of every month.

3. Control the status of the Salary of Employees.

4. Edit the details of the Employees & modify the Employees records.

A process of converting user originated inputs to a computer-based format. Input design is an

important part of development process since inaccurate input data are the most common cause of

errors in data processing. Erroneous entries can be controlled by input design. It consists of

developing specifications and procedures

for entering data into a system and must be in simple format. The goal of input data design is to

make data entry as easy, logical and free from errors as possible.

Page 28: Final Report

Accounts Management System

18

4.3.3.2 Process Design Process design plays an important role in project development. In order to understand

the working procedure, process design is necessary. Data Flow Diagram and System Flow chart

are the tools used for process design.

System Flow Chart is a graphical representation of the system showing the overall flow

of control in processing at the job level; specifies what activities must be done to convert from a

physical to logical model.

Data Flow Diagram is the logical representation of the data flow of the project.

The DFD is drawn using various symbols. It has a source and a destination. The process

is represented using circles and source and destination are represented using squares. The data

flow is represented using arrows. One reader can easily get the idea about the project through

Data Flow Diagram.

4.3.4.1 SYMBOLS USED IN DATA FLOW DIAGRAM

Page 29: Final Report

Accounts Management System

19

4.3.4.2 Data Flow Diagram

4.3.4.2.1 Employee Module

4.3.4.2.2 Administrator Module

4.3.4 Activities undertaken during Database Design

The data in the system has to be stored and retrieved from database. Designing the database is

partof system design. Data elements and data structures to be stored have been identified at

analysis stage.They are structured and put together to design the data storage and retrieval

system.

Page 30: Final Report

Accounts Management System

20

A database is a collection of interrelated data stored with minimum redundancy to serve

many users quickly and efficiently. The general objective is to make database access easy, quick,

inexpensive and flexible for the user. Relationships are established between the data items and

unnecessary data items are removed. Normalization is done to get an internal consistency of data

and to have minimum redundancy and maximum stability. This ensures minimizing data storage

required, minimizing chances of data inconsistencies and optimizing for updates.

The following are the tables that are involved in the proposed system.

1. Employee account creation

Table – 4.1 Employee account creation

Page 31: Final Report

Accounts Management System

21

2.Administrator Login

Table – 4.1 Administrator Login

4.3.5 Activities undertaken during System testing: -

Integration of different modules is undertaken once they have been coded and unit tested.

During the integration and system testing phase, the modules are integrated in a planned manner.

The different modules making up a software product are almost never integrated in one shot.

Integration is normally carried out incrementally over a number of steps. During each integration

step, the partially integrated system is tested and a set of previously planned modules are added

to it. Finally, when all the modules have been successfully integrated and tested, system testing is

carried out. The goal of system testing is to ensure that the developed system conforms to its

requirements laid out in the SRS document. System testing usually consists of three different

kinds of testing activities:

• α – testing: It is the system testing performed by the development team.

• β – testing: It is the system testing performed by a friendly set of customers.

• acceptance testing: It is the system testing performed by the customer himself after the

product delivery to determine whether to accept or reject the delivered product.

System testing is normally carried out in a planned manner according to the system test plan

document. The system test plan identifies all testing-related activities that must be performed,

specifies the schedule of testing, and allocates resources. It also lists all the test cases and the

expected outputs for each test case.[1]

Page 32: Final Report

Accounts Management System

22

5. REQUIREMENTS

Page 33: Final Report

Accounts Management System

23

Requirements & System Environment

5.1 Hardware Configuration

1. Pentium IV Processor

2. 512 MB RAM

3. 40GB HDD

4. 1024 * 768 Resolution Color Monitor

5.2 Software Configuration

1. Operating System: Any new version of Windows Operating System.

2. Xampp (PHP, MySQL, Apache, and PHPMyAdmin)

3. Browser: Preferably Internet Explorer but shall also work with Chrome

5.2.1 XAMPP

Xampp is a free and open source cross-platform web server solution stack package, consisting

mainly of the Apache HTTP Server, MySql database, and interpreters for scripts written in the

PHP and Perl programming languages.

XAMPP's name is an acronym for:

• X (meaning cross-platform)

• Apache HTTP Server

• MySQL

• PHP

• Perl

Page 34: Final Report

Accounts Management System

24

Installing Configuring & developing with Xampp

5.2.2.1 Obtaining and Installing XAMPP

XAMPP is a free package available for download and use for various web development

tasks. All XAMPP packages and add-ons are distributed through the Apache Friends website at

the address: http://www.apachefriends.org/. Once on the website, navigate and find the Windows

version of XAMPP Lite and download the self-extracting ZIP archive. After downloading the

archive, run and extract its contents into the root path of a hard disk or USB drive. For

example,the extract path for a local Windows installation would simply be C:\.

If extracted properly you will notice a new xampplite directory in the root of your installation

disk. In order to test that everything has been installed correctly, first start the Apache HTTP

Server by navigating to the xampplite directory and run the apache_start.bat batch file.

Next we will test if the server is running correctly by opening an internet browser and typing

http://localhost/ or http://127.0.0.1 into the address bar. If configured correctly, you will be

presented with a screensimilar to that of the one in Figure 5.1.

Figure – 5.1 Installing Xampp for Windows

Page 35: Final Report

Accounts Management System

25

Figure – 5.1 XAMPP splash screen

5.2.2.2 PHP Hello World

In the previous pages we installed and ran the Apache HTTP Server with success. The next step

is to write a simple “Hello World” program in PHP that will test the configuration of PHP under

XAMPP. In a text editor, such as Notepad, write the following lines of code:

Page 36: Final Report

Accounts Management System

26

In order to run and test this PHP program, save it into your xampp\htdocs directory with the file

name of helloWorld.php. Then, to view it in your browser, simply type in

http://localhost/helloWorld.php into the address bar. If done correctly, you will see your Hello

World line of text in the web browser as shown in Figure 5.3.

Figure – 5.3 Resulting output for helloWorld.php.

5.2.2.3 Creating a Database and Table, and Inserting Data

Now that we have run and tested Apache and PHP, the next step is running MySQL and

creating a database and table which will hold information for our address book program. In order

to start MySQL, navigate to the xampp directory and run the mysql_start.bat batch file.

The XAMPP Lite package contains an application called phpMyAdmin which allows

developers to administer and maintain MySQL databases. For the remainder of this article we

will be using phpMyAdmin to create a database and table, and enter test data used in the address

book program. In order to start phpMyAdmin, you must first copy the phpMyAdmin folder from

the xampp directory and place it into the xampplite\htdocs directory. Before testing

phpMyAdmin, make sure that both

Apache and MySQL are running by opening their respective batch files: apache_start.bat and

mysql_start.bat. Along with Apache and MySQL running in the background, type

http://localhost/phpMyAdmin/ into your internet browser. If successful you will be presented

with a phpMyAdmin start page similar to the one in Figure5.4 .

Page 37: Final Report

Accounts Management System

27

Figure – 5.4 phpMyAdmin start page

5.2.2 phpMyAdmin is an open source tool written in PHP intended to handle the

administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of

operations with MySQL.Currently it can create and drop databases, create/drop/alter tables,

delete/edit/add fields, execute any SQL statement, manage

users and permissions, and manage keys on fields. while you still have the ability to directly

execute any SQL statement. phpMyAdmin can manage a whole MySQL server (needs a super-

user) as well as a single database. To accomplish the latter you’ll need a properly set up MySQL

user who can read/write only the desired

database. It’s up to you to look up the appropriate part in the MySQL manual.

phpMyAdmin can:

• browse and drop databases, tables, views, fields and indexes.

• create, copy, drop, rename and alter databases, tables, fields and indexes.

• maintenance server, databases and tables, with proposals on server configuration.

Page 38: Final Report

Accounts Management System

28

• execute, edit and bookmark any SQL-statement, even batch-queries.

• load text files into tables.

• create and read dumps of tables.

• export data to various formats: CSV, XML, PDF, ISO/IEC 26300 - OpenDocument Text

and Spreadsheet, Word, Excel and LATEXT formats.

• administer multiple servers.

• manage MySQL users and privileges.

• check referential integrity in MyISAM tables.

• using Query-by-example (QBE), create complex queries automatically connecting

required tables.

• create PDF graphics of your Database layout.

• search globally in a database or a subset of it.

• transform stored data into any format using a set of predefined functions.

• support InnoDB tables and foreign keys.

• support mysqli, the improved MySQL extension.

Page 39: Final Report

Accounts Management System

29

The first step with phpMyAdmin running is creating a new database. To do this, point to the

textbox labelled Create new database and type addressBook as the name of a new database.

Upon doing so, you will be forwarded to a screen similar to the one in Figure 5.5. Next, insert a

new table in the addressBook database by typing colleague into the table name textbox and

clicking the Go button to proceed with creating the table.

Figure – 5.5 Creating a new table in the addressBook database

Page 40: Final Report

Accounts Management System

30

Following the creation of the colleague table, you will be required to insert the columns that

make up your table. By using TABLE 2 as a reference, insert the necessary columns that will

make up your colleague table for the address book.

Table – 5.1 Table summary for the colleague table

Lastly, with the database and table created, we next need to input some data into the table.

Using the fictional information from the below table input the contact data into your own table.

Table – 5.2 Fictional table data for the colleague table

Page 41: Final Report

Accounts Management System

31

6. PHP, MYSQL, JAVASCRIPT, DBMS

Page 42: Final Report

Accounts Management System

32

PHP, MYSQL, JAVASCRIPT, DBMS

6.1 PHP

PHP is a programming language designed to generate web pages interactively on the

computer serving them, which is called a web server. Unlike HTML, where the web browser

uses tags and markup to generate a page, PHP code runs between the requested page and the web

server, adding to and changing the basic HTML output. PHP makes web development easy

because all the code you need is contained within the PHP framework. This means that there’s

no reason for you to reinvent the wheel each time you sit down to develop a PHP program; it

comes with web functionality built-in.

While PHP is great for web application development, it doesn’t store information by itself.

For that, you need a database. The database of choice for PHP developers is MySQL, which acts

like a filing clerk for PHP-processed user information. MySQL automates the most common

tasks related to storing and retrieving specific user information based on your supplied criteria.

MySQL is easily accessed fromPHP, and they work well together. An added benefit is that PHP

and MySQL run on various computer types and operating systems, including Mac OS X,

Windows-based PCs, and Linux.

PHP does not have complete native support for Unicode or multibyte strings; Unicode

support will be included in PHP 6. Many high profile open source projects ceased to support

PHP 4 in new code as of February 5, 2008, due to the GoPHP5 initiative, provided by a

consortium of PHP developers promoting the

transition from PHP 4 to PHP 5. It runs in both 32-bit and 64-bit environments, but on Windows

the only official distribution is 32-bit, requiring Windows 32-bit compatibility mode to be

enabled while using IIS in a 64-bit Windows environment. There is a third-party distribution

available for 64-bit Windows.[4]

Page 43: Final Report

Accounts Management System

33

6.1.1 Advantages of Using PHP with MySQL

There are several factors that make using PHP and MySQL together a natural choice:

PHP and MySQL work well together PHP and MySQL have been developed with each other in mind, so they are easy to use together.

The programming interfaces between them are logically paired up. Working together wasn’t an

afterthought when the developers created the PHP and MySQL interfaces.

PHP and MySQL have open source power As they are both open source projects, PHP and MySQL can both be used for free. MySQL

client libraries are no longer bundled with PHP. Advanced users have the ability to make

changes to the source code, and therefore change the way the language and programs work.

PHP and MySQL have community support Both tools active communities on the Web in which you can participate, and the participants will

help you answer your questions. You can also purchase professional support for MySQL if you

need it.

PHP and MySQL are fast Their simple and efficient designs enable faster processing.

PHP and MySQL don’t bog you down with unnecessary details You don’t need to know all of the low-level details of how the PHP language interfaces with the

MySQL database, as there is a standard interface for calling MySQL procedures from PHP.[4]

6.1.2 Speed optimization

As with many scripting languages, PHP scripts are normally kept as human-readable source

code, even on production web servers. In this case, PHP scripts will be compiled at runtime by

the PHP engine, which increases their execution time. PHP scripts are able to be compiled before

runtime using PHP compilers as with other programming languages such as C (the language PHP

and its extensions are written in). Code optimizers aim to reduce the computational complexity

of the compiled code by reducing its size and making other changes that can reduce the

execution time with the overall goal of improving performance. The nature of the PHP compiler

is such that there are often opportunities for code optimization, and an example of a code

optimizer is the Zend Optimizer PHP extension. Another approach for reducing overhead for

high load PHP servers is using PHP accelerators. These can offer significant performance gains

by caching the compiled form of a PHP script in shared memory to avoid the overhead of parsing

and compiling the code every time the script runs.[4]

Page 44: Final Report

Accounts Management System

34

6.1.3 Security

The National Vulnerability Database stores all vulnerabities found in computer software. The

overall proportion of PHP-related vulnerabilities on the database amounted to: 12% in 2003,

20% in 2004, 28% in 2005, 43% in 2006, 36% in 2007, and 35% in 2008. Most of these PHP-

related vulnerabilities can be exploited remotely: they allow hackers to steal or destroy data from

data sources linked to the webserver (such as an SQL database), send spam or contribute to DOS

attacks using malware, which itself can be installed on the vulnerable servers.

These vulnerabilities are caused mostly by not following best practice programming rules:

technical security flaws of the language itself or of its core libraries are not frequent.

Recognizing that programmers cannot be trusted, some languages include taint checking to

detect automatically the lack of input validation which induces many issues. However, such a

feature is being developed for PHP Hosting PHP applications on a server requires a careful and

constant attention to deal with these security risks. There are advanced protection patches such as

Suhosin and Hardening-Patch, especially designed for web hosting environments. Installing PHP

as a CGI binary rather than as an Apache module is the preferred method for added security.

With respect to securing the code itself, PHP code can be obfuscated to make it difficult to read

while remaining functional.[4]

6.1.1.1 Syntax

<html> <head> <title>PHP Test </title> </head> <body> <?php echo “<p> Hello World </p>”; ?> </body> </html>

Page 45: Final Report

Accounts Management System

35

PHP only parses code within its delimiters. Anything outside its delimiters is sent directly to

the output and is not parsed by PHP. The most common delimiters are <?php and ?>, which are

open and close delimiters respectively. <script language=”php”> and </script> delimiters are

also available. Short tags can be used to start PHP code, <? or <?= (which is used to echo back a

string or variable) and the tag to end PHP code, ?>. These tags are commonly used, but like

ASP-style tags (<% or <%= and %>), they are less portable as they can be disabled in the PHP

configuration. For this reason, the use of short tags and ASP-style tags is discouraged. The

purpose of these delimiters is to separate PHP code from non-PHP code, including HTML.

Variables are prefixed with a dollar symbol and a type does not need to be specified in

advance. Unlike function and class names, variable names are case sensitive. Both double-quoted

(“”) and heredoc strings allow the ability to embed a variable’s value into the string. PHP treats

newlines as whitespace in the manner of a free-form language (except when inside string

quotes), and statements are terminated by a semicolon. PHP has three types of comment syntax:

/* */ serves as block comments, and // as well as # are used for inline comments. The echo

statement is one of several facilities PHP provides to output text (e.g. to a web browser).

In terms of keywords and language syntax, PHP is similar to most high level languages that

follow the C style syntax. If conditions, for and while loops, and function returns are similar in

syntax to languages such as C, C++, Java and Perl.

6.1.1.1.1 Data Types

PHP stores whole numbers in a platform-dependent range. This range is typically that of 32-

bit signed integers. Unsigned integers are converted to signed values in certain situations; this

behavior is different from other programming languages. Integer variables can be assigned using

decimal (positive and negative), octal, and hexadecimal notations. Floating point numbers are

also stored in a platform-specific range. They can be specified using floating point notation, or

two forms of scientific notation. PHP has a native Boolean type that is similar to the native

Boolean types in Java and C++. Using the Boolean type conversion rules, non-zero values are

interpreted as true and zero as false, as in Perl and C++. The null data type represents a variable

that has no value.

The only value in the null data type is NULL. Variables of the “resource” type represent

references to resources from external sources. These are typically created by functions from a

Page 46: Final Report

Accounts Management System

36

particular extension, and can only be processed by functions from the same extension; examples

include file, image, and database resources.

Arrays can contain elements of any type that PHP can handle, including resources, objects, and

even other arrays. Order is preserved in lists of values and in hashes with both keys and values,

and the two can be intermingled. PHP also supports strings, which can be used with single

quotes, double quotes, or heredoc syntax. The Standard PHP Library (SPL) attempts to solve

standard problems and implements efficient data access interfaces and classes.[4]

6.1.1.1.2 Functions

PHP has hundreds of base functions and thousands more from extensions. These functions

are well documented on the PHP site, but unfortunately, the built-in library has a wide variety of

naming conventions and inconsistencies. PHP currently has no functions for thread

programming.

6.1.1.1.3 Resources

PHP includes free and open source libraries with the core build. PHP is a fundamentally

Internetaware system with modules built in for accessing FTP servers, many database servers,

embedded SQL libraries such as embedded PostgreSQL, MySQL and SQLite, LDAP servers,

and others. Many functions familiar to C programmers such as those in the stdio family are

available in the standard PHP build. PHP has traditionally used features such as

“magic_quotes_gpc” and “magic_quotes_runtime” which attempt to escape apostrophes (‘) and

quotes (“) in strings in the assumption that they will be used in databases, to prevent SQL

injection attacks.

This leads to confusion over which data is escaped and which is not, and to problems when data

is not in fact used as input to a database and when the escaping used is not completely correct.

To make code portable between servers which do and do not use magic quotes, developers can

preface their code with a script to reverse the effect of magic quotes when it is applied.

PHP allows developers to write extensions in C to add functionality to the PHP language.

These can then be compiled into PHP or loaded dynamically at runtime. Extensions have been

written to add support for the Windows API, process management on Unix-like operating

systems, multibyte strings (Unicode), cURL,

and several popular compression formats. Some more unusual features include integration with

Internet Relay Chat, dynamic generation of images and Adobe Flash content, and even speech

Page 47: Final Report

Accounts Management System

37

synthesis. The PHP Extension Community Library (PECL) project is a repository for extensions

to the PHP language. Zend provides a certification exam for programmers to become certified

PHP developers.[4]

6.2 MYSQL

MySQL is a multithreaded,multi-user SQL database management system(DBMS). The basic

program runs as a server providing multi-user access to a number of databases.Originally

financed in a similar fashion to the JBoss model, MySQL was owned and sponsored by a single

for-profit firm, the Swedish company MySQLAB now a subsidiary of Sun Microsystem , which

holds the copyright to most of the codebase. The project’s source code is available under terms

of the GNU General Public Licence, as well as under a variety

of proprietory agreements.

MySQL is a database.The data in MySQL is stored in database objects called tables. A table

is a collections of related data entries and it consists of columns and rows. Databases are useful

when storing information categorically. A company may have a database with the following

tables: “Employees”, “Products”,

“Customers” and “Orders”.[5]

6.2.1 Database Tables

A database most often contains one or more tables. Each table is identified by a name (e.g.

“Customers” or “Orders”). Tables contain records (rows) with data.

6.2.1.1 Queries

A query is a question or a request.With MySQL, we can query a database for specific

information and have a recordset returned.

6.2.1.2Create a connection to a database

Before you can access data in a database, you must create a connection to the database.In

PHP, this is done with the mysql_connect() function.[6]

Syntax

Page 48: Final Report

Accounts Management System

38

Example

In the following example we store the connection in a variable ($con) for later use in the

script. The “die” part will be executed if the connection fails:

6.2.1.3 Closing a Connection

The connection will be closed automatically when the script ends. To close the connection

before, use the mysql_close() function:

Page 49: Final Report

Accounts Management System

39

6.2.1.1.1 Create a Database

The CREATE DATABASE statement is used to create a database in MySQL.

Syntax

CREATE DATABASE database_name

To get PHP to execute the statement above we must use the mysql_query() function.

This function is used to send a query or command to a MySQL connection.

6.2.1.1.2 Create a Table

The CREATE TABLE statement is used to create a table in MySQL.

Syntax

CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, column_name3 data_type, .... )

6.2.2 MySQL Functions

mysql_affected_rows - Get number of affected rows in previous MySQL operation

mysql_change_user - Change logged in user of the active connection

mysql_client_encoding - Returns the name of the character set

mysql_close - Close MySQL connection

mysql_connect - Open a connection to a MySQL Server

mysql_create_db - Create a MySQL database

mysql_data_seek - Move internal result pointer

mysql_db_name - Get result data

mysql_db_query - Send a MySQL query

mysql_drop_db - Drop (delete) a MySQL database

mysql_errno - Returns the numerical value of the error message from previous MySQL operation

mysql_error - Returns the text of the error message from previous MySQL operation

mysql_escape_string - Escapes a string for use in a mysql_query

mysql_fetch_array - Fetch a result row as an associative array, a numeric array, or both

mysql_fetch_assoc - Fetch a result row as an associative array

Page 50: Final Report

Accounts Management System

40

mysql_fetch_field - Get column information from a result and return as an object

mysql_fetch_lengths - Get the length of each output in a result

mysql_fetch_object - Fetch a result row as an object

wsmysql_num_rows — Get number of rows in result

mysql_pconnect — Open a persistent connection to a MySQL server

mysql_ping — Ping a server connection or reconnect if there is no connection

mysql_query — Send a MySQL query

mysql_result — Get result data

mysql_select_db — Select a MySQL database

mysql_set_charset — Sets the client character set

mysql_stat — Get current system status

mysql_tablename — Get table name of field

mysql_thread_id — Return the current thread ID

mysql_unbuffered_query — Send an SQL query to MySQL, without fetching and buffering the

result[4]

6.2.3 Request and Response working

Figure - 6.1 Working of PHP interpreter, MySQL, and the web server

Page 51: Final Report

Accounts Management System

41

6.2.4 Apache Web Server

Often referred to as simply Apache, a public-domain open source Web server developed by a

looselyknit group of programmers. The first version of Apache, based on the NCSA httpd Web

server, was developed in 1995.

Core development of the Apache Web server is performed by a group of about 20 volunteer

programmers, called the Apache Group. However, because the source code is freely available,

anyone can adapt the server for specific needs, and there is a large public library of Apache add-

ons. In many respects, development of Apache is similar to development of the Linux operating

system.

The original version of Apache was written for UNIX, but there are now versions that run

under OS/2, Windows and other platforms. The name is a tribute to the Native American Apache

Indian tribe, a tribe well known for its endurance and skill in warfare. A common

misunderstanding is that it was called Apache because it was developed from existing NCSA

code plus various patches, hence the name a patchy server, or Apache server.

Apache consistently rates as the world’s most popular Web server according to analyst

surveys. Apache has attracted so much interest because it is full-featured, reliable, and free.

Originally developed for UNIX operating systems, Apache has been updated to run on Windows,

OS/2, and other platforms. One aspect of Apache that some site administrators find confusing —

especially those unfamiliar with UNIX-style software — is its configuration scheme. Instead of

using a point-and-click graphic user interface (GUI) or Windows Registry keys as most other

modern software packages, Apache generally relies on simple text filesfor its configuration

settings.[4]

6.3 JavaScript

JavaScript is a scripting language you can use in conjunction with HTML to create

interactive Web pages. A scripting language is a programming language that’s designed to give

folks easy access to prebuilt components. In the case of JavaScript, those prebuilt components

are the building blocks that make up a Web page (links, images, plug-ins, HTML form elements,

browser configuration

details, and so on).[7]

Page 52: Final Report

Accounts Management System

42

6.3.1 JavaScript is Case Sensitive

A function named "myfunction" is not the same as "myFunction" and a variable named

"myVar" is not the same as "myvar".JavaScript is case sensitive - therefore watch your

capitalization closely when you create or call variables, objects and functions.

6.3.1.1 White Space

JavaScript ignores extra spaces. You can add white space to your script to make it more readable.

The following lines are equivalent:

6.3.1.2 Break up a Code Line

You can break up a code line within a text string with a backslash. The example below

will be displayed properly:

6.3.2 JavaScript and HTML

HTML tags create objects; JavaScript lets you manipulate those objects. For example, you

use the HTML <BODY> and </BODY> tags to create a Web page, or document. As shown

below after that document is created, you can interact with it by using JavaScript. For example,

you can use a special JavaScript construct called the onLoad event handler to trigger an action —

play a little welcoming tune, perhaps — when the document is loaded onto a Web browser.[7]

Page 53: Final Report

Accounts Management System

43

Table – 6.1 Creating and Working with objects

6.3.2.1 Syntax

Two choices when it comes to embedding JavaScript code in an HTML file:

You can use the <SCRIPT> and </SCRIPT> tags to include JavaScript code directly into an

HTML file.

In the example below, a JavaScript function called processOrder() is defined at the top of the

HTML file. Further down in the HTML file, the JavaScript function is associated with an event

handler — specifically, the processOrder button’s onClick event handler. (In other words, the

JavaScript code contained in the processOrder() function runs when a user clicks the

processOrder button.)

Page 54: Final Report

Accounts Management System

44

You can use the <SCRIPT> and </SCRIPT> tags to include a separate, external JavaScript file (a

file containing only JavaScript statements and bearing a .js extension) into an HTML file.

6.3.3 JavaScript Functions

escape( ) - Returns the hexadecimal encoding of an argument in the ISO-Latin-1 character set.

The escape() function and it’s reverse function, unescape(), are typically used to send special

characters safely from a JavaScript script to another program.[7]

eval( ) -

Page 55: Final Report

Accounts Management System

45

isFinite( ) -

isNan( ) -

Number ( ) -

parseFloat ( ) -

Page 56: Final Report

Accounts Management System

46

parseInt ( ) -

String( ) -

taint( ) -

Page 57: Final Report

Accounts Management System

47

unescape ( ) -

6.4 Database Management System

What is a database? In very general terms, a database is a collection of related data. The word

related implies that the collection of letters on this page do not by themselves constitute a

database. But if we think of them as a collection of letters arranged to form words, then they can

be conceptualised as data in a database.

Using similar reasoning, we can aslo say that a tome such as a telephone directory is also a

database. It is a database first, because it is a collection of letters that form words and second,

because it is an alphabetical listing of people's names, their addresses and telephone numbers. A

database depends on what use we want to make of the information that it contains.

In this electronic age, the word databases has become synonymous with the term "computer

database" Collins English Dictionary describes a database as " A store of a large amount of

information, esp. in a form that can be handled by a computer.[1]

A database (computerised database remember) by itself, is not much use. The data is stored

electronically on the computer's disk in a format which we humans cannot read or understand

directly. What we need is some way of accessing this data and converting it into a form which

we do understand. This is job of the database management system or DBMS for short. A DBMS

is essentially a suite o programs that act as the interface between the human operator and the data

held in the database. using the DBMS, it is possible to retreive useful information, update or

delete obsolete information and add new information to the database. As well as data entry and

retrieval, the DBMS plays an important role in maintaining the overall integrity of the data in the

database. The simplest example of is ensuring that the values entered into the database conform

to the data types that are specified. For example, in the the telephoene book database, the DBMS

Page 58: Final Report

Accounts Management System

48

might have to ensure that each phone number entered confirms to a set format of XXX-

XXXXXXX where X represents an integer.[1]

Table - 6.2 A table in a database

Page 59: Final Report

Accounts Management System

49

7. SNAPSHOTS

Page 60: Final Report

Accounts Management System

50

Figure – 7.1 Account management system of NIT Srinagar

Figure – 7.1 Administrator Login

Page 61: Final Report

Accounts Management System

51

Figure – 7.3 Settings for Future Use

Figure – 7.4 Updating an Employee

Page 62: Final Report

Accounts Management System

52

Figure – 7.5 Salary through bank of month/year 04/2011

Figure – 7.6 Employee salary info of an employee of a particular month

Page 63: Final Report

Accounts Management System

53

Figure – 7.7 Abstract Salary bill of Teaching staff

Page 64: Final Report

Accounts Management System

54

8. IMPLEMENTATION

Page 65: Final Report

Accounts Management System

55

8.1 IMPLEMENTATION

Implementation is the stage in the project where the theoretical design is turned into a

working system and is giving confidence on the new system for the users that it will work

efficiently and effectively. It involves careful planning, investigation of the current system and

its constraints on implementation, design of methods to achieve the change over, an evaluation of

change over methods. Apart from planning major task of preparing the implementation are

education and training of users. The implementation process begins with preparing a plan for the

implementation of the system. According to this plan, the activities are to be carried out,

discussions made regarding the equipment and resources and the additional equipment has to be

acquired to implement the new system. In network backup system no additional resources are

needed.

Implementation is the final and the most important phase. The most critical stage in

achieving a successful new system is giving the users confidence that the new system will work

and be effective. The system can be implemented only after thorough testing is done and if it is

found to be working according to the specification. This method also offers the greatest security

since the old system can take over if the errors are found or inability to handle certain type of

transactions while using the new system.

8.1.1 User Training

After the system is implemented successfully, training of the user is one of the most

important subtasks of the developer. For this purpose user manuals are prepared and handled

over to the user to operate the developed system. Thus the users are trained to operate the

developed system. Both the hardware and software securities are made to run the developed

systems successfully in future. In order to put new application system into use, the following

activities were taken care of:

⋅ Preparation of user and system documentation

⋅ Conducting user training with demo and hands on

⋅ Test run for some period to ensure smooth switching over the system

User manuals describing the procedures for using the functions listed on menu are circulated to

all the users. It is confirmed that the system is implemented up to users need and expectations.

Page 66: Final Report

Accounts Management System

56

8.1.2 Security and Maintenance

Maintenance involves the software industry captive, typing up system resources .It means

restoring something to its original condition. Maintenance follows conversion to the extend that

changes are necessary to maintain satisfactory operations relative to changes in the user’s

environment. Maintenance often includes minor enhancements or corrections to problems that

surface in the system’s operation. Maintenance is also done based on fixing the problems

reported, changing the interface with other software or hardware enhancing

the software.

Any system developed should be secured and protected against possible hazards. Security

measures are provided to prevent unauthorized access of the database at various levels. An

uninterrupted power supply should be so that the power failure or voltage fluctuations will not

erase the data in the files.

Password protection and simple procedures to prevent the unauthorized access are provided

to the users .The system allows the user to enter the system only through proper user name and

password.

Page 67: Final Report

Accounts Management System

57

9. CONCLUSION

Page 68: Final Report

Accounts Management System

58

9.1 CONCLUSION

To conclude the description about the project : The project, developed using PHP and

MySQL is based on the requirement specification of the user and the analysis of the existing

system, with flexibility for future enhancement.

The expanded functionality of today’s software requires an appropriate approach towards

software development. This accounts management software is designed for people who want to

manage various activities in account section. For the past few years the number of educational

institutions are increasing rapidly.

Thereby the number of employees are also increasing in the institution. And hence there is a lot

of strain on the person who are running accounts section. This particular project deals with the

problems on managing the accounts and avoids the problems which occur when carried

manually.

Identification of the drawbacks of the existing system leads to the designing of web enabled

system that will be compatible to the existing system with the system which is more user friendly

and more GUI oriented.

Page 69: Final Report

Accounts Management System

59

REFERENCES

Page 70: Final Report

Accounts Management System

60

References

[1] Dr. P Sreenivasa Kumar CSE Deptt. IIT Madras, “Database Systems”,

www.neptel.co.in.

[2] “Beginning PHP, Apache, MySQL® Web Development” by Michael

Glass,Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer,Jeremy Stolz,

Jason Gerner, “Wiley Publishing,inc”.

[3] “SQL - A Practical Introduction” by Akeel Din

[4] “PHP 5 for Dummies” by Janet Valade “Wiley Publishing,inc”.

[5] “Learning PHP and MySQL” by Michele E. Davis and Jon A. Phillips

“OReilly”.

[6] www.w3schools.com

[7] “Learning JAVASCRIPT for Dummies” by Janet Valade “Wiley

Publishing,inc”.

[8] www.hotscripts.com/category/php/

[9] www.apache.org

[10] en.wikipedia.org/wiki/Database_management_system