Está en la página 1de 46

1. Introduction: 1.

1 About The Visakhapatnam Port Trust :


Visakhapatnam was an ancient Port city which had trade relations with the Middle East and Rome. Ships were anchored at open roads and were loaded with cargo transported from Visakhapatnam shore by means of small Masula boats. A reference to Vizagapatam merchant is available in the inscriptions of Sri Bheemeswara Swamy temple (1068 AD), East Godavari District, Andhra Pradesh. During 12th century AD, Vizagapatam was a fortified merchandize town managed by a guild. It has become a settlement of a branch of East India Company in 1682. Rs. 83 lakh worth of goods were moved through Vizagapatam / Bhimunipatnam in 188283. Principal commodities traded at anchorage Port included Muslin cloth manufactured at Uppada (East Godavari District), Manganese ore exports to UK and USA, Oilseeds, jaggery, jute and indigo, hides and skins. Extensive trade relations existed with Burma. Vessels of British India Steam Navigation Company regularly visited the Port. With the advent of British Rule, in 1858, the need for a port in this part of the country was emphasized in a report of a British Survey Party. Later in 1877 a report called Vizag the Port of Central Provinces further emphasized the need for construction of a Port at Visakhapatnam. It was only after the I World War (1914-18) that the proposal of Col.H.Cartwright Reid of British Admiralty for construction of a harbour at Visakhapatnam at the mouth of river Meghadrigedda was approved by the Government.

The harbour was constructed by dredging 281.8 million cu.ft. of land and soft material. It consisted of outer channel, inner channel, island breakwater, sand trap, turning basin, quay wall of 1600 ft (3 berths), two transit sheds, three storage sheds, open storage area, four electric quay cranes, three NG Locos, one weigh bridge, railway track, 15 sq. miles of acquired land and other facilities like, graving dock, dredgers, tugs, lighters, power house, work shop, roads, drains, water supply, buildings etc. The Port was constructed at a cost of Rs.378 lakhs. The Port was opened to ocean traffic with the arrival of a passenger vessel S.S.JALADURGA of the Scindia Steam Navigation Co., on the 7th October, 1933. The Port was formally inaugurated by His Excellency Lord Willingdon, the then Viceroy and Governor General of India on 19th December 1933. In the first year of operation, the Port handled a traffic of 1.3 lakh tonnes. The exports were 1.2 lakh tonnes and imports 0.1 lakh tonnes. The principal exports were manganese ore and groundnuts. The imports consisted of rice, flour, tiles and other consumer goods. The cargo was transported through bullock carts. During the years of II World War (1939-42) the Port assumed military importance. After the war and country s independence, the planned development of the Port started with the commencement of Five Year Plans of the country. Substantial investments were made in the successive Five Year Plans for developing the infrastructure in the Port.

1.2 About The Web Based Telephone Directory:


The WEB BASED TELEPHONE DIRECTORY was proposed to maintain the details of the employees phone numbers working in PORT. The system consists of an administrator who is in charge of accessing the database of the employees and was responsible for the maintenance of the database. The system consists of modules which provide an easy and user-friendly interface for the administrator and ensure to provide security to the database.

The system is developed to maintain records of the employees who are interested in Blood donation and register themse lves in the Data Base. It contains modules for entering the records into the database and retrieving them using searching module based on different queries selected by Administrator.

The system is developed so that it is easy to maintain and requires minimum investment in maintaining it. Also an individual with minimum knowledge on computer would find it easy to work with the system. The system is designed in such a way that it provides scope for future development.

Front End Language: HTML :


HTML, which stands for Hypertext Markup Language, is the predominant markup language for web pages. HTML is the basic building-blocks of WebPages.

HTML is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>), within the web page content. HTML tags normally come in pairs like <h 1> and </h1>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tables, images, etc.

The purpose of a web browser is to read HTML documents and compose them into visual or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page.

HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML WebPages.

Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both the HTML and the CSS standards, encourages the use of CSS over explicitly presentational HTML markup.

