0% found this document useful (0 votes)
116 views33 pages

Database Cosmetics

This document contains the source code for an automated cosmetics shop management system project. The source code includes functions for inserting cosmetic product data, viewing the cosmetics stock and customer details, allowing customers to purchase products, and removing cosmetic products. The code connects to a MySQL database to perform CRUD operations on tables for products, customers, and purchases.

Uploaded by

Okie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views33 pages

Database Cosmetics

This document contains the source code for an automated cosmetics shop management system project. The source code includes functions for inserting cosmetic product data, viewing the cosmetics stock and customer details, allowing customers to purchase products, and removing cosmetic products. The code connects to a MySQL database to perform CRUD operations on tables for products, customers, and purchases.

Uploaded by

Okie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

DE PAUL PUBLIC SCHOOL,WAYANAD

COMPUTER SCIENCE PROJECT

2021-2022

COSMETIC SHOP AUTOMATION

Prepared by Malavika M Nair


Reg No:
De Paul Public School, Kalpetta
(Affiliated to CBSE Delhi, No: 930148/96)
www.depaulpublicschool.com

Department of Computer Science

CERTIFICATE

This is to certify that this project by Malavika M Nair, Reg


No:. ,student of De Paul public school,
Kalpetta, class XII is in accordance to the syllabus stated
by CBSE board in computer has successfully completed
under the guidance of Department teachers in the
academic year 2021-2022.

Signature of examiner

Signature of internal examiner

Kalpetta
Date:. / /
DECLARATION

I, Malavika M Nair, hereby declare that this project work


entitled ‘COSMETIC SHOP AUTOMATION’ is the result of
our own research and no part of it has been presented
elsewhere. We are solely responsible for any errors in the
work.
The work carried out by me was under the guidance of
Mrs. Pushpa Joseph of Computer science department, De
Paul public school, Wayanad during my higher secondary
course in 2021-22.

Yours faithfully
Malavika M Nair

Signature
Kalpetta
/ /
ACKNOWLEDGEMENT

I, Malavika M Nair of class XIITH A Roll No. would like to

express my sincere gratitude to my computer science teacher Mrs.

Pushpa Joseph, COMPUTER SCIENCE, for her vital support,

guidance and encouragement – without which this project would

not have come forth.

I would also like to express my gratitude to my school DEPAUL

PUBLIC SCHOOL for letting me use the school laboratory.


INDEX

Sr. Particular
No
1 Brief overview of project
2 Need of computerization
3 Advantages of project
4 Limitations of project
5 Source code of project
6 Output screening
7 Future enhancement of project
8 bibliography
OVERVIEW OF THE PROGRAM
Buying new cosmetic products is difficult. It can even be scary for
those who have sensitive skin and are prone to skin trouble. The
information needed to alleviate this problem is on the back of each
product, but it's thought to interpret those ingredient lists unless
you have a background in chemistry.

Instead of buying and hoping for the best, we can use data science
to help us predict which products may be good fits for us. It
includes various function programs to do the above mentioned
tasks.

Data file handling has been effectively used in the program.

The database is a collection of interrelated data to serve multiple


applications. That is database programs create files of information.
So we see that files are worked with most, inside the program.

DBMS

The software required for the management of data is called as


DBMS. It has3 models

• Relation model

• Hierarchical model
• Network model

RELATIONAL MODEL It’s based on the concept on relation. Relation


is the table that consists of rows and columns. The rows of the table
are called tuple and the columns of the table are called attribute.
Numbers of rows in the table is called as cardinality. Number of
columns in the table is called as degree.

HIERARCHICAL MODEL: In this type of model, we have multiple


