You are on page 1of 13

Acknowledgement

Apart from the efforts of me, the success of any project depends largely on the
encouragement andguidelines of many others. I take this opportunity to express
mygratitude to the people who have been instrument alin the successful
completion of this project.
I express deep sense ofgratitude to ahnighty God forgiving me strength for the
successful completion of the project.
I express my heartfelt gratitude to my parents for constant encouragement
while canying out this project.
I gratefully acknowledge the contribution ofthe individuals who contributed in
bringing this projcct up to this level, who continues to look after me despite my
flaws.

The guidance and support received from all the members who contributed
and who are contributing to this project, was vital for the success of the
project. I am grateful for their constant support and help
Table structure
1)Table name : customer_details

Description : to store the customer personal information


Primary key (C_ID)

SR.N o: FIELD DATA CONSTRA DESCRIP TION


NAME TYPE INTS

1 c_1D Varchar(l Primary


0)
To store unique
key id of every
customer

2 C_Nam Varchar(4 Not null


e 0)
To store name
of the customer
3 C_Addr Varchar(l Not null To store the
ess 00) address of the
customer
4 C_Age Numeric( Not null To store age
3,0)

5 C_Num Numeric( Not null, To store


ber 10,0 must be 10 phone no
6
C_Emai Varchar(3 0) Not null , To store email
I
@ must be
resent

2) Table name : Booking_Record

Description :to store the details of customers booking


Primary key: R_NO

Sr.n Field datatype constraint descriptio


o name n
1 Date Date Not null Date of
bookin
2 R_cod Varchar(10) Not To store
e null,referen unique id
ce of each
customer
3 C_Nam Varchar(20) Not null To store
e name of
customer
4 Gender char Not null, M To store
ender
5 P_no Numeric(10, Not null, To store
0 must be 10 hone no:
C_Ema Varchar(30) Not null , To store
i @ must be email
resent

3) Table name : fitness detail


Description : to store schedule and details of fitness
center
Primary key: F_code
Sr.no Field Data type Constraint Description
name
C_Code Varchar(10) Primary To store
key unique id
of each
customer
2 Arrival date Date and Not null To store
time arrival
date
3 Departure Date and Not null To store
date time departure
date

4)Table name : center reservation


Description : to store info on reservation
details
Primary key : R_Code
Foereign key : C_ID , R_CODE, Age
Sr.no Field Constraints Descri
name data e tion
1 R_CODE Varchar(10) Not null,
reference
To store
the unique
iD of each
reservation
2 c_lD Varchar(10) Not, null To store
the
unique ID
of each
customer
3 C_AGE Numeric(3,0) Not null To store

4 CHECK_IN date Not null To


store
check
in date
5 CHECK_OUT date Not null To store
check out
date
6 C_Address Varchar(10) Not null To store
address of

import mysql.connector
mycon=mysql.connector.connect(host="localhost",user="root",
passwd="tiger",database="gis")
if mycon.is connected©:
print ("successfully connected")
else:
("My sql Connection problem")
#
import mysql.connector

import pandas as pd

mycon= mysql.connector.connect(host="localhost" user="root"


passwd="tiger", database="fit _project", auth plugin='mysql_ native password')

if mycon.is_connected©:

print ("Connected")

yes no=y

while yes no==y' or yes no=="Y":

print("***********")

print(" FITNESS CENTER\")

print("*************************************")

print (" 1. Inserting a record into the customer table \n")

print(" 2. Displaying all the records of the customer table\n")

print(" 3. Updating a customer record in the customer table \n")


print(" 4. Deleting a customer record\n")

print("********************")

choice='1'

cursor=mycon.cursor®

choice=input ("Select your option:")

print(".----------------------------------------- “)

if choice=="1"

print(".-Insert a new customer detail-----/n")

print("Enter the details of customer : \n")

customerid=int(input("Enter customerNo: \n"))

custName=input ("Enter customername: \n")

dob=input("Enter date of birth: \n")

phone=int (input("Enter customer phone number: \n"))

address=input ("Enter address of customer: \n")

st="insert into customer values(0:0 0,0: 0)". format (customerid, custName,dob,phone,address)

print(st)

cursor.execute(st)

print(" successfully inserted One row")

mycon.commit()

print(".-----------------------------------------")

if choice=="2":

df1=pd.read_sq|("select * from customer,", mycon)

df1=pd.read_sql(“selesct* from coustomer;”,mycon)

print(df1)

print(“-----------------------------------------“)

You might also like