PHP :
PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages.

For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications.

PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating system and platform free of charge. A competitor to Microsoft's Active Server Pages (ASP) serverside script engine and similar languages, PHP is installed on more than 20 million websites and 1 million web servers.

PHP was originally created by Rasmus Lerdorf in 1995. The main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. PHP is free software released under the PHP License which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP.

While PHP originally stood for "Personal Home Page", it is now said to stand for "PHP: Hypertext Preprocessor", a recursive acronym.

Back End Language: Oracle: DATABASE CONCEPTS:


A Database is a collection of data that managed by Database Management Systems (DBMS).Many corporations use one of the several commercially available DBMS such as oracle,DB2,Sybase& Microsoft access which is used for small data collections.

DATA:
Data refers to an atomic unit that is stored in the DBMS and is sometimes resembled into information. Examples of data are a person's street address, city, state, ZIP code. Each of these is an atomic unit that is commonly found in DBMS.

DATABASE:
A Database is a collection of data. A DBMS provides an industrial strength solution to data management and uses proprietary and public domain algorithms to assure fast and secure interaction wi th data

stored in the database.

SOFTWARE REQUIREMENT SPECIFICATIONS

2.1 Introduction:

2.1.1 Purpose:
To develop a software system that provides easy maintenance of database of various employee s working in port. Maintaining large database of employee s records is a tedious process if maintained in files. In Cyber Age, most of the databases are maintained in computers.

2.1.2 Problem Definition :


In the WEB BASED TELEPHONE DIRECTORY details of numerous employees along with mobile numbers are stored and maintained year wise. So it is a difficult process to maintain them manually and select the employee for the program. Though maintaining the records

electronically solves the problem but maintaining employee records of all years and passout s, retrieving and appending the records poses a difficult problem for the administrator.

Some of the problems faced by the administrator are

 Preparing the list of employees working in port.  Selection and arrangement of the employee s details in the
specific order as specified by the user.

Hence there is a need of developing an efficient system, which enables the user to store large collections of data, and also accessing them efficiently whenever required.

The proposed system should be developed such that it provides easy maintenance of database with a user friendly interface and handle errors. Also care must be taken to provide security for the data being stored in the database.

2.1.3 Scope:
This can be used by any common man with minimum knowledge about computer with little or no modification in the code. The administrator can view and add the information regarding the employee records.

2.1.4 Developers Responsibilities:


 Develop the system  Installing software on the client s hardware  Conducting user training  Maintaining the system

2.2 General Description:

2.2.1 Product Perspective:


The information regarding WEB BASED TELEPHONE DIRECTORY of PORT TRUST i.e., about the employee appearing is maintained in three modules.

2.2.2 Product Function:


As the product contains only one module, the function of that module is described below:

OPERATIONS FOR ENTERPRENUER :


1. Adding new employee records. 2. Viewing existing employees records.

2.3.1 Design Requirements:

a) Software Requirements:

Operating System : WINDOWS Operating System(XP or higher versions) Database Support : Oracle 8i or higher versions Language used : HTML(Hyper Text Markup Language) and PHP

b) Hardware Requirements:
Processor RAM Hard Disk CD ROM Key board Display : Pentium III or above : 512 MB or above : 2 GB or above : 32 X or above : 101 Keys Keyboard : VGA Monitor

2.3.3 Feasibility Study:


It is necessary and prudent to evaluate the feasibility of a project at the earliest possible time. There may be different ways of checking whether a system is feasible or not. Feasibility study can be divided into three basic forms as follows.

Operational feasibility:
In this test, the operational scope of the system is checked. The system under consideration should have enough operational research. It is observed that proposed system is very user friendly

and since the system is built with enough help, even persons with little knowledge of windows can find the system very easy.

10