records for each record. A particular record has one parent record.
No chide record can exist without parent record. In this, the records
are organized in tree (like structure

NETWORK MODEL: In this, the data is represented by collection of


records and relationship is represented by (ink or association.

CHARACTERISTICS OF DB MS: -

• It reduces the redundancy

• Reduction of data in inconsistency

• Data sharing

• Data standardization

DIFFERENT TYPES OF FILES: -BASED ON ACCESS:

• Sequential file

• Serial file

• Random (direct access) file BASED ON STORAGE:

• Text file

• Binary File
NEED FOR COMPUTERISATION

The information needed to alleviate this problem is on the back of


each product, but it's thought to interpret those ingredient lists
unless you have a background in chemistry.

Instead of buying and hoping for the best, we can use data science
to help us predict which products may be good fits for us. It
includes various function programs to do the above mentioned
tasks.
ADVANTAGES OF PROJECT

The automated cosmetic shop management system should deal


with the automation of general workflow and administration
process of the shop. The main processes of the system focus on
customer's request where the system is able to search the most
appropriate products and deliver it to the customers. It should help
the employees to quickly identify the list of cosmetic product that
have reached the minimum quantity and also keep a track of
expired date for each cosmetic product. It should help the
employees to find the rack number in which the product is placed.It
is also Faster and more efficient way
LIMITATIONS of project
Our project meets the following limitations:

 The software is not able to reserve tickets for more than 10 people per
train.
 The fare allotted for every reservation is independent of Kilometres
travelled instead it is set for every mode (AC, Non-AC or General) of each
train.
 The software is made such to carry out reservation in max 15 trains.
 The software does not support multi-day reservation system, i.e., the
reservations cannot be done in advance rather it is carried out for single
day.
 The software does not provide concession in fare rates for children, aged
people, armament etc. i.e., the fare identical for all people.
 The software does not take into consideration the stations falling in
between the source and destination station.
SOURCE CODE OF PROJECT

import os

import platform

import mysql.connector

import pandas as pd

mydb=mysql.connector.connect(host="localhost",user="root",

passwd="root",

database="cosmetics")

mycursor=mydb.cursor()

def cosmeticsInsert():

l=[]

code=int(input("Enter the cosmetic ID number : "))

l.append(code)

name=input("Enter the Cosmetics Name: ")


l.append(name)

company=input("Enter company of Cosmetics : ")

l.append(company)

cost=int(input("Enter the Cost : "))

l.append(cost)

manudate=input("Enter the Date of Manufacture : ")

l.append(manudate)

expdate=input("Enter the Date of Expiry : ")

l.append(expdate)

stud=(l)

sql="insert into product(code,name,company,cost,manudate,expdate) values


(%s,%s,%s,%s,%s,%s)"

mycursor.execute(sql,stud)

mydb.commit()
def cosmeticsView():

print("Select the search criteria : ")

print("1. Roll")

print("2. Name")

print("3. All")

ch=int(input("Enter the choice : "))

if ch==1:

s=int(input("Enter cosmetics ID : "))

rl=(s)

sql="select * from cosmetics where code=%s"

mycursor.execute(sql,rl)

elif ch==2:

s=input("Enter Cosmetics Name : ")

rl=(s)

sql="select * from cosmetics where name=%s"

mycursor.execute(sql,rl)

elif ch==3:

sql="select * from cosmetics"

mycursor.execute(sql)

res=mycursor.fetchall()

print("The Cosmetics Stock details are as follows : ")

print("(Cosmetics ID, Cosmetics Name, Cost, Date of Manufacture, Date of


Expiry)")
for x in res:

print(x)
def viewCustomer():

print("Select the search criteria : ")

print("1. Customer ID")

print("2. Customer Name")

print("3. All")

ch=int(input("Enter the choice : "))

if ch==1:

s=int(input("Enter customer ID : "))

rl=(s)

sql="select * from customer where cust_id=%s"

mycursor.execute(sql,rl)

elif ch==2:

s=input("Enter Cosmetics Name : ")

rl=(s,)

sql="select * from customer where name=%s"

mycursor.execute(sql,rl)

elif ch==3:

sql="select * from customer"

mycursor.execute(sql)

res=mycursor.fetchall()

print("The Cosmetics Stock details are as follows : ")

print("(Cosmetics ID, Cosmetics Name, Cost, Date of Manufacture, Date of


Expiry)")
for x in res:

print(x)
def CustomerPurchase():

print("Please enter the details to purchase cosmetics product :")

sql="select * from customer"

mycursor.execute(sql)

res=mycursor.fetchall()

print("The Cosmetics Stock details are as follows : ")

print("(Cosmetics ID, Cosmetics Name, Cost, Date of Manufacture, Date of


Expiry)")

for x in res:

print(x)

cost=0.0

LI=dict()

ch='y'

tsum=0.0

q1=0

cc=0.0

#while(ch=='y'):

c1=input("Enter the items to be purchased : ")

r1=(c1,)

sql="Select cost from product where name=%s"

mycursor.execute(sql,r1)

res=mycursor.fetchall()

for x in res:
cost=float(x[0])

print (cost)

q1=int(input("Enter the item quantity: "))

cc=q1*cost

print(cc)

tsum=tsum+cc

ch=input("Want to purchase more items:")


else:

L=[]

cid=int(input("Enter customer ID"))

L.append(cid)

cname=input("Enter customer name")

L.append(cname)

phone_no=int(input("Enter Phone no."))

L.append(phone_no)

add=input("Enter Address")

L.append(add)

gender=input("Enter your Gender")

L.append(gender)

member=input("Enter membership")

L.append(member)

cosmme=(L)

sql="insert into customer


(cust_id,cname,c_phoneno,c_address,gender,membership)values (%s,%s,%s,%s,
%s,%s)"

mycursor.execute(sql,cosmme)

mydb.commit()

print("Record of customer saves...")

print("Total cost of item purchased is Rs.",tsum)

def removeCosmetics():

name=input("Enter the cosmetics name to be deleted : ")


rl=(name)

sql="Delete from customer where name=%s"

mycursor.execute(sql,rl)

sql="Delete from customer where cname=%s"

mycursor.execute(sql,rl)

mydb.commit()
def MenuSet(): #Function For The Student Management System

print("Enter 1 : To Add cosmetics product")

print("Enter 2 : To View Complete Cosmetics Stock")

print("Enter 3 : To Purchase any cosmetics Product ")

print("Enter 4 : To Remove any Cosmetic product")

print("Enter 5 : To View Customer Details")

try:

#Using Exceptions For Validation

userInput = int(input("Please Select An Above Option: ")) #Will Take Input


From User

except ValueError:

exit("\nHy! That's Not A Number") #Error Message

else:

print("\n") #Print New Line

if(userInput == 1):

cosmeticsInsert()

elif (userInput==2):

cosmeticsView()

elif (userInput==3):

CustomerPurchase()

elif (userInput==4):

removeCosmetics()

elif (userInput==5):
viewCustomer()

else:

print("Enter correct choice. . . ")

MenuSet()
def runAgain():

runAgn = input("\nwant To Run Again Y/n: ")

while(runAgn.lower() == 'y'):

if(platform.system() == "Windows"):

print(os.system('cls'))

else:

print(os.system('clear'))

MenuSet()

runAgn = input("\nwant To Run Again Y/n: ")

print("Good Bye")

runAgain()
DATABASE
OUTPUT SCREENING
BIBLIOGRAPHy
www.python.org

BOOK – Python by Sumita Arora

You might also like