RelationalDesign: populate.sql

File populate.sql, 3.9 KB (added by 202033, 3 weeks ago)
Line 
1
2INSERT INTO "User" (full_name, email, phone, created_at) VALUES
3('Emma Johnson', 'emma.johnson@email.com', '555-0101', '2024-01-15 10:30:00'),
4('Sophia Martinez', 'sophia.martinez@email.com', '555-0102', '2024-01-20 14:15:00'),
5('Olivia Brown', 'olivia.brown@email.com', '555-0103', '2024-02-01 09:00:00'),
6('Isabella Davis', 'isabella.davis@email.com', '555-0104', '2024-02-10 11:45:00'),
7('Mia Wilson', 'mia.wilson@email.com', '555-0105', '2024-02-15 16:20:00');
8
9
10INSERT INTO Role (name) VALUES
11('Customer'),
12('Stylist'),
13('Manager'),
14('Receptionist');
15
16
17INSERT INTO Category (name) VALUES
18('Hair Services'),
19('Nail Services'),
20('Spa & Massage'),
21('Facial Treatments');
22
23
24INSERT INTO Status (name) VALUES
25('Scheduled'),
26('Completed'),
27('Cancelled'),
28('No-Show');
29
30
31INSERT INTO Service (name, price, duration_minutes, category_id) VALUES
32('Women Haircut & Style', 65.00, 60, 1),
33('Hair Coloring', 120.00, 120, 1),
34('Blowout', 45.00, 45, 1),
35('Deep Conditioning Treatment', 55.00, 30, 1),
36('Manicure', 35.00, 45, 2),
37('Pedicure', 50.00, 60, 2),
38('Gel Nails', 65.00, 75, 2),
39
40
41('Swedish Massage', 90.00, 60, 3),
42('Hot Stone Massage', 115.00, 75, 3),
43('Aromatherapy Massage', 100.00, 60, 3),
44
45
46('Classic Facial', 80.00, 60, 4),
47('Anti-Aging Facial', 110.00, 75, 4),
48('Hydrating Facial', 85.00, 60, 4);
49
50
51INSERT INTO Package (name, max_usage) VALUES
52('Pamper Package', 5),
53('Bridal Beauty Package', 3),
54('Monthly Wellness Package', 10);
55
56
57
58INSERT INTO PackageService (package_id, service_id, discounted_price) VALUES
59
60(1, 1, 55.00),
61(1, 5, 28.00),
62(1, 6, 42.00),
63(1, 11, 70.00),
64
65(2, 2, 100.00),
66(2, 3, 38.00),
67(2, 7, 55.00),
68(2, 12, 95.00),
69
70(3, 8, 75.00),
71(3, 10, 85.00),
72(3, 13, 72.00);
73
74
75
76INSERT INTO UserRole (user_id, role_id) VALUES
77(1, 1),
78(2, 1),
79(2, 2),
80(3, 1),
81(4, 3),
82(5, 1),
83(5, 4);
84
85
86INSERT INTO Appointment (appointment_time, end_time, notes, type, total_price, user_id, status_id) VALUES
87('2025-01-10 10:00:00', '2025-01-10 11:15:00', 'Client requested layers and face-framing. Very happy with results!', 'pre-booked', 110.00, 1, 2),
88
89('2025-01-15 14:00:00', '2025-01-15 15:45:00', 'Walk-in for manicure and pedicure. Used loyalty points for discount.', 'walk-in', 85.00, 2, 2),
90
91('2025-01-20 09:30:00', '2025-01-20 11:00:00', 'Requested Swedish massage with medium pressure. First-time client, explained all procedures.', 'pre-booked', 90.00, 3, 2),
92
93('2025-02-10 11:00:00', '2025-02-10 12:30:00', 'Follow-up hair coloring appointment. Wants to go lighter.', 'pre-booked', 120.00, 1, 1),
94
95('2025-01-25 16:00:00', '2025-01-25 17:15:00', 'Client called to cancel due to emergency. Offered to reschedule.', 'pre-booked', 110.00, 5, 3);
96
97
98INSERT INTO AppointmentService (appointment_id, service_id) VALUES
99(1, 1),
100(1, 3),
101
102(2, 5),
103(2, 6),
104
105(3, 8),
106
107(4, 2),
108
109(5, 12),
110(5, 4);
111
112
113INSERT INTO Payment (amount, method, timestamp, status, appointment_id) VALUES
114(110.00, 'Credit Card', '2025-01-10 11:20:00', 'Completed', 1),
115
116(85.00, 'Debit Card', '2025-01-15 15:50:00', 'Completed', 2),
117
118(90.00, 'Cash', '2025-01-20 11:05:00', 'Completed', 3),
119
120(110.00, 'Credit Card', '2025-01-25 16:30:00', 'Refunded', 5);
121
122
123
124INSERT INTO Review (rating, comment, created_at, payment_id) VALUES
125(5, 'Absolutely loved my haircut! The stylist listened to exactly what I wanted and delivered beyond my expectations. The blowout was perfect and lasted for days. Will definitely be back!', '2025-01-10 18:30:00', 1),
126
127(4, 'Great service overall. The manicure and pedicure were well done and the salon was very clean. Only minor issue was a short wait time, but the quality made up for it. Good value for money.', '2025-01-16 10:15:00', 2),
128
129(5, 'Best massage I have ever had! The therapist was professional and really worked out all my tension. The ambiance was so relaxing. I felt like a new person afterwards. Highly recommend!', '2025-01-20 14:45:00', 3);
130
131
132INSERT INTO LoyaltyCard (points, user_id) VALUES
133(110, 1),
134
135(85, 2),
136
137(90, 3);
138