Você está na página 1de 46

University of Khartoum

Faculty of Mathematical Sciences

Information Technology Diploma Program

Science Laboratory Chemical and

Inventory and Order Management
A dissertation submitted in partial fulfillment of the
requirements for the degree of Postgraduate Diploma in
Information Technology


Yasir Mohammed Elsharif

Mr Alargam Alryah
September 2009


Khartoum International Community School (KICS), is a non profit

organization founded by DAL group in 2004.
This project focused on the processes carried out in the science
department laboratory especially those related to the chemicals and
equipments stored in these laboratories and the organization of teacher's
orders of chemicals and equipments for their practical sessions.
The existing inventory of the science department still recorded on papers
or excel sheets, which doesn't fulfill the needs by the faculty for fast
search and access of these items.

The project suggested a web application linked to database system to

solve these problems and make the storing, searching, retrieving and
ordering much easier.
Chapter 1 : Introduction and
Literature Review

1.1 Introduction:

1.1.1 Statement of the problem:

The Science department at Khartoum International Community School (KICS) has a large amount
of equipment and chemicals in its stores and laboratories. Managing these items properly is a
challenging task. One issue is correct storage. The items are categorized into different groups, some
of which have special storage requirements, for example, acids, flammables and living specimens. A
management system must alert users to such requirements. Another tough task is ensuring that the
process of ordering various items for use during science practicals and lessons is straightforward.
The system must allow a teacher to indicate items and quantities required, when they are needed
and for how long. It must also immediately alert the teacher if someone else has requested the same
equipment. The technician has access to the teachers' orders and is responsible for making sure that
sufficient quantities of ordered items are present in the store, preparing these orders and delivering
them prior to each lesson.

1.1.2 Project aim:

Designing an inventory control system for the inventory of KICS' science department.
The proposed design is a web application.

1.1.3 Project objectives:

i. To collect information about the current storage and ordering methods from KICS science
ii. To build a new computerized program that controls the laboratory inventory and manages
the teachers' orders of chemicals and equipment.
iii. To check and examine the program and seek feedback from the users (KICS science staff)
about their satisfaction with the program and missing features, if any.

1.2 Literature Review
This chapter is going to explain relevant theory and research on Web-based Information System
Development, which will be applied to the development of KICS inventory and order management
system. The following issues will be presented:
1. Internet technologies
2. Database and database management
3. Web database concepts
4. PHP programming language
5. MySQL
6. Structured Query Language (SQL)
7. Web applications
8. Other relevant research

1.2.1 Internet Technologies

The Internet is the largest intercommunication network ever. It provides the capabilities for
electronic communication. Users may send and receive various type of media though the computer
network. Individuals use a Web browser to request web pages from a particular website. The
number of websites making up the Internet is rapidly growing. The Internet is described as the
largest public computer network linking hundreds of thousands of individual networks all over the
world via the TCP/IP protocol. To access the Internet, an individual computer uses an IP Address to
reference itself (1). There are several ranges of services provided by the Internet. We will briefly
describe major capabilities as follows:
1. The World Wide Web (www) is a system with globally agreed standards for storing,
retrieving, formatting, and displaying the information on the Internet. Users browse websites
and download relevant files using their web browser.
2. Electronic Mail (E-mail) is a mailing service by which an individual may send his/her
information to a dedicated receiver via the internet.
3. File Transfer Protocol (FTP) enables individuals to send and receive files from FTP servers.
Users may download and upload files from FTP server using File Transfer Protocol.
4. Gopher is a hyperlink services that enable users to search for and retrieve information from
the Internet.
5. Internet Relay Chat (IRC) provides online communication between online-users.
6. HTML (HyperText Markup Language) is a mark-up language designed to connect the
different types of media and display them through the www protocol.
7. A web browser is an application capable of accessing the hypertext information. Internet
users usually use graphical web browsers to browse the needed information. The most
common web browsers are Internet Explorer, Mozilla Firefox, and Netscape Navigator.
8. A web server is a dedicated application. It accepts requests from web browsers, translates
them, finds the requested web page and sends the information to the browser. Web servers
also calculate and store statistical information about usage.
9. Transport Control Protocol/ Internet Protocol (TCP/IP) is a reference model for linking
different type of computers and networks. Technically, all internet services work on the
TCP/IP protocol.
10. Uniform Resource Locator (URL) is the address of a specific resource on the internet. It is
important to use the correct syntax when entering a URL or no connection to the requested
resource will be made. Most URL addresses begin with “http://”.
11. A database server is a system designed to manipulate a database. Its primary function is to
store, retrieve, and manage the information. A database server plays an important role in
web services. It provides the n-tier connection through the internet users via their web