Technical feasibility:
This test includes a study of function, performance and constraints that may affect the ability to achieve an acceptable system. This test begins with an assessment of the technical viability of the proposed system. One of the main factors to be accessed is the need of various kinds of resources for the successful implementation of the proposed system. The system is developed with the software which is in wide distribution and the system is acceptable anywhere and runs on any computer with the required resources installed in it.

Economical feasibility:
An evaluation of development cost weighed against the ultimate income of benefit from the development of the proposed system is made. Care must be taken regarding the development process of the proposed system. This system is economically feasible as it is easy to maintain and requires absolutely zero investment in maintaining, as it works in a computer with minimum hardware requirements and the required software installed. the costs that incur in

11

3. Software Development Environment 3.1 Front End Languages: 3.1.1 HTML :


HTML, which stands for HyperText Markup Language, is the predominant markup language for web pages. HTML is the basic building-blocks of webpages. HTML is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>), within the web page content. HTML tags normally come in pairs like <h1> and </h1>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tables, images, etc.

The purpose of a web browser is to read HTML documents and compose them into visual or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page. HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML WebPages. Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both the HTML and the CSS standards, encourages the use of CSS over explicitly presentational HTML markup.

12

3.1.2 PHP :
PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages.

For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications.

PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating system and platform free of charge. A competitor to Microsoft's Active Server Pages (ASP) serverside script engine and similar languages, PHP is installed on more than 20 million websites and 1 million web servers.

PHP was originally created by Rasmus Lerdorf in 1995. The main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. PHP is free software released under the PHP License which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP.

While PHP originally stood for "Personal Home Page", it is now said to stand for "PHP: Hypertext Preprocessor", a recursive acronym

13

3.2 Back End Language: 3.2.1 Oracle:

DATABASE CONCEPTS:
A Database is a collection of data that managed by Database Management Systems (DBMS).Many corporations use one of the several commercially available DBMS such as oracle,DB2,Sybase& Microsoft access which is used for small data collections.

DATA:
Data refers to an atomic unit that is stored in the DBMS and is sometimes resembled into information. Examples of data are a person's street address, city, state, ZIP code. Each of these is an atomic unit that is commonly found in DBMS.

DATABASE:
A Database is a collection of data. A DBMS provides an industrial strength solution to data management and uses proprietary and public domain algorithms to assure fast and secure interaction with data

stored in the database. There are many different database systems. A Database model is a description of how the data is organized in a database. In a relational database model, database is grouped into tables using a technique called normalization. Tables are grouped into a database.

14

Once the database and at least one table is created a .NET component can send SQL statements to the DBMS to

Save Data Retrieve Data Update Data Manipulate Data Delete Data

Over the years, there have been many definitions of database. For our purposes, a database is an organized collection of data serving a central purpose. It is organized in the sense that it contains data that is stored, formatted, accessed, and represented in a consistent manner. It serves a central purpose in that it does not contain extraneous or superfluous data. A phone book is a good example of a database. It contains relevant data (that is, names) that allow access to phone numbers. It does not contain irrelevant data, such as the color of a person's phone. It stores only what is relevant to its purpose. Most often, a database's purpose is business, but it may store scientific, military, or other data not normally thought of as business data. Hence, there are business databases, scientific databases, military databases, and the list goes on and on. In addition, data can not only be categorized as to its business, but also its format. Modern databases contain many types of data other than text and numeric. For example, it is now commonplace to find databases storing pictures, graphs, audio, video, or compound documents, which include two or more of these types.

15

