0% found this document useful (0 votes)
22 views2 pages

ISM SQL Code - Group 8

Sql code
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)
22 views2 pages

ISM SQL Code - Group 8

Sql code
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/ 2

CREATE TABLE Customers (

Customer_id INT PRIMARY KEY AUTO_INCREMENT,

First_name VARCHAR(50),

Last_name VARCHAR(50),

Email VARCHAR(100),

Phone VARCHAR(20),

Address VARCHAR(255)

);

CREATE TABLE Appointments (

Appointment_id INT PRIMARY KEY AUTO_INCREMENT,

Customer_id INT,

Appointment_date DATE,

Start_time TIME,

End_time TIME,

Service_id INT,

FOREIGN KEY (customer_id) REFERENCES Customers(customer_id),

FOREIGN KEY (service_id) REFERENCES Services(service_id)

);

CREATE TABLE Services (

Service_id INT PRIMARY KEY AUTO_INCREMENT,

Service_name VARCHAR(100),

Description TEXT,

Duration INT, -- in minutes

Price DECIMAL(10, 2) – assuming price in dollars

);
CREATE TABLE Payments (

Paym

INSERT INTO Customers (first_name, last_name, email, phone, address)

VALUES (‘John’, ‘Doe’, ‘[email protected]’, ‘123-456-7890’, ‘123 Spa


Street, City’);

INSERT INTO Services (service_name, description, duration, price)

VALUES (‘Massage’, ‘Full body massage’, 60, 80.00);

Similar INSERT statements for other tables (Appointments, Payments,


SaunaReservations) would follow.

You might also like