12. An intranet is an internet-like computer network. Intranet technology is similar to internet
technology. It supports web authoring and browsing via a web browser. Intranet technology
is now very popular, its growth-rate is extremely high as it is supported by many

1.2.2 Database and Database Management System

Information typically refers to processed data (2). Stored information is of great benefit to many
businesses. As the business grows, the complexity of the stored information may increase in a way
that is difficult to predict. A business might lose out if it were not able to have the appropriate
information available at the right on time. Therefore, a business might seek a computerized database
management system to store and process complex information. A database management system
(DBMS) enables users to retrieve relevant information. A DBMS also ensures the consistency and
reliability of the stored information making it more useful. Fundamentals of Databases

A database is a collection of relevant files. Each file consists of several records and each record
consists of several fields. The term 'database' refers to the data stored in such files and records as
well as relations between them (3).

A database management system (DBMS) refers to information infrastructures that compose of

relevant information. A DBMS creates and maintains a database and enables individual business
application to extract data in order to create reports. Most DBMSs make use of computers to
manipulate the data. (3) Database Terminology

• Bit: a binary digit; the smallest unit of data.
• Byte: a string of 8 bits used to store one number or character.
• Field: A grouping of characters into a word, a group of words, or a complete number that
describes a property, for example, address.
• Record: A group of related fields that describe a group of properties. For example, a record
for a manufacturer might consist of following fields: ID, NAME, PHONE_NUMBER.
• File: A group of records of same type, for example, a file containing records of all users or
all buildings. Terminology in Database System

• Entity: an individual, place, thing, or event about which information must be stored, for
example, USER or BRAND.
• Attribute: a piece of information describing a particular entity, for example, the attributes of
the entity USER might be ID and Name.
• Relationship: link between entities, for example, there might be a BUILDING entity and a
STORE (cupboard) entity; one BUILDING would hold many STORES. Relationship is classified into three types as follows:

• One-to-one Relationships: As the one-to-one label implies, in this relationship one entity can
be related to only one other entity, and vice versa.
• One-to-many Relationships: In this relationship, one entity can be related to multiple
instance of other entity. (1:M).
• Many-to-many Relationships: Multiple instances of one entity relate to multiple instances of
the others. (M: N)

1.2.3 Web database concepts
Web-technology could be defined as hardware and software built specifically for use with the world
wide web and therefore able to share and access the standard media found on the web such as text
documents, images, sound and videos. Web developers use a language called HTML (Hypertext
Markup Language) to create web documents that web browsers can interpret.

Information exchange is based on so-called client-server architecture. The clients, which are
'remote' from the server make information requests to the web server using correct protocol. A
programme called a web-browser translates text or mouse clicks into this protocol. The server
receives requests, finds information and sends it to the client web-browser where it is displayed. Information on Web

Consider the following three categories of information on the web:
• Dynamic Publishing:
Dynamic publishing refers to web information that is dynamically updated. Each web page
was built as a template using web-authoring tools. The actual contents of the page are stored
in the centralized database and retrieved in order to update the page contents. Therefore,
whenever information in the database changes, the content of the viewing page is
automatically updated.
• Information Transactions:
This category includes, for example, the exchange of information between client and server
or between two clients.
• Data Storage and Analysis :
The information stored in the database server is retrieved, processed and published to web
pages. This enables an end-user or client to analyze statistical information and, for example,
build a report. A fiscal report is quite a good example to illustrate this category (3). Web Database

A Web database is composed of the following important sections
• The database itself.
• A fragment of program running on the web browser and web server.
• Middleware - software interacting with the database management system, web browser and
web server. Typically, this software handles information exchange and translates commands. Web Client

A web client runs a so-called web browser which is software that organises the exchange of
information between client and web server. The best known web browsers are Internet Explorer,
Netscape Navigator and Mozilla Firefox. Web Server

There are two ways one might explain what a web server is.
• It is a computer program that processes the requested information from web client. The
requests are made through the HTTP protocol. Microsoft IIS and Apache server are good
examples of web server programs.
• Web server would also refer to the hardware - single desk-top or clusters of computers
dedicated to provide web server function. Implementing web database

Typically, a developer creates a web application to manage the database. The created web-
application is stored and executed by the web server. There are several techniques to track and store

information exchanged during one website visit, for example, by using cookies. Sun Microsystems
developed Java; an object oriented programming language. Java enables a developer to create
dynamic web pages and has become a famous web programming language. However, all web-
programming languages must provide an Application Programming Interface (API) to access the
database server, so that the developed program would gain the benefits of the web database

1.2.4 PHP Programming Language

PHP is a server side scripting programming language. The PHP script is processed at the web server
before information is sent to the web browser. A developer might also embed PHP code into the
native HTML file. Its programming syntax looks very similar to the languages C and Perl. A
scripting language is classified by where it is executed as:

Server-Side Script: The script is stored and executed at the web server. Examples are Java server
pages, PHP and ASP .
Client-Side Script: The script is sent to the web browser. It will be executed, and processed by the
web browser. Exmples are Java Script and VB Script (4). PHP CAPABILITIES

PHP would create dynamic web page like a common gateway interface application (CGI). It
provides fucntionality equal to ASP but also easy database connectivity and strong security features.
PHP can deploy cookies, and manage sessions. The database management systems that provide
connectivity through the PHP are:
Adabas D InterBase Solid Microsoft Access
Dbase Msql Sybase
Empress MySQL Velocis
FilePro Oracle Unix dbm
Informin PostgreSQL MS SQL Server

However, PHP could connect to several services protocols such as IMAP, SNMP, NNTP, POP3 and
HTTP. Socket software using PHP could also be developed. Principle Operating System of PHP

Typically, a web browser requests a PHP file from the web server. If the requested file is found, it
will execute that file and process the PHP script. During the execution, the script would ask to
connect, and access the database server. When the server finishes executing the PHP file, the result
is sent to the web browser (4).

1.2.5 MySQL MySQL Definition

MySQL is a RDBMS or Relational Database Management System. MySQL is widely used in web
database management because it is free. It is a light, reliable, multi-platfrom and fast database
management system. It supports Unix, OS/2, Mac OS, Linux, and Microsoft windows. MySQL also
provides the API to communicate with major programming languages such as C, C++, Java, Perl,
PHP, and ASP. A developer can download both executable and source codes from the internet under
open source licences. MySQL Architecture

MySQL uses client-server architecture so that some processes take place in the server and some in

the client. Server processes would manage the logical database management, taking care of how the
data is stored and organized. Client processes would be described as processes that access the server
in order to store, retrieve, update and alter the database.

1.2.6 Structured Query Language

SQL stands for Structured Query Language. SQL is a relational database manipulation language,
which was invented by IBM. Currently, there are several relational database management systems.
Each manufacturer that created a RDBMS used its own technology and created a different query
language. The well-know RDBMS are Oracle, SQL Base, Microsoft SQL Server and PostgresSQL.
Though some differences in syntax, most manufacturers follow SQL86 as a reference model.
SQL86 is a standard query language developed by American National Standards Institute (ANSI). SQL Components

SQL could be described as a data definition language, a data manipulation language and a data
dictionary. This variety of uses shows the great value of a RDBMS
• Data Definition Language: DDL is a formal language use to specify the content and
structure of the database.
• Data Manipulation Language: DML is a language that is used in combination with other
programming languages to manipulate data in the database. Certain commands permit users
to extract the information from the database. The SQL code would be embedded in
application programs written in conventional programming languages.
• Data Control Language: DCL refers to commands used to control the data while the
database is being updated. SQL might be used in two different ways:

• Interactive SQL: The database administrator would use the SQL statement to manipulate the
database using its native application.
• Embedded SQL: SQL statement can be written and embedded into an application program
written in conventional programming language such as COBOL, PASCAL, PL/1.

2.6.3. DATA MANIPULATION SYNTAX INSERT is used when we would like to add new record to the database. The SQL statement
is shown in the following.
VALUE (<VALUE>); UPDATE is used to change the value in the dedicated record

[WHERE<CONDITION>]; DELETE is applied when we want to erase the existing record.

DELETE <RELATION> [WHERE<CONDITION>]; SELECT would be used to select information defined by a condition or conditions as


1.2.7 Web Applications:
In software engineering, a web application or webapp is an application that is accessed via a web
browser over a network such as the internet or an Intranet. It is also a computer software application
that is coded in a browser-supported language (such as HTML, JavaScript,Java, etc.) and reliant on
a common web browser to render the application executable (5).

Web applications are popular due to the ubiquity of web browsers, and the convenience of using a
web browser as a client, sometimes called a thin client. The ability to update and maintain web
applications without distributing and installing software on potentially thousands of client
computers is a key reason for their popularity, as is the inherent support for cross-platform
compatibility. Common web applications include webmail, online retail sales, online auctions, wikis
and many other functions (5). History
In earlier types of client-server computing, each application had its own client program which
served as its user interface and had to be separately installed on each user's personal computer. An
upgrade to the server part of the application would typically require an upgrade to the clients
installed on each user workstation, adding to the support cost and decreasing productivity.

In contrast, web applications use web documents written in a standard format such as HTML (and
more recently XHTML), which are supported by a variety of web browsers.

Generally, each individual web page is delivered to the client as a static document, but a sequence
of pages can provide an interactive experience, as user input is returned through web form elements
embedded in the page markup. During the session, the web browser interprets and displays the
pages, and acts as the universal client for any web application.

In 1995, Netscape introduced a client-side scripting called JavaScript, which allowed programmers
to add some dynamic elements to the user interface that ran on the client side. Until then, all the
data had to be sent to the server for processing, and the results were delivered through static HTML
pages sent back to the client.

In 1996, Macromedia introduced Flash, a vector animation player that could be added to browsers
as a plug-in to embed animations on the web pages. It allowed the use of a scripting language to
program interactions on the client side with no need to communicate with the server.

In 1999, the "web application" concept was introduced in the Java language in the Servlet
Specification version 2.2. At that time both JavaScript and XML had already been developed, but
AJAX had still not yet been coined and the XMLHttpRequest object had only been recently
introduced on Internet Explorer 5 as an ActiveX object.

In 2005, AJAX was coined, and applications like Gmail started to make their client sides more and
more interactive. Interface
The web interface places very few limits on client functionality. Through Java, JavaScript,
DHTML, Flash and other technologies, application-specific methods such as drawing on the screen,
playing audio, and access to the keyboard and mouse are all possible. Many services have worked
to combine all of these into a more familiar interface that adopts the appearance of an operating
system. General purpose techniques such as drag and drop are also supported by these technologies.

Web developers often use client-side scripting to add functionality, especially to create an
interactive experience that does not require page reloading. Recently, technologies have been
developed to coordinate client-side scripting with server-side technologies such as PHP. AJAX, a
web development technique using a combination of various technologies, is an example of
technology which creates a more interactive experience. Structure
Applications are usually broken into logical chunks called "tiers" and every tier is assigned a role.
Traditional applications consist only of 1 tier, which resides on the client machine, but web
applications lend themselves to an n-tiered approach by nature. Though many variations are
possible, the most common structure is the three-tiered application. In its most common form, the
three tiers are called presentation, application and storage, in this order. A web browser is the first
tier (presentation), an engine using some dynamic Web content technology (such as ASP, ASP.NET,
CGI, ColdFusion, JSP/Java, PHP, Perl, Python, Ruby on Rails or Struts2) is the middle tier
(application logic), and a database is the third tier (storage). The web browser sends requests to the
middle tier, which services them by making queries and updates against the database and generates
a user interface.

For more complex applications, a 3-tier solution may fall short, and you may need a n-tiered
approach, where the greatest benefit is breaking the business logic, which resides on the application
tier, into a more fine-grained model. For example, creating a separate business logic tier. Or adding
an integration tier that separates the data tier from the rest of tiers by providing an easy-to-use
interface to access the data. For example, you would access the client data by calling a
"list_clients()" function instead of making a SQL query directly against the client table on the
database. That allows you to replace the underlying database without changing the other tiers.

There are some who view a web application as a two-tier architecture. This can be a "smart" client
that performs all the work and queries a "dumb" server, or a "dumb" client that relies on a "smart"
server. The client would handle the presentation tier, the server would have the database (storage
tier, and the business logic (application tier) would be on one of them or on both. While this
increases the scalability of the applications and separates the display and the database, it still doesn't
allow for true specialization of layers, so most applications will outgrow this model. Business use

An emerging strategy for application software companies is to provide web access to software
previously distributed as local applications. Depending on the type of application, it may require the
development of an entirely different browser-based interface, or merely adapting an existing
application to use different presentation technology. These programs allow the user to pay a
monthly or yearly fee for use of a software application without having to install it on a local hard
drive. A company which follows this strategy is known as an application service provider (ASP),
and ASPs are currently receiving much attention in the software industry. Writing web applications

There are many web application frameworks which facilitate rapid application development by
allowing the programmer to define a high-level description of the program. In addition, there is
potential for the development of applications on internet operating systems, although currently there
are not many viable platforms that fit this model.

The use of web application frameworks can often reduce the number of errors in a program, both by
making the code simpler, and by allowing one team to concentrate just on the framework. In

applications which are exposed to constant hacking attempts on the Internet, security-related
problems caused by errors in the program are a big issue. Frameworks may also promote the use of
best practices such as GET after POST. Applications
Browser applications typically include simple office software (word processors, online
spreadsheets, and presentation tools), with Google Docs being the most notable example, and can
also include more advanced applications such as project management, computer-aided design, video
editing and point-of-sale. Benefits
Browser applications typically require little or no disk space on the client, upgrade automatically
with new features and integrate easily into other web procedures, such as email and searching. They
also provide cross-platform compatibility (i.e. Windows, Mac, Linux) because they operate within a
web browser window. Drawbacks
Browser applications rely on application files accessed on remote servers through the Internet.
Therefore, when the connection is interrupted, the application is no longer usable. Google Gears is a
platform to ameliorate this issue and improve the usability of browser applications (5).


The current researcher found many programs on the internet similar to this project but none which
fully satisfied the needs / goals of this project. Most of the programs found were either too simple
like home inventories which only lists items someone has, or too complicated like an inventory of
genes and molecular properties of some complex compounds in modern research centers.

Chapter 2 : Analysis

2.1 The organization:
Khartoum International Community School (KICS) was founded by the DAL group in 2004. KICS
is a non-profit organization that aims to offer an outstanding English-medium education to
Khartoum's community. The syllabus is based on that developed by the International Baccalaureate
Organization (IBO).
2.2 Organization Structure:

Figure 2.1. Shows the organization chart of KICS.

2.3 Functional Structure:

The project concentrates on the science department in the senior section. The department is led by a
head of department and includes four other teachers. The department has one technician who is
responsible for preparing the equipment and materials necessary for science practicals performed by
teachers and students in the department's laboratories (classrooms), monitoring the department's
stores, maintaining an up-to-date record of the existing items, ordering new items and reordering the
consumed ones.

Figure 2.2. Shows the functional chart of KICS.

2.4 Description of the Current System:
The Science department at Khartoum International Community School (KICS) has a large amount
of equipment and chemicals in its stores and laboratories. Managing these items properly is a
challenging task. One issue is correct storage. The items are categorized into different groups, some
of which have special storage requirements, for example, acids, flammables and living specimens. A
management system must alert users to such requirements. Another tough task is ensuring that the
process of ordering various items for use during science practicals and lessons is straightforward.
The system must allow a teacher to indicate items and quantities required, when they are needed
and for how long. It must also immediately alert the teacher if someone else has requested the same
equipment. The technician has access to the teachers' orders and is responsible for making sure that
sufficient quantities of ordered items are present in the store, preparing these orders and delivering
them prior to each lesson.

2.5 Proposed System:

The objective of this project is to build a database management system that will help the teachers to
make their orders in a timely fashion while being able to check the availability of all items and
quantities in stock. It should also help the technician in finding the exact items in their exact
location and ease the work for updating the values of each item (like the quantity after every usage).

In particular, the system should do the following:

(a) keep detailed records of the items belonging to the department;
(b) keep a record of the items received and used in the past;
(c) schedule forthcoming ordering of new items;
(d) keep a record of the vendor(s) of each item for ease of re-ordering;
(e) allow the teachers to make their orders for practicals in an easy and effective way;
(f) forecast future demand for fast moving items based on past consumptions.

In this model we assume that the system shall provide reports that enable the managers to decide the
proper disposal/utilization plan of the items in the inventory according to their consumption and
other criteria such as their expiry dates.

Chapter 3 : Design

Chapter 3 Design:
3.1 Data Flow Chart Diagrams:

3.1.1. Context Diagram Level 0:

Figure 3.1. shows level 0 of the context diagram.

3.1.2. Data Flow Diagram Level 1:

Figure 3.2 shows the data flow diagram (Level.1) of the whole inventory management processes.

3.1.3. Storing (entering items in the inventory):

The technician enters the specifications of the item and chooses where the item should be stored
accordingly (e.g. flammable chemicals has to be stored in a flammable cupboard).

Figure 3.3 shows the data flow in the storing new items process (level 1.1).

3.1.4. storing new items, detailed:

Figure 3.4 shows detailed data flow in the storing new items process (level 1.1).

3.1.5. Checking the availability of an item:
The technician or teacher checks whether an item is available (it's presence and reservation status)
and if it is reserved for another teacher, what time it will be available.

Figure 3.5 shows the data flow in the checking process (level 1.1).

3.1.6. Maintaining the inventory and item delivery:

In case the item is available, the technician/teacher can reserve it for a period of time, indicating
when it will be returned. The quantity of the item has to be indicated as well.

Figure 3.6 shows the data flow in reservation process (level 1.1).

3.1.7. Annual reports:
The technician or the teacher can request an annual report showing how many times an item has
been requested, how much of it has been consumed (if it is a consumable item) during the academic
year and how much is left for next year.

Figure 3.7 shows the data flow in the report process (level 1.1).

3.2 Database Design:
3.2.1 Entity Relationships Diagram:

Figure 3.8 shows the Entity Relationships Diagram

3.2.2 ER diagram1:

Figure 3.9 show the ER diagram using phpMyadmin.

3.2.3 Relations and Data Dictionary:

Table comments: hold information about the rooms in the science department;
Field Type Null Default Comments
id char(10) No primary key of the table
name varchar(25) No name of the room
information about where is the room located and how many
description varchar(50) Yes NULL
students can it takes

Table comments: holds information about stored items, it's the main table;
Field Type Null Default Links to Comments
id int(10) No primary key of the table
shows the type of the item, it is a foreign key
type_id int(10) No types -> id
to "types" table
building_id char(10) No buildings - shows the building's id as a foreign key which

help in bringing all the needed information
> id
about the building from "buildings" table
shows the store's id as a foreign key which
stores -> help in bringing all the needed information
store_id char(10) No
id about where each item is stored from "stores"
name varchar(100) No the name of the exact item in the inventory
any comments or observation can by entered
comments text Yes NULL either when the item first catalogued or at any
time when it is in the store
the unit of measurement of the item i.e. gram,
unit varchar(10) Yes gram
kilo, box, .. etc
quantity double No 1 the quantity of the item in the store
double Yes 0 how much got consumed of the item
vendor varchar(50) Yes NULL vendor's information
catno varchar(50) Yes NULL catalogue's no in the vendors catalogue
arrived date Yes NULL when did the item arrived
expires date Yes NULL the expiry date of the item

Table comments: displays the ordered items in each order; (`order_id`) REF
Field Type Null Default Links to Comments
id int(10) No primary key of the table
foreign key to "orders" table shows that this
order_id int(10) No orders -> id
item is ordered for that certain order
item_id int(10) No items -> id the item which is orderd
quantity double No the required quantity of the item
measurment of that quantity like gram, kilo,
unit varchar(10) No
unit ... etc
concentratio if it's something to be prepared, at which
varchar(25) Yes NULL
n concentration
note text Yes NULL special note about this special item
building_id char(10) No the building at which the item is stored
the exact store or cupboard at which the item
store_id char(10) No
is stored
the name of the teacher who ordered the items
teacher varchar(50) No
for his/her practical

Table comments: holds information about orders for practicals;
Field Type Null Default Links to Comments

id int(10) No auto incremented primary key for the table
lesson tinyint(4) No the number of the lesson 1 to 6
buildings -> the room where the ordred item should be
room char(10) No
id delivered
autogenerated timestamp when the order
order_date timestamp No _time
request_dat the day at which the ordered items are
date No
e neede
the day at which the ordered items will be
return_date date No
returned to the system
useraccounts - the name of the teacher who ordered the
teacher varchar(50) No
> username items for his/her practical
any special note about the order or the
note text Yes NULL

Table comments: cupboards and special stores inside science buildings;
Field Type Null Default Links to Comments
id char(10) No primary key of the table
name varchar(25) No the name of the store or the cupboard
the lock number which matches it's key for
lock_no varchar(10) Yes NULL
security and safety isues
building_id char(4) No buildings -> id the building at which the store is located

Table comments: indicates the types of items which are stored in the system;
Field Type Null Default Comments
id int(10) No primary key of the table
the name of the type that can be used to describe the items and
name varchar(45) No
clssify them accordingly, it help also in choosing the right store

Table comments: users of the system, and their privileges;
Field Type Null Default Comments
username varchar(50) No the user name of the system, including teachers
password which used for login to the system. It uses md5
password varchar(35) No
manages the prvileges levels of the system, who can see
userlevel int(10) No 7
and who can edit what
email varchar(50) No user's e-mail address

whether the user's acount is enabled or disabled from using
active int(10) No 0
the system

3.3 Conceptual design:
3.3.1 Inventory Control:

Figure 3.10 shows the inventory control, where the processes of storage management take place.

3.3.2 Order management:

Figure 3.11 shows order management where the processes of teachers orders take place.

Chapter 4 : Implementation

4.1 System Interfaces:
After designing the web application the researcher has implemented the application using
phpMyAdmin for database data definition. The researcher has then generated the PHP scripts using
PHPMaker v.6, a program which writes simple PHP scripts for data manipulation of database tables.
These scripts were then revised and reedited using text editors and Adobe Dreamweaver, a program
for web development. These simple codes were then inserted in a ready made HTML/CSS template
to give the application an attractive and more usable appearance. This step was also done using
Adobe Dreamweaver.

The interface is built in a way that enables the user to easily navigate to any part of the web
application through a horizontal menu. Some of the site's contents and operations are only available
for those who have a user name and a password to get into the system and even those users have
different privileges depending on their user level.

Some AJAX capabilities were added to the project, e.g. chained select boxes: when a user selects a
building the field of stores is automatically only those that exist in that specific building. Also when
adding an order or order details the teacher's name is automatically fed from his/her login.

Below are some examples of the interfaces from the web pages themselves. These and all others are
online at: kicsinv.cc.co, Not all pages will be described here as some act in similar ways. For
example, a user follows the same procedures for inserting, deleting or searching for records in the
stores, buildings or items pages. So here are some of the web pages:

Figure 4.1 shows the login page of the web application. On this page you can reclaim your forgotten
password, or register if you are a new user, the page also can save the user name for further logins
and save cookies for auto login.

Figure 4.2 shows the registration page, but note that only an administrator can control the user

Figure 4.3 shows the orders list page, as being viewed by an administrator (who can see and change
any user's orders)

Figure 4.4 shows the page for adding orders which only privileged users can access. The user's
name is automatically inserted into the orders that he/she makes, a time stamp also is generated for
each item added to the order.

Figure 4.5 shows the page used to delete orders. Note that deleting orders requires confirmation to
prevent accidental deletes.

Figure 4.6 shows the page used for editting the orders.

Figure 4.7 shows the page produced if a user wants to export a print view of orders.

Figure 4.8 shows the page produced if a user wants to export an html view of orders.

Figure 4.9 shows the same view as 5.7 but for a single order.

Figure 4.10 shows the same view as 5.8 but for a single order.

Figure 4.11 shows the “search result view of orders” page.

Figure 4.12 shows the “grid edit of orders” page, including multiple record editing.

Figure 4.13 shows the “ view of order” page when displaying a single order.

Figure 4.14 shows the “list view of ordered details (items)" in a single order.

Figure 4.15 shows the “list view of buildings table” page, displays single order.

Figure 4.16 shows the “list view of order details table” page, displaying multiple orders.

Figure 4.17 shows the "items list" page.

Figure 4.18 shows “add item”page. It has additional links to add a store record or type record if not
found in the drop-down list.

Figure 4.19 shows the "list view of Types" table. There is a link to find all the items of each type.

Figure 4.20 shows the "list view of Stores" table. There is a link to find all the items in each store,
cupboard or room.

The researcher was very satisfied with the results and the system is now running on-line at
www.kicsinv.co.cc as well as being installed as part of the intranet at KICS. In order to increase the
possible audience for the project the webapp has been published on www.sourceforge.net which is a
large collection of open source applications. The link is www.sciencelabinv.sf.net or

The researcher recommended continued development of the system including adding new features
like being able to hold more than one school's database and adding a feature of automatic locking of
users from ordering equipment if already booked by another user.


1. Doglas E. Comer, Computer Networks & Internet

2. Principles of Information Systems, Eighth Edition
3. Paul Beynon-Davies, Database Systems , Third Edition , 2004, Palgrave Macmillan, ISBN
1– 4039–1601–2
4. W. Jason Gilmore, Beginning PHP and MySQL From Novice to Professional, Third
Edition , Apress, ISBN-10 (electronic): 1-4302-0299-8.
5. http://en.wikipedia.org/wiki/Web_application, From Wikipedia, the free encyclopedia, ,
August 2009 at 15:47

1. sql to create the tables:
-- Table structure for table `buildings`
`id` char(10) NOT NULL,
`name` varchar(25) NOT NULL,
`description` varchar(50) default NULL,
-- --------------------------------------------------------
-- Table structure for table `items`
`id` int(10) NOT NULL auto_increment,
`type_id` int(10) NOT NULL,
`building_id` char(10) NOT NULL,
`store_id` char(10) NOT NULL,
`name` varchar(100) NOT NULL,
`comments` text,
`quantity` double NOT NULL default '1',
`consumption` double default '0',
`vendor` varchar(50) default NULL,
`catno` varchar(50) default NULL,
`arrived` date default NULL,
`expires` date default NULL,
KEY `item_type_id` (`type_id`),
KEY `item_store_id` (`store_id`),
KEY `building_id` (`building_id`)
-- --------------------------------------------------------
-- Table structure for table `orders`
`id` int(10) NOT NULL auto_increment,
`lesson` tinyint(4) NOT NULL,
`room` char(10) NOT NULL,
`order_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update
`return_date` date NOT NULL,
`teacher` varchar(50) NOT NULL,
`note` text,
KEY `user_id` (`teacher`),
KEY `room` (`room`)
-- --------------------------------------------------------
-- Table structure for table `order_detail`
`id` int(10) NOT NULL auto_increment,
`order_id` int(10) NOT NULL,
`item_id` int(10) NOT NULL,
`quantity` double NOT NULL,
`unit` varchar(10) NOT NULL,
`concentration` varchar(25) default NULL,

`note` text,
`building_id` char(10) NOT NULL,
`store_id` char(10) NOT NULL,
`teacher` varchar(50) NOT NULL,
KEY `order_id` (`order_id`),
KEY `item_id` (`item_id`)
-- --------------------------------------------------------
-- Table structure for table `stores`
`id` char(10) NOT NULL,
`name` varchar(25) NOT NULL,
`lock_no` varchar(10) default NULL,
`building_id` char(4) NOT NULL,
KEY `building_id` (`building_id`)
-- --------------------------------------------------------