When discussing databases, and database design in particular, it is commonplace to refer to the central purpose a database serves as its business, regardless of its more specific field, such as aerospace, biomedical, or whatever. Furthermore, in real life a database is often found to be very, very specific to its business. In earlier days, programmers who wrote code to serve Automatic Data Processing (ADP) requirements found they frequently needed to store data from run to run. This became known as the need for persistent storage; that is, the need for data to persist, or be saved, from one run of a program to the next. This fundamental need began the evolution of databases as we know them. A secondary need, simple data storage, also helped give rise to databases. Online archiving and historical data is a couple of specific examples. Although files, directories, and file systems could provide most general data storage needs, including indexing variations, databases could do what file systems did and more. Modern databases typically serve some processing storage need for departments or smaller organizational units of their parent organization or enterprise. Hence, we use the terms enterprise-wide database, referring to the scope of the whole organization's business; the department-wide database, referring to the level of a department; and the workgroup database, usually referring to some programming or business unit within a department. Most often, databases are found at the department-wide and workgroup levels. Occasionally one finds databases that serve enterprise-wide needs, such as payroll and personnel databases, but these are far outnumbered by their smaller brethren. In fact, when several
16

departmental databases are brought together, or integrated, into one large database, this is the essence of building a data warehouse (DW). The smaller databases, which act as the data sources for the larger database, are known as operational databases. However, this is nothing new. An operational database is just one that produces data, which we have known for years as a production database. Only in the context of building a DW do you find production databases also referred to a s operational databases, or sometimes operational data stores. With the advent of Internet technology, databases and data warehouses now frequently serve as back ends for Web browser front ends.

Understanding a DBMS
A Database Management System (DBMS) is the software that manages a database. It acts as a repository for all the data and is responsible for its storage, security, integrity, concurrency, recovery, and access. The DBMS has a data dictionary, sometimes referred to as the system catalog, which stores data about everything it holds, such as names, structures, locations, and types. This data is also referred to as metadata, meaning data about data. The lifespan of a piece of data, from its creation to its deletion, is recorded in the data dictionary, as is all logical and physical information about that piece of data. A Database Administrator (DBA) should become intimate with the data dictionary of the DBMS, which serves him or her over the life of the database.

17

Securing Data :
Security is always a concern in a production database, and often in a development or test database too. It is usually not a question of whether or not to have any security, but rather how much to have. A DBMS typically offers several layers of security, in addition to the operating system (OS) and network security facilities. Most often, a DBMS holds user accounts with passwords requiring the user to login, or be authenticated, in order to access the database. DBMSs also offer other mechanisms, such as groups, roles, privileges, and profiles, which all offer a further refinement of security. These security levels not only provide for enforcement, but also for the establishment of business security policies. For example, only an authenticated user who belongs to an aviation group may access the aviation data. Or, only an authenticated user who has the role of operator may back up the database.

18

4.DESIGN SPECIFICATIONS :

4.1 Data Flow Diagrams:


Data flow diagram is a structure analysis tool that is used for graphical representation of Data processes through any organization. The data flow approach emphasis on the logic underlying the system, by using combination of only 4 symbols. It follows a top down app roach. A full description of a system actually consists of set of DFD s, which comprises of various levels. And initial over view model is exploded lower level diagrams that show additional feature of the system. Further each process can be broken down into a more detailed DFD. This occurs repeatedly until sufficient details are described.

DFD symbols Square

It defines a source (originator) or destination of system data. Arrow

It indicates data flow-data in motion. It is a pipeline through which information flows.

19

Circl or Bubbl

It re rese ts a process that trans orms incoming data flow(s into

Op n Rectan le

It is a data store-data at rest, or a temporary repository of data.

hey are e plained by

y GANE and SARS N method y DEMACRO YORDAN method




outgoing

data flow(s

20

DATA F OW

DATA STRUCTURE

EXTERNAL ENTITY OR DATA LINK

PROCESS

DATA BASE

GANE AN

SARSON NOTATION

21

DE ACRO YORDAN NOTATION

DATA FLOW

DATA STRUCTURE

EXTERNAL ENTITY OR DATA LINK

PROCESS

DATA BASE

22

4.2 Database Design and E-R Diagrams:


Normalization: Normalization theory is most important concept of RDBMS. It is basically a formalization of simple ideas. It has practical applications in the area of database design. The primary goal of normalization is focusing on time dependent properties and to remove redundant information. When there is more than one file in a data system, the problem of organizing the data becomes much more complex. It is helpful to have data model of how the data is organized into files and how these files are related to one another. The model includes a list of the fields in each record type, the keys used to access the records and how the records in one file are related to records in other file of records files. Normalization is the systematic, reversible transformation of data model to remove logic structures, which the non-key data item are functionally dependent on their keys. Normalization is done in series of steps, each of which leaves the model in a specific normal form. Each normal form includes all the constraints of the previous normal forms, there are several levels if normal form, Boyce-Coded Normal form, Fourth Normal form and Fifth Normal form. First Normal Form: First Normal Form is achieved when a record is designed to be fixed length. This is accomplished by removing the repeated group and creating a separate file or relation containing the repeated group. The original new records are interrelated by a common data item.

23

A relation R is the First Normal Form iff all the underlying domains contain atomic values. To go from First Normal Form to Second Normal Form, the analyst must remove any partially dependent attributes from their first normal form entity and create a new Entity. After that, copy that part of the identifier of the original entity (on which the removed attributes are dependent) into the new entity. Second Normal Form: Second Normal Form is achieved when record is in the 1NF and each item in the record is fully dependent on the primary record key for identification data item is fully dependent if its values are uniquely associated with a specific data items. To achieve 2NF, every data item in the record that is not dependent on the primary key of the record should be removed and used to form a separate relation. A relation R is in the 2NF iff it is in the 1NF and every non key attribute is fully dependent on primary key. To go from 2NF to 3NF, the analyst must remove all independent attributes and put them in an entity of their own. Note that this new entity will now need a unique identifier and is subjected to previous steps. Third Normal Form: Third normal form is achieved when transitive dependencies are removed from a record. Third Normal form removes the transitive dependencies by splitting the relation into separate relations. A relation R is in 3NF iff it is in 2NF and no non -key attribute is functionally dependent on another non-key attribute.3NF is often reached in practice by inspection in a single step. This level of normalization is widely accepted as the initial target for a design which eliminates redundancy. Entity-Relationship Model
24

In computer science, an entity-relationship model (ERM) is a model providing a high-level description of a conceptual data model. Data modeling provides a graphical notation for representing such data models in the form of entity-relationship diagrams (ERD). An entity represents a discrete object. Entities can be thought of (roughly) as nouns. A relationship captures how two or more entities are related to one another. Relationships can be thought of (again, roughly) as verbs. Entities and relationships can both have attributes. Every entity (unless it is a weak entity) must have a minimal set of uniquely identifying attributes. This set is called the entity's primary key. Entity relationship diagrams don't show single entities or single instances of relations.

4.3 Database Table Design

FIELD Employee Name Designation Department Section Mobile no.

TYPE varchar(30 varchar(30) varchar(40) varchar(10) integer(20)

25

This Table consists of 5 Fields each with different types and different type and length restrictions.

The sample table in Data Base resembles like the following:

empname G.Rajesh R.Ramchandra Raju M.Rama Raju

Department Administrative services Administrative services Engg services

Designation chairperson Chief oficer engineer employee Chief officer employee employee

Mobile

Section

9951997072 Sr section 7799456999 economic 9948591515 7799141262 9247446025 9866114013 9705401022 Motor vehicle Medical Mechanical Accounts Repairs

T.Harish Health care S.Venkat Reddy Dock labour board T.Bala Pavan Health care R.Saroja Engg services

26

5. Unified Modeling Language


5.1 Introduction:

In the field of software engineering, the Unified Modeling Language (UML) is a standardized specification language for object modeling. UML is a general purpose modeling language that includes a graphical notation used to create an abstract model of a system, referred to as an UMLmodel. UML was designed to specify, visualize, construct, and document software-intensive systems. By establishing

an industry consensus on a graphic notation to represent common concepts like classes, components, generalization, aggregation, and behaviors, UML has allowed software developers to concentrate more on design and architecture. Rumbaugh joined Booch at Rational Software Corporation in 1994. Jacobson joined Rational in 1995, after his company, Objectory, was acquired by Rational. In 1996, work on the UML was begun. UML Partners was organized in 1996 to complete the Unified Modeling Language (UML) specification.UML 1.0 specification draft was proposed to the OMG in January 1997. 6.2UML Diagrams: UML diagrams represent three different views of a system model:

Functional requirements view


Emphasizes the functional requirements of the system from the user's point of view. Includes use case diagrams.

Static structural view


27

Emphasizes the static structure of the system using objects, attributes, operations, and relationships. Includes class diagrams and composite structure diagrams.

Dynamic behavior view


Emphasizes the dynamic behavior of the system by showing collaborations among objects and changes to the internal states of objects. Includes sequence diagrams, activity diagrams and state machine diagrams.

UML uses many concepts from many sources. Some of the concepts are For structure

Actor, attribute, class, component, interface, object, package.


For behavior

Activity, event, message, method, operation, state, use case.


For relationships

Aggregation,

association,

composition,

dependency,

generalization (or inheritance).

Notations Use case diagrams: These are used to represent the functionality of the system, as seen by the actor. Shows use cases, actors, and their interrelationships. Class diagrams: Used to represent the structure of system, in terms of subsystems, classes, attributes, operations and associations. Shows a

28

collection of static model elements such as classes and types, their contents, and their relationships. Sequence diagrams: Sequence diagrams represent behavior in terms of a series of interactions among a set of objects. Models the sequential logic, in effect the time ordering of messages between classifiers. Statechart diagram: Represents behavior of a single object as a state machine in terms of events and transitions. Describes the states an object or interaction may be in, as well as the transitions between states. Formerly referred to as a state diagram, state chart diagram, or a state-transition diagram. Activity diagram: Activity diagrams are flow diagrams which represent behavior of a set of objects as activities and transitions. Depicts highlevel business processes, including data flow, or to model the logic of complex logic within a system. Deployment diagrams: Represent the mapping of software components to hardware nodes. Shows the execution architecture of systems. This includes nodes, either hardware or software execution environments, as well as the middleware connecting them. Component diagram: Depicts the components that compose an application, system, or enterprise. The components, their interrelationships, interactions, and their public interfaces are depicted.

29

Composite structure diagram: Depicts the internal structure of a classifier (such as a class, component, or use case), including the interaction points of the classifier to other parts of the system. Object Diagram: Depicts objects and their relationships at a point in time, typically a special case of either a class diagram or a communication diagram.

30

CODE :
HTML CODE FOR THE HOME SCREEN <html> <head> <title>MAIN PAGE</title> </head> <style type="text/css"> body { background-image:url('hydrangeas.jpg'); } h1 { color:red ; } h4 { color:blue; } h3 { color:blue; } </style> <body> <h1><center>WEB BASED TELEPHONE DIRECTORY </center></h1> <form method="post" action="r1.php"> <h4>DEPARTMENT:</h4> <select name="dept" style="position:absolute; left:130px; top:65px"> <option value="Administrative services">Administrative services</option> <option value="Dock labour board">Dock labour board</option>

31

<option value="Engineering services">Engineering services</option> <option value="Health care">Health care</option> </select><br><br> <h3>NAME:</h3><input type="text" name="name" size='30' style="position:absolute; left:130px; top:165"><br><br> <h3>SECTION:</h3><input type="text" name="section" size='30' style="position:absolute; left:130px; top:265"><br><br> <input type="Submit" name="submit" value="search"> </form> </body> </html>

PHP code for the screen showing the data retrived from database: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Access of information</title> <style type="text/css"> body { background-color:#00ffff; } </style> </head> <body> <h4>DETAILS</h4> <?php

$showForm = false; $dept = $_POST["dept"]; $name = $_POST["name"]; $section = $_POST["section"];

32

$dbhost = 'localhost'; //host $dbuser = 'root'; //your username created $dbpass = ''; //the password 4 that user $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); $dbname = 'rajesh'; $er = mysql_select_db($dbname) or die('Error connecting database'); if($name=='' && $section=='') { $query = "SELECT * FROM `emp` WHERE `Department` = '$dept'"; } else if($name=='') { $query = "SELECT * FROM `emp` WHERE `Depart ment` = '$dept' AND `Section` = '$section'"; } else if($section=='') { $query = "SELECT * FROM `emp` WHERE `Department` = '$dept' AND `Employee` LIKE '%$name%'"; }

else { $query = "SELECT * FROM `emp` WHERE `Department` = '$dept' AND `Section` = '$secti on' AND `Employee` = '$name'"; }

$result = mysql_query($query) or die(mysql_error());

33

echo "<table border = '10' cellspacing='5' cellpadding='10'>"; echo "<tr align='center'>";

$num_rows = mysql_num_rows($result); $row = mysql_fetch_array($result); if($row){ $num_fields = mysql_num_fields($result); $keys=array_keys($row);

for ($index = 0; $index < $num_fields; $index++) echo "<th>" . $keys[2 * $index + 1] . "</th>"; echo "</tr>"; for($row_num = 0; $row_num < $num_rows; $row_num++) { print "<tr align='center'>"; $values = array_values($row); for ($index = 0; $index < $num_fields; $index++) { $value = htmlspecialchars($values[2 * $index + 1]); print "<th>" . $value . "</th>"; } print "</tr>"; $row = mysql_fetch_array($result); } print "</table>"; } else { echo "Wrong Details"; }

?>

34

</body> </html>

HTML CODE FOR THE SCREEN to add data to the database

<html> <head> <title>adding data</title> <style type="text/css"> body { background-image:url('penguins.jpg'); } h1 { color:red ; } h4 { color:blue; } h5 { color:blue; } </style> </head> <body> <h1><center>ADD THE DATA TO DATABASE</center></h1> <form method="post" action="r2.php"> <h4>EMPLOYEE NAME:</h4><input type="text" name="name" style="position:absolute; left:160px; top:65px"><br><br> <h4>DESIGNATION:</h4><input type="text" name="de" style="position:absolute; left:160px;top:165px"><br><br>

35

<h4>SECTION:</h4><input type="text" name="sec" style="position:absolute; left:16 0px;top:265px"><br><br> <h4>Department:</h4> <select name="dept" style="position:absolute; left:160px;top:365px"> <option value="Administrative services">Administrative services</option> <option value="Dock labour board">Dock labour board</option> <option value="Engineering services">Engineering services</option> <option value="Health care">Health care</option> </select><br><br> <h4>MOBILE NO:</h4><input type="text" name="no" style="position:absolute; left:160px;top:470px"><br><br> <input type="Submit" name ="submit" value="ADD"> </form> </body> </html> PHP code for addin data to database: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Access of information</title> <style type="text/css"> body { background-image:url('3.jpg'); } </style> </head> <body> <h4>DETAILS</h4> <?php

36

if (isset($_POST['submit'])) { $showForm = false; $dept = $_POST["dept"]; $name = $_POST["name"]; $desig= $_POST["de"]; $section = $_POST["sec"]; $mob=$_POST["no"]; if ($showForm == false) { print ("$name <br /> $dept <br /> $section <br /> $desig <br> $mob"); $dbhost = 'localhost'; //host $dbuser = 'root'; //your username created $dbpass = ''; //the password 4 that user $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); $dbname = 'rajesh'; $er = mysql_select_db($dbname) or die('Error connecting database');

$query = "insert into emp(Employee,Desig,Department,Section,mobile) values('$name','$desig','$dept','$section','$mob')";

$result = mysql_query($q uery) or die(mysql_error());

if ($result) { echo "Successfully Entered Data";

/* $num_rows = mysql_num_rows($result); $row = mysql_fetch_array($result);

37

$num_fields = mysql_num_fields($result);

for ($row_num = 0; $row_num = 0 < $num_rows; $row_num++) { $row = mysql_fetch_array($result); } */

} else {

echo "Error"; $error = mysql_error(); exit; } } }

?> </body> </html

38

SCREEN SHOTS

HOME SCREEN:

If any of the departments are selected then it retrieves the results from Data Base. For example if the user chooses administrative services department then the following screen is displayed with the available information

39

For adding data to the database the foll owing page is used. screen is shown below:

40

After entering the data if submit button is pressed then the data is successfully stored into the database and the following screen is displayed:

41

SOFTWARE TESTING
Software Testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding, Testing presents an interesting anomaly for the software engineer. Testing Objectives include: 1. Testing is a process of executing a program with the intent of finding an error 2. A good test case is one that has a probability of finding an as yet undiscovered error 3. A successful test is one that uncovers an undiscovered error Testing Principles: y y y y y All tests should be traceable to end user requirements Tests should be planned long before testing begins Testing should begin on a small scale and progress towards testing in large Exhaustive testing is not possible To be most effective testing should be conducted by a independent third party

42

TESTING STRATEGIES A Strategy for software testing integrates software test cases into a series of well planned steps that result in the successful construction of software. Software testing is a broader topic for what is referred to as Verification and Validation. Verification refers to the set of activities that ensure that the software correctly implements a specific function. Validation refers he set of activities that ensure that the software that has been built is traceable to customer s requirements Unit Testing: Unit testing focuses verification effort on the smallest unit of software design that is the module. Using procedural design description as a guide, important control paths are tested to uncover errors within the boundaries of the module. The unit test is normally white box testing oriented and the step can be conducted in parallel for multiple modules. Integration Testing: Integration testing is a systematic technique for constructing the program structure, while conducting test to uncover errors associated with the interface. The objective is to take unit tested methods and build a program structure that has been dictated by design. Top-down Integration: Top down integrations is an incremental approach for construction of program structure. Modules are integrated by moving downward through the control hierarchy, beginning with the main
43

control program.

Modules subordinate to the main program are

incorporated in the structure either in the breath-first or depth-first manner.

Bottom-up Integration: This method as the name suggests, begins construction and testing with atomic modules i.e., modules at the lowest level. Because the modules are integrated in the bottom up manner the processing required for the modules subordinate to a given level is always available and the need for stubs is eliminated. Validation Testing: At the end of integration testing software is completely assembled as a package. Validation testing is the next stage, which can be defined as successful when the software functions in the manner reasonably expected by the customer. Reasonable expectations are those defined in the software requirements specifications. Information contained in those sections form a basis for validation testing approach. System Testing: System testing is actually a series of different tests whose primary purpose is to fully exercise the computer-based system. Although each test has a different purpose, all work to verify that all system elements have been properly integrated to perform allocated functions. Security Testing:
44

Attempts to verify the protection mechanisms built into the system. Performance Testing: This method is designed to test runtime performance of software within the context of an integrated system

45

CONCLUSION
Every project is done to explore a new solution for a given problem. We hope that this project will be very useful if it can be ported to the intranet so that every Employee has a chance to view the phone numbers along with their other information . Its successful implementation makes the job easy .The Front end of our project has been developed using HTML because nowadays internet drives the world and it is accessed through web browsers which are capable of recognizing various html pages which may consist of text, image, sounds, videos etc. HTML with its advanced features and powerful tools proved to be a perfect choice for developing an efficient system. A number of GUI s are available, but it is user friendliness and attractive screen formats helped a lot to develop this project. Linking to main menu making the whole system creates a extremely user-friendly environment instead of giving the entire tiresome queries even a layman can use this with just a small knowledge of how to access the World Wide Web . The project is also well documented so that if the user wants any help about how the system is designed and implemented he can look back. The system is developed keeping in mind the present requirement and processes. In the future, if the need may arise the software requirements can be modified and upgraded.

46

También podría gustarte