Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

UNIVERSITI TEKNOLOGI MARA (PERAK)

Kampus Tapah

FACULTY OF COMPUTER AND MATHEMATICAL SCIENCES


Faculti Sains Komputer Dan Matematik (FSKM)

INFORMATION SYSTEMS DEVELOPMENT

(ITS 332)

OLD FOLKS HOME CARE


NAME
MOHAMED HAZIQ BIN SUNAN MUHDZIR

STUDENT ID

MUHAMMAD NUMAN BIN GHAZALI

2015838858

2015818868

Group
Program

:
:

A4CS110-4A
CS110 Diploma in COMPUTER SCIENCE

Prepared for

PN SITI HAJAR NASARUDDIN (Lecturer ITS332)

Scope

We will built a web platform that combine many web elements to make our
application more effective and friendly user.
Default programming language of our choice will be using PHP, combining
with other elements such as JavaScript, HTML and maybe CSS to make our
application be more interesting.

1.0 Introduction
The purpose of this project is to handle the inefficiency of data record for Dutch
Gentlemen company. The aim of this project is to keep tracking any information that
involved in the database without skip any of it. By creating a database, this problem
will be managed properly. Why Database? We pick to create database because
databases can store very large numbers of records efficiently and they also take up
a little space. It also give user to have a very quick access and easy to find
information. Easy to add new data, and to edit or delete old data. More than one
person can access the same database at the same time(Multi-access). Security may
be better for databases rather than in paper files. Perhaps the most logical reason
to use a database for our client is for letting them to be more productive. When the
company is growing, they will find that they will have less and less time available,
one of the first things to slip is often their record-keeping. After all, who has time to
put their client on hold, run for the file cabinet, pour over all their handwritten notes
and remind them what is going on with the client before they get back on the
phone? With a database, all the information is right into them. They can literally pull
up that clients file on their PC as you are exchanging initial telephone pleasantries.
By the time they tell you the purpose of their call, you have already perused the
history from your last call and well prepared to talk with them.

2.0 Case Study


2.1 Company Background
Dutch Gentlemen is a big company that supply a fresh milk and cheese in Tapah
Town. This company is managed by Haziq and his family. This company has
operated for a long time, passing through many generation up until now. It started
with the production of a single product- bagorini cheese and has since expanded
to UHT milk. UHT is stand for Ultra-High Temperature processing and packaging to
produce and market milk in the country. This company get the idea to sell dairy
product is because Haziq predict that this product will growth larger in the future
moreover Dutch Lady has already build their name in all over the country for selling
dairy product. Accompanied by Numan, the loyal secretary to Haziq who also haven
served the master for a long time since the company was built. Together they brace
their way through this harsh world in order to make the company the best milks
supplier in the country.

2.2 Current System Description

This company is using manual system record to update their business record. They
tend to write on paper about their stock information, employees information,
supplier information and do not forget about customer transaction. Manual
inventory system can be highly labor-intensive to operate. They require continuous
monitoring to ensure that each transaction is accounted for and that products are
maintained at the appropriate stocking levels. It is also more difficult to share
inventory information throughout the business, because the lack of computerization
makes accessing inventory records a more cumbersome process. The time spent
monitoring inventory levels could be used on more productive activities for the
business. This manual inventory system relies heavily on the actions of people,
which increases the possibility of human error. People might forget to record a
transaction or simply miscount the number of goods. This results in needless
additional orders that increase the company's inventory carrying costs and use up
precious storage space. Inaccurate physical counts could also result in not ordering
enough of a product, meaning the business could run out of a crucial item at the
wrong time.

2.3 Problem Statement


There are many problem that arises in this company. The first and foremost, the
company always having a difficult time to check their files. Everytime the company
decide to do some maintenance, they will usually took a long time to fully check the
files. This caused some extra work to do and waste a lot of time.
Aside from that, there are some data lost occurred once in a while. The
employee that are in charge of taking care the files might do some mistake that
caused the data lost. This problem can give a huge impact of the company since the
company rely solely on the files. If they lost the data, they lost the customer thus
they do not make a profit and later on might be shutdown due to incapability of
paying the utility.
Our next problem is that sometime there might be a data mislaid. As we all
know, human do some mistake. This apply to everyone including the employee that
are in charge of taking care the files. There will always occurred a mislaid
information on the customer(i.e the customers date date of transaction, the
payment, the items quantity and etc).

2.4 Suggestion Solution


The suggested solution that we came up after brainstorming for 5 days is that
create an inventory database for the company to help them running the business.
This database can help to improve the company to store their data. The customers
detail, suppliers detail and employees detail are stored safely in the database.
This database also can prevent data redundancy in a most easy way. The
employee does not have to do regular checkup to avoid data redundancy as this
database prevent it. Aside from that this system help prevent data mislaid occur.

On top of that, the database system can enhance any online activities done
by the company(i.e money transaction). Customer may also get the invoice easily
once they settle the payment.

2.5 Objective
Produce a databases system for Dutch Gentlemen company that can :
1.
2.
3.
4.
5.
6.
7.

Input customer detail, stock detail and supplier detail


Create and maintain the database
Calculate and display the total of all profit gained all outlet
List down all customer invoice with their name and payment
Tracking transaction
Produce report
Find the highest employees salary

3.0 ERD Narrative


Entity Name : SUPPLIER
Entity Explanation : Record data of Supply
Attributes
Explanatio Data
Form
Name
n/
Type
at
contents
SUPP_ID
Supplier s
Varchar(10 char
ID
)
SUPP_NME
SUPP_ADDR
SUPP_PAYMNT

Suppliers
Name
Suppliers
Address
Suppliers
Payment

Varchar(20
)
Varchar(30
)
Decimal

Required( PK or
not null)
FK
YES

FK
reference
table

PK

char
char
Decim
al

Entity Name : STORE


Entity Explanation : Record data of Storage
Attributes
Explanatio Data
Form
Name
n/
Type
at
contents

Required
(not null)

PK or
FK

FK
reference
table

SUPP_ID

Varchar(10
)
Varchar(6)

char

YES

char

YES

integer

intege
r
char

Entity Name : TRACKING


Entity Explanation : Record for tracking
Attributes
Explanatio Data
Name
n/
Type
contents
TCK_ID
Tracks ID
Varchar(6)
TCK_DATE

Tracks Date

Date

Date

TCK_TIME

Tracks Time

Time

Time

EMP_ID
STO_QUANT
TCK_ID

Supplier s
ID
Employees
ID
Store
quantity
Track ID

Varchar(6)

PK and
FK
PK and
FK

SUPPLIER

YES

PK and
FK

TRACKING

Form
at

Required
(not null)

PK or
FK

FK
reference
table

char

YES

PK

Entity Name : OUTLET


Entity Explanation : Record for the outlet
Attributes
Explanatio Data
Name
n/
Type
contents
OUTLET_ID
Outlets ID
Varchar(6)

Form
at

Required
(not null)

PK or
FK

char

YES

PK

TCK_ID

Tracks ID

Varchar(6)

char

YES

FK

OUTLET_ADD

Outlet
Address

Varchar(30
)

char

Entity Name : CUSTOMER


Entity Explanation : Record data of Customer

EMPLOYEE

FK
reference
table
TRACKING

Attributes
Name
CUST_ID
CUST_NAME
CUST_AGE
OUTLET_ID

Explanatio
n/
contents
Customer s
ID
Customers
ID
Customers
Age
Outlets ID

Data
Type

Form
at

Required
(not null)

PK or
FK

Varchar(6)

char

YES

PK

Varchar(20
)
integer

char

YES

FK

OUTLET

process
Form
Required
at
(not null)

PK or
FK

FK
reference
table

char

YES

PK

Varchar(6)

char

YES

PK and
FK

CUSTOMER

Varchar(50
)
Decimal

char

Required
(not null)

PK or
FK

FK
reference
table

YES

PK

Varchar(6)

Entity Name : ONLINE


Entity Explanation : Record data for online
Attributes
Explanatio Data
Name
n/
Type
contents
ONL_ID
Online s ID
Varchar(6)
CUST_ID
ONL_INVOICE
ONL_PAYMNT

Customers
ID
Online
Invoice
Online
Payment

intege
r
char

Decim
al

Entity Name : EMPLOYEE


Entity Explanation : Record data of Employee
Attributes
Explanatio Data
Form
Name
n/
Type
at
contents
EMP_ID
Employee s Varchar(6) char
ID
EMP_NAME
Employees
Varchar(20 char
Name
)
EMP_SEX
Employees
char
char
Gender
EMP_ADDR

Employees
Address

Varchar(50
)

FK
reference
table

char

EMP_HIREDAT
E

Employees
hired date

date

date

4.0 System Design


4.1 Entity Relational Diagram(ERD)

4.2 Relational database model (Relational Schema)

SUPPLIER ( SUPP_ID , SUPP_NME , SUPP_ADDR , SUPP_PAYMNT )


STOCK ( STOCK_ID , SUPP_ID* , STOCK_QNTITY )
STORE ( STOCK_ID* , EMP ID* , TCK_ID* )
EMPLOYEE ( EMP_ID , EMP_NAME , EMP_SEX , EMP_ADDRESS , EMP_HIREDATE
, EMP_SALARY)
TRACKING ( TCK_ID , TCK_DATE , TCK_TIME )
OUTLET ( OUTLET_ID , TCK_ID* , OUTLET_ADD )
CUSTOMER ( CUST ID , CUST_NAME , CUST_AGE , OUTLET_ID* ,
CUST_PAYMNT )

ONLINEACC ( ONL ID , CUST_ID* , ONL_INVOICE , ONL_PAYMNT )


4.3 Third Normalization Form (Table Structure)

5.0 System Development


5.1 DATA DEFINITION
create table SUPPLIER
(SUPP_ID varchar(10) not null,
SUPP_NME varchar(20),
SUPP_ADDR varchar(30),
primary key(SUPP_ID));
create table TRACKING
(TCK_ID varchar(6) not null,
TCK_DATE date,
TCK_TIME time,
primary key(TCK_ID));
create table EMPLOYEE
(EMP_ID varchar(6) not null,
EMP_NAME varchar(20),
EMP_SEX char,
primary key(EMP_ID));

create table STOCK


(STOCK_ID varchar(6) not null,
SUPP_ID varchar(6) not null,
STOCK_QNTITY integer,
primary key(STOCK_ID),
foreign key(SUPP_ID) references SUPPLIER);
create table STORE
(EMP_ID varchar(6) not null,
STOCK_ID varchar(6) not null,
TCK_ID varchar(6) not null,
primary key(STOCK_ID,EMP_ID),
foreign key(STOCK_ID) references STOCK,
foreign key(EMP_ID) references EMPLOYEE,
foreign key(TCK_ID) references TRACKING);
create table OUTLET
(OUTLET_ID varchar(6) not null,
TCK_ID varchar(6) not null,
OUTLET_ADD varchar(30),
primary key(OUTLET_ID),
foreign key(TCK_ID) references TRACKING);
create table CUSTOMER
(CUST_ID varchar(6) not null,
CUST_NAME varchar(20),
CUST_AGE integer,
OUTLET_ID varchar(6) not null,
primary key(CUST_ID),
foreign key(OUTLET_ID) references OUTLET);
create table ONLINE
(ONL_ID varchar(6) not null,
CUST_ID varchar(6) not null,
ONL_INVOICE varchar(50),
ONL_PAYMNT decimal(7,2),
primary key(ONL_ID,CUST_ID),
foreign key(CUST_ID) references CUSTOMER);
ALTER TABLE SUPPLIER
ADD SUPP_PAYMNT DECIMAL(7,2);
ALTER TABLE EMPLOYEE
ADD EMP_ADDR varchar(50);
ALTER TABLE EMPLOYEE
ADD EMP_HIREDATE date;
ALTER TABLE CUSTOMER
ADD CUST_PAYMNT decimal(7,2);

5.2 SQL COMMAND

Simple Query
1. List down all the employee whose name start with H.
SELECT * FROM EMPLOYEE
WHERE EMP_NAME LIKE H%
ORDER BY EMP_ID
2. List track number and track time where the date of the track
is 16th May 2016
SELECT TCK_ID, TCK_TIME
FROM TRACKING
WHERE TCK_DATE='2016-05-07'
3. List all customer that pay within RM100 to RM300. Display
the customer ID and name.
select cust_id, cust_name, cust_paymnt
from customer
where cust_paymnt between 100 and 300
order by cust_id
Group Function
4. Count all customer who bought at OUTLET 1. Display the
data by customer ID.
SELECT CUST_ID, COUNT(DISTINCT OUTLET_ID)
FROM CUSTOMER
WHERE OUTLET_ID='U01'
GROUP BY CUST_ID

5. Display the employee that have the highest and lowest


salary. Sort the output by employee ID.
SELECT EMP_ID, MAX(EMP_SALARY), MIN(EMP_SALARY)
FROM EMPLOYEE
GROUP BY EMP_ID

6. Calculate the average of all customers payment. Sort the


output by outlet ID.
select outlet_id, avg(cust_paymnt)
from customer
group by outlet_id
having avg(cust_paymnt)< 500
7. Calculate the total of all profit gained all outlet. Display the
data by outlet ID.
select outlet_id, sum(cust_paymnt)
from customer
group by outlet_id
Subquery
8. List all customers ID, customers name and customers
payment. Display the info of the customer with the highest
payment.
SELECT CUST_ID, CUST_NAME, CUST_PAYMNT
FROM CUSTOMER
WHERE CUST_PAYMNT=(SELECT MAX(CUST_PAYMNT) FROM
CUSTOMER)
ORDER BY CUST_ID

9. List all male employee and their salary which is more than
RM1000. Sort the output by employee ID.
SELECT EMP_NAME, EMP_SEX, EMP_SALARY
FROM EMPLOYEE
WHERE EMP_SEX='M'
AND EMP_SALARY IN(
SELECT EMP_SALARY
FROM EMPLOYEE

WHERE EMP_SALARY>1000)
10.
List all delivery truck on the date 7th May 2016 at
1.50pm. Ordered the result by track ID.
select tck_id, tck_date, tck_time
from tracking
where tck_date='2016-05-07'
and tck_time in(select tck_time from tracking where
tck_time='13.50')
order by tck_id
Join Table
11.
List customers name and their online payment from
table ONLINE and CUSTOMER.
SELECT ONLINE.ONL_PAYMNT, CUSTOMER.CUST_NAME
FROM ONLINE, CUSTOMER
WHERE ONLINE.CUST_ID=CUSTOMER.CUST_ID
12.
List all the deliverys info on address and date from
table TRACKING and OUTLET
SELECT OUTLET.OUTLET_ADD, TRACKING.TCK_DATE
FROM OUTLET, TRACKING
WHERE OUTLET.TCK_ID=TRACKING.TCK_ID
13.
List all customers name and the outlet address from
table CUSTOMER and OUTLET
SELECT CUSTOMER.CUST_NAME, OUTLET.OUTLET_ADD
FROM CUSTOMER, OUTLET
WHERE CUSTOMER.OUTLET_ID=OUTLET.OUTLET_ID
14.
List down employees ID with the delivery date from
table STORE and TRACKING
SELECT STORE.EMP_ID, TRACKING.TCK_DATE
FROM STORE, TRACKING

WHERE STORE.TCK_ID=TRACKING.TCK_ID
15.
List down all customer invoice with their name and
payment.
SELECT ONLINE.ONL_INVOICE, CUSTOMER.CUST_NAME,
CUSTOMER.CUST_PAYMNT
FROM ONLINE, CUSTOMER
WHERE ONLINE.CUST_ID=CUSTOMER.CUST_ID
6.0 CONCLUSION
All the problems on manual system record can be enhance by
implement them on technological system. Not only the record will
be stated safely,it will also help user to manage the data
efficiently.

You might also like