11 | | ||= user_id =||= email =||= city =||= street =||= phone_number =||= password =||= net_salary =||= gross_salary =||= staffRole_id =||= name =||= stay_length =||= creation_timestamp =||= datetime =||= number_of_people =||= reservation_id =||= customer_id =||= c_email =||= c_street =||= c_city =||= c_phone_num =||= c_password =|| |
12 | | || 1 || test@hotmail.com || Strumica || Mladinska 3 || 70003005 || password1 || 30000 || 40000 || 1 || Server || NULL || 15.7.2025 10:33 || 15.7.2025 20:00 || 4 || 1 || 2 || test2@hotmail.com || Marsal Tito 10 || Strumica || 70001002 || password2 || |
13 | | || 1 || test@hotmail.com || Strumica || Mladinska 3 || 70003005 || password1 || 30000 || 40000 || 1 || Server || NULL || 16.7.2025 10:33 || 17.7.2025 20:00 || 6 || 2 || 2 || test2@hotmail.com || Marsal Tito 10 || Strumica || 70001002 || password2 || |
14 | | || 5 || test5@hotmail.com || Strumica || Mladinska 12 3 || 70005005 || password1 || 20000 || 37000 || 4 || Hostess || NULL || 18.7.2025 10:33 || 18.7.2025 20:00 || 6 || 3 || 2 || test2@hotmail.com || Marsal Tito 10 || Strumica || 70001002 || password2 || |
15 | | || 5 || test5@hotmail.com || Strumica || Mladinska 12 3 || 70005005 || password1 || 20000 || 37000 || 4 || Hostess || NULL || 18.7.2025 10:33 || 18.7.2025 21:00 || 6 || 4 || 3 || test3@hotmail.com || Mladinska 5 || Strumica || 70003003 || password2 || |
16 | | |
17 | | R = {e_id, e_email,e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id, name, stay_length, creation_timestamp, datetime, number_of_people, reservation_id, customer_id, c_email, c_street, c_city, c_phone_number,c_password} |
| 11 | ||= fs_manage_reservation_id =||= employee_id =||= e_email =||= e_city =||= e_street =||= e_phone_number =||= e_password =||= net_salary =||= gross_salary =||= staffRole_id =||= name =||= stay_length =||= creation_timestamp =||= datetime =||= number_of_people =||= reservation_id =||= customer_id =||= c_email =||= c_street =||= c_city =||= c_phone_num =||= c_password =||= table_number =||= seat_capacity |
| 12 | || 1 || 1 || test@hotmail.com || Strumica || Mladinska 3 || 70003005 || password1 || 30000 || 40000 || 1 || Server || NULL || 15.7.2025 10:33 || 15.7.2025 20:00 || 4 || 1 || 2 || test2@hotmail.com || Marsal Tito 10 || Strumica || 70001002 || password2 || 1 || 4 |
| 13 | || 2 || 1 || test@hotmail.com || Strumica || Mladinska 3 || 70003005 || password1 || 30000 || 40000 || 1 || Server || NULL || 16.7.2025 10:33 || 17.7.2025 20:00 || 6 || 2 || 2 || test2@hotmail.com || Marsal Tito 10 || Strumica || 70001002 || password2 || 2 || 8 |
| 14 | || 3 || 5 || test5@hotmail.com || Strumica || Mladinska 12 3 || 70005005 || password1 || 20000 || 37000 || 4 || Hostess || NULL || 18.7.2025 10:33 || 18.7.2025 20:00 || 6 || 3 || 2 || test2@hotmail.com || Marsal Tito 10 || Strumica || 70001002 || password2 || 2 || 8 |
| 15 | || 4 || 5 || test5@hotmail.com || Strumica || Mladinska 12 3 || 70005005 || password1 || 20000 || 37000 || 4 || Hostess || NULL || 18.7.2025 10:33 || 18.7.2025 21:00 || 6 || 4 || 3 || test3@hotmail.com || Mladinska 5 || Strumica || 70003003 || password2 || 3 || 8 |
| 16 | |
| 17 | R = {fs_manage_reservation_id, employee_id, e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id, name, stay_length, creation_timestamp, datetime, number_of_people, reservation_id, customer_id, c_email, c_street, c_city, c_phone_number, c_password, table_number, seat_capacity} |
20 | | - e_id → e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id |
21 | | - staffRole_id → name |
22 | | - reservation_id → e_id, stay_length, creation_timestamp, datetime, number_of_people, customer_id |
23 | | - customer_id → c_email, c_street, c_city, c_phone_number, c_password |
24 | | |
25 | | Left only: reservation_id |
26 | | |
27 | | Left and right: e_id, staffRole_id, customer_id |
28 | | |
29 | | Right only: e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, name, stay_length, creation_timestamp, datetime, number_of_people, c_email, c_street, c_city, c_phone_number, c_password |
30 | | |
31 | | {reservation_id}* = R => reservation_id is the primary key |
| 20 | |
| 21 | fs_manage_reservation_id → reservation_id, employee_id, table_number |
| 22 | |
| 23 | employee_id → e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id |
| 24 | |
| 25 | staffRole_id → name |
| 26 | |
| 27 | reservation_id → stay_length, creation_timestamp, datetime, number_of_people, customer_id, table_number |
| 28 | |
| 29 | customer_id → c_email, c_street, c_city, c_phone_number, c_password |
| 30 | |
| 31 | table_number → seat_capacity |
| 32 | |
| 33 | Left only: fs_manage_reservation_id |
| 34 | |
| 35 | Left and right: employee_id, staffRole_id, customer_id, table_number, reservation_id |
| 36 | |
| 37 | Right only: e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, name, stay_length, creation_timestamp, datetime, number_of_people, c_email, c_street, c_city, c_phone_number, c_password |
| 38 | |
| 39 | {fs_manage_reservation_id}* = R => fs_manage_reservation_id is the primary key |
35 | | Decomposition: |
36 | | Step 1: Decompose R by e_id |
37 | | |
38 | | {e_id}* = { e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id, name} |
39 | | |
40 | | R1 = {e_id, e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id, name} |
41 | | |
42 | | R2 = {e_id, stay_length, creation_timestamp, datetime, number_of_people, reservation_id, customer_id, c_email, c_street, c_city, c_phone_number,c_password} |
| 43 | Decomposition: Step 1: Decompose R by employee_id |
| 44 | |
| 45 | {e_id}* = {employee_id, e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id, name} |
| 46 | |
| 47 | R1 = {employee_id, e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id, name} |
| 48 | |
| 49 | R2 = {employee_id, fs_manage_reservation_id, stay_length, creation_timestamp, datetime, number_of_people, reservation_id, customer_id, c_email, c_street, c_city, c_phone_number,c_password, table_number, seat_capacity} |
45 | | {staffRole_id}*= {staffRole_id, name} |
46 | | |
47 | | R3 = {staffRole_id, name} |
48 | | |
49 | | R4 = {e_id, e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id} |
| 52 | |
| 53 | {staffRole_id}*= {staffRole_id, name} |
| 54 | |
| 55 | R3 = {staffRole_id, name} |
| 56 | |
| 57 | R4 = {employee_id, e_email, e_city, e_street, e_phone_number, e_password, net_salary, gross_salary, tip_precent, staffRole_id} |
52 | | {customer_id}* = {c_email, c_street, c_city, c_phone_number, c_password} |
53 | | |
54 | | R5 = {customer_id, c_email, c_street, c_city, c_phone_number, c_password} |
55 | | |
56 | | R6 = {reservation_id, e_id, stay_length, creation_timestamp, datetime, number_of_people, customer_id} |
| 60 | |
| 61 | {customer_id}* = {customer_id, c_email, c_street, c_city, c_phone_number, c_password} |
| 62 | |
| 63 | R5 = {customer_id, c_email, c_street, c_city, c_phone_number, c_password} |
| 64 | |
| 65 | R6 = {fs_manage_reservation_id, reservation_id, employee_id, stay_length, creation_timestamp, datetime, number_of_people, customer_id, table_number, seat_capacity} |
| 66 | |
| 67 | Step 4: Decompose R6 by table_number |
| 68 | |
| 69 | {table_number}* = {table_number, seat_capacity} |
| 70 | |
| 71 | R7 = {fs_manage_reservation_id, reservation_id, employee_id, stay_length, creation_timestamp, datetime, number_of_people, customer_id, table_number} |
| 72 | |
| 73 | R8 = {table_number, seat_capacity} |
| 74 | |
| 75 | Step 5: Decompose R7 by reservation_id |
| 76 | |
| 77 | {reservation_id}* = {reservation_id, stay_length, creation_timestamp, datetime, number_of_people, customer_id} |
| 78 | |
| 79 | R9 = {fs_manage_reservation_id, reservation_id, employee_id, table_number} |
| 80 | |
| 81 | R10 = {reservation_id, stay_length, creation_timestamp, datetime, number_of_people, customer_id} |
134 | | {oi_id, p_id}+= { oi_timestamp, oi_is_processed, oi_price, pr_id, order_id, oi_quantity, pr_description, tax_class, pr_price, pr_name, manage_inventory, i_quantity, i_restock_level, ca_id, ca_name, ca_is_available, -> p_timestamp, payment_type, amount, tip_amount, employee_id, o_timestamp, o_status, table_number, delivery_address, customer_id, seat_capacity} |
| 160 | {oi_id, p_id}*= {oi_id, p_id, oi_timestamp, oi_is_processed, oi_price, pr_id, order_id, oi_quantity, pr_description, tax_class, pr_price, pr_name, manage_inventory, i_quantity, i_restock_level, ca_id, ca_name, ca_is_available,p_timestamp, payment_type, amount, tip_amount, employee_id, o_timestamp, o_status, table_number, delivery_address, customer_id, seat_capacity} |
144 | | {p_id}+= {p_id, p_timestamp, payment_type, amount, tip_amount, order_id, employee_id, o_timestamp, o_status, table_number, delivery_address, customer_id, seat_capacity} |
| 170 | {p_id}*= {p_id, p_timestamp, payment_type, amount, tip_amount, order_id, employee_id, o_timestamp, o_status, table_number, delivery_address, customer_id, seat_capacity} |