| | 1 | {{{#!sql |
| | 2 | -- PRODUCT |
| | 3 | INSERT INTO product (price, availability, weight, width_x_length_x_depth, aprox_production_time, description, delivery_cost) VALUES |
| | 4 | (700, 50, 2.5, '30x20x10', 10, 'Handmade wooden chair with oak wood', '50'), |
| | 5 | (150, 10, 0.2, '20x20x15', 2, 'Heart crochet', '0'), |
| | 6 | (199, 100, 0.75, '40x40x1', 14, 'Decorative wall hanging made with beads', '0'); |
| | 7 | |
| | 8 | -- IMAGE |
| | 9 | INSERT INTO image (product_code, image) VALUES |
| | 10 | (1, 'chair.jpg'), |
| | 11 | (2, 'crochet.jpg'), |
| | 12 | (3, 'wall_hanging.jpg'); |
| | 13 | |
| | 14 | |
| | 15 | -- COLOR |
| | 16 | INSERT INTO color (product_code, color) VALUES |
| | 17 | (1, 'Brown'), |
| | 18 | (2, 'Blue'), |
| | 19 | (2, 'Red'), |
| | 20 | (2, 'Yellow'), |
| | 21 | (2, 'Green'), |
| | 22 | (3, 'White and Pink'), |
| | 23 | (3, 'Black and Gold'), |
| | 24 | (3, 'Orange, Green and Purpule); |
| | 25 | |
| | 26 | |
| | 27 | -- STORE |
| | 28 | INSERT INTO store (name, date_of_founding, physical_address, store_email, rating) VALUES |
| | 29 | ('WoodCraft Skopje', '2015-03-12', 'st.Ilindenska 45, Skopje 1000, Macedonia', 'contact@woodcraft.mk', 4.6), |
| | 30 | ('Fox Crochets', '2023-06-01', 'st.Kej Makedonija 12, Ohrid 6000, Macedonia', 'ohrid@woodcraft.mk', 4.8); |
| | 31 | |
| | 32 | |
| | 33 | -- PERSONAL |
| | 34 | INSERT INTO personal (ssn, first_name, last_name, email, password) VALUES |
| | 35 | ('1234567890123', 'Marko', 'Petrovski', 'marko@woodcraft.mk', 'Havr6njs09$hdgs'), |
| | 36 | ('9876543210987', 'Antonio', 'Trajkovski', 'antonio@woodcraft.mk', 'GKm78BHs&vJHA'), |
| | 37 | ('4567891234567', 'Sara', 'Vaneva', 's.vaneva@foxcrochets.mk', 'hY69Btvhs90'); |
| | 38 | |
| | 39 | |
| | 40 | -- PERMISSIONS |
| | 41 | INSERT INTO permissions (personal_SSN, type, authorisation) VALUES |
| | 42 | ('1234567890123', 'BOSS', 'FULL'), |
| | 43 | ('9876543210987', 'EMPLOYEE', 'LIMITED'), |
| | 44 | ('4567891234567', 'BOSS', 'FULL'); |
| | 45 | |
| | 46 | |
| | 47 | -- BOSS |
| | 48 | INSERT INTO boss (boss_SSN) VALUES |
| | 49 | ('1234567890123'), |
| | 50 | ('4567891234567'); |
| | 51 | |
| | 52 | |
| | 53 | -- EMPLOYEES |
| | 54 | INSERT INTO employees (employee_SSN, date_of_hire) VALUES |
| | 55 | ('9876543210987', '2019-09-01'); |
| | 56 | |
| | 57 | |
| | 58 | -- CLIENT |
| | 59 | INSERT INTO client (first_name, last_name, email, password) VALUES |
| | 60 | ('Ivan', 'Stojanov', 'ivan@gmail.com', 'ivanpass'), |
| | 61 | ('Marija', 'Kostova', 'marija@yahoo.com', 'marijapass'); |
| | 62 | |
| | 63 | |
| | 64 | -- DELIVERY_ADDRESS |
| | 65 | INSERT INTO delivery_address (client_ID, address) VALUES |
| | 66 | (1, 'st.Partizanska 10, Skopje 1000, Macedonia'), |
| | 67 | (2, 'st.Turisticka 5, Bitola 7000, Macedonia'); |
| | 68 | |
| | 69 | |
| | 70 | -- ORDER |
| | 71 | INSERT INTO "order" (order_num, client_ID, quantity, status, last_date_mod, payment_method, discount) VALUES |
| | 72 | (1, 1, 2, 'placed order', '2025-12-01 10:15:00', 'credit card ****6750', 0.0), |
| | 73 | (2, 1, 2, 'packaging', '2025-12-10 18:00:00', 'PayPal account *******', 0.0), |
| | 74 | (3, 2, 1, 'delivered', '2025-12-02 14:30:00', 'cash', 4.0); |
| | 75 | |
| | 76 | |
| | 77 | -- REPORT |
| | 78 | INSERT INTO report (date, store_ID, overall_profit, sales_trend, marketing_growth, owner_signature) VALUES |
| | 79 | ('2024-11-30 23:59:59', 1, 125000.00, 'Increasing', 'Stable growth', 'M.Petrovski'), |
| | 80 | ('2024-11-30 23:59:59', 2, 98000.00, 'Stable', 'Moderate growth', 'S.Vaneva'); |
| | 81 | |
| | 82 | |
| | 83 | -- MONTHLY_PROFIT |
| | 84 | INSERT INTO monthly_profit (report_date, store_ID, month_and_year, profit) VALUES |
| | 85 | ('2024-11-30 23:59:59', 1, '2024-11-01', 12500.00), |
| | 86 | ('2024-11-30 23:59:59', 2, '2024-11-01', 8000.00); |
| | 87 | |
| | 88 | |
| | 89 | -- REQUEST |
| | 90 | INSERT INTO request (request_num, date_and_time, problem, notes_of_communication, costumer_satisfaction) VALUES |
| | 91 | (1, '2024-12-03 11:20:00', 'Late delivery', 'Apologized and offered discount', 4.0), |
| | 92 | (2, '2024-12-04 09:10:00', 'Military discount', 'Discount approved', 5.0); |
| | 93 | |
| | 94 | |
| | 95 | -- MAKES_REQUEST |
| | 96 | INSERT INTO makes_request (client_ID, request_num) VALUES |
| | 97 | (1, 1), |
| | 98 | (2, 2); |
| | 99 | |
| | 100 | |
| | 101 | -- ANSWERS |
| | 102 | INSERT INTO answers (request_num, personal_SSN) VALUES |
| | 103 | (1, '4567891234567'), |
| | 104 | (2, '1234567890123'); |
| | 105 | |
| | 106 | -- FOR_STORE |
| | 107 | INSERT INTO for_store (request_num, store_ID) VALUES |
| | 108 | (1, 2), |
| | 109 | (2, 1); |
| | 110 | |
| | 111 | -- REVIEW |
| | 112 | INSERT INTO review (order_num, comment, rating, last_mod_date) VALUES |
| | 113 | (1, 'Great quality, slightly late delivery', 4.0, '2024-12-05 18:00:00'); |
| | 114 | |
| | 115 | |
| | 116 | -- CHANGE |
| | 117 | INSERT INTO change (date_and_time, product_code, changes) VALUES |
| | 118 | ('2024-11-10 09:00:00', 1, 'Updated production time'), |
| | 119 | ('2024-11-12 15:30:00', 2, 'Added new color'); |
| | 120 | |
| | 121 | |
| | 122 | -- WORKS_IN_STORE |
| | 123 | INSERT INTO works_in_store (personal_SSN, store_ID) VALUES |
| | 124 | ('1234567890123', 1), |
| | 125 | ('9876543210987', 1), |
| | 126 | ('4567891234567', 2); |
| | 127 | |
| | 128 | |
| | 129 | -- WORKED |
| | 130 | INSERT INTO worked (personal_SSN, report_date, store_ID, wage, pay_method, total_hours, week) VALUES |
| | 131 | ('1234567890123', '2025-11-30 23:59:59', 1, 75, 'hourly', 48, '2025-11-24 - 2025-11-30'), |
| | 132 | ('9876543210987', '2025-11-30 23:59:59', 1, 75, 'hourly', 38, '2025-11-24 - 2025-11-30'), |
| | 133 | ('4567891234567', '2025-11-30 23:59:59', 2, 450, 'weekly', 52, '2025-11-24 - 2025-11-30'); |
| | 134 | |
| | 135 | |
| | 136 | -- SELLS |
| | 137 | INSERT INTO sells (product_code, store_ID, discount) VALUES |
| | 138 | (1, 1, 0.0), |
| | 139 | (2, 2, 0.0), |
| | 140 | (3, 2, 0.5); |
| | 141 | |
| | 142 | |
| | 143 | -- INCLUDES |
| | 144 | INSERT INTO includes (order_num, product_code) VALUES |
| | 145 | (1, 1), |
| | 146 | (2, 3), |
| | 147 | (3, 2); |
| | 148 | |
| | 149 | |
| | 150 | -- APPROVES |
| | 151 | INSERT INTO approves (boss_SSN, report_date, store_ID, owner_signature) VALUES |
| | 152 | ('1234567890123', '2025-12-01 09:56:30', 1, 'M.Petrovski'), |
| | 153 | ('4567891234567', '2025-12-03 13:06:12', 2, 'S.Vaneva'); |
| | 154 | |
| | 155 | |
| | 156 | -- EXCHANGES_DATE |
| | 157 | INSERT INTO exchanges_date (report_date, store_ID, monthly_profit, date, sales, damages) VALUES |
| | 158 | ('2024-11-30 23:59:59', 1, 38750.00, '2024-12-01 08:00:00', 52, 750), |
| | 159 | ('2024-11-30 23:59:59', 2, 26150, '2024-12-01 08:00:00', 40, NULL); |
| | 160 | }}}; |