You are on page 1of 5

Database Design/Schema

The project Online Application for Salon Management System with Mobile App Support has a
total of 7
tables and the tables are the following:

tblusers (userid, username, password, completename, contact, address, usercategory)

CREATE TABLE tblusers'(


userid' int(11) NOT NULL,
'username' varchar(30) NOT NULL,
password varchar(30) NOT NULL
completename' varchar(50) NOT NULL,
'contact' varchar(11) NOT NULL,
address' varchar(100) NOT NULL,
'usercategory' varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Users table will store the information of users of the system such as the username, password,
name,

contact, address and user category. User category has two types, the administrator or
manager and the

employee or cashier

tblproducts (productid, productname, description, capitalprice, retailprice, discount,


quantity,
expirydate)

CREATE TABLE tblproducts (


productid' int(11) NOT NULL,
productname' varchar(50) NOT NULL,
description varchar(100) NOT NULL,
capitalprice double NOT NULL,
retailprice double NOT NULL,
discount double NOT NULL,
quantity int{11) NOT NULL,
expirydate date NOT NULL
ENGINE=InnoDB DEFAULT CHARSET=latin1;
Products table will store information of the different products in salon that is for sale, the
information
includes then product name, description, capital price, the retail price, discount if any, the
quantity in

the inventory and the expiry date.

tblservices (serviceid, servicename, description, price, discount)

CREATE TABLE tblservices(


serviceid int(11) NOT NULL,
servicename" varchar(50) NOT NULL
description' varchar(100) NOT NULL,
price double NOT NULL,
discount' double NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Services table will store informati on on the different service offered by the salon, the
information

includes thne name or tne service, detailed description, price and tne discournted price.

tblsales (salesid, customerid, productserviceid, qty, discountedprice, subtotal, daterecorded,


saletype,
userid)

CREATE TABLE tbIsales


salesid' int(11) NOT NULL,

Customerid' int(11) NOT NULL,

productserviceid' int{11) NOT NULL

qty' int(11) NOT NULL,

discountedprice double NOT NULL,


subtotal double NOT NULL
daterecorded date NoT NULL,
'saletype' varchar (10) NOT NULL,
userid' int(11) NOT NULL
ENGINE=InnoDB DEFAULT CHARSET=latin1;
Sales table will store information on the product sold or the service that was availed by the
customer.
The table also includes the customer information, discounted price, subtotal, the date of
transaction,

transacti on type which is either product sale or service.

tblblog (blogid, blottitle, content, daterecorded, timerecorded, userid)

CREATE TABLE tbIblog


blogid' int(11) NOT NULL,
Dioghtle varchar(60) NOT NULL,
content' varchar(500) NOT NULL,
daterecorded' date NOT NULL,
timerecorded' time NOT NOLL,

userid' int(11) NOT NULL


ENGINE=InnoDB DEFAULT CHARSET=latin1;

Blog table is used to store information about the news, updates and other information that
will be
posted on the website of the application,

tblcustomers (customerid, customername, Contact, address, emai, gender, uSername,


password,

accountstatus)

CREATE TABLE tblcustomers'(


Customerid' int{11) NOT NULL,
customername' varchar(50) NOT NULL,
contact' varchar(11) NOT NULL,
address' varchar(100) NOT NULL,
email' varchar(50) NOTNULL,
gender int{2) NOT NULL,
username' varchar(30) NOT NULL,

password varchar(30) NOT NULL,


tdus int(2) NOT NULL
ENGINE=InnoDB DEFAULT CHARSET=latinl;

accounts

Customers table is used to hold information of the customers such as the name, contact,
address, email,

gender, username, password and the account statusif it is verified or not. This table is also used
of the
registration of new members or customers of the salon.

tblappointment (appoin tmentid, appoinmentdate, appointmenttime, Customerid,


appointmentdetails,

Status, remarks)

CREATE TABLE tblappointment'(


dppointmentid int(11) NOT NULL,
3ppoinmentdate date NOT NULL,
ppointmenttme nme NOT NULL,
customerid intil) NOT NOLl,
appointmen tdetails' varchar(100) NOT NULL,

status int{2) NOT NULL,


remarks' varchar(100) NOT NULL
ENGINE-InnoDB DEFAULT CHARSET=latin1;
Appointment table is the table used to store the booking of customers. The information
includes the
appointment date, the appointment time, customer information, details of appointment, status
of the

booking if it is confirmed, cancelled or rescheduled, remarks refers to the explanation,


comments or
reason of the booking.

You might also like