Question: - - Create Users INSERT INTO Users ( user _ id , name, email, phone _ number, password, user _ type ) VALUES ( 1

-- Create Users
INSERT INTO Users (user_id, name, email, phone_number, password, user_type)
VALUES
(1, 'Admin_1', 'admin1@example.com', '1234567890', 'admin1password', 'Admin'),
(2, 'Admin_2', 'admin2@example.com', '1234567891', 'admin2password', 'Admin'),
(3, 'Admin_3', 'admin3@example.com', '1234567892', 'admin3password', 'Admin'),
(4, 'Admin_4', 'admin4@example.com', '1234567893', 'admin4password', 'Admin'),
(5, 'Admin_5', 'admin5@example.com', '1234567894', 'admin5password', 'Admin');
-- Create Appointments
INSERT INTO Appointments (appointment_id, user_id, service_type, appointment_date, appointment_time)
VALUES
(1,1, 'manicure', '2024-05-15','09:00:00'),
(2,2, 'pedicure', '2024-05-16','10:00:00'),
(3,3, 'hair', '2024-05-17','11:00:00'),
(4,4, 'beauty treatment', '2024-05-18','12:00:00'),
(5,5, 'manicure', '2024-05-19','13:00:00'),
(6,1, 'pedicure', '2024-05-20','14:00:00'),
(7,2, 'hair', '2024-05-21','15:00:00'),
(8,3, 'beauty treatment', '2024-05-22','16:00:00'),
(9,4, 'manicure', '2024-05-23','17:00:00'),
(10,5, 'pedicure', '2024-05-24','18:00:00');
-- Create Services
INSERT INTO Services (service_id, service_name, service_type, price)
VALUES
(1, 'Manicure 1', 'manicure', 20),
(2, 'Manicure 2', 'manicure', 25),
(3, 'Manicure 3', 'manicure', 30),
-- Repeat for pedicure, hair, and beauty treatment services --
-- Create Notifications to Users
INSERT INTO Notifications (notification_id, notification_type, notification_message, notification_date, is_read)
SELECT
notification_id,
'upcoming appointment',
CONCAT('Your upcoming appointment is on ', appointment_date, ' at ', appointment_time),
NOW(),
0
FROM
Appointments
LIMIT
30;
-- Create Notifications to Admins
INSERT INTO Notifications (notification_id, notification_type, notification_message, notification_date, is_read)
SELECT
notification_id,
'new appointment',
'A new appointment has been scheduled',
NOW(),
0
FROM
Appointments
LIMIT
15;
can you please do this in a json file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!