Professional Documents
Culture Documents
Axax
Axax
Kampus Tapah
(ITS 332)
STUDENT ID
2015838858
2015818868
Group
Program
:
:
A4CS110-4A
CS110 Diploma in COMPUTER SCIENCE
Prepared for
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.
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.
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.
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
Required
(not null)
PK or
FK
FK
reference
table
SUPP_ID
Varchar(10
)
Varchar(6)
char
YES
char
YES
integer
intege
r
char
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
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
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)
Customers
ID
Online
Invoice
Online
Payment
intege
r
char
Decim
al
Employees
Address
Varchar(50
)
FK
reference
table
char
EMP_HIREDAT
E
Employees
hired date
date
date
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
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.