| 49 | | Чекор 0: K+ = {comment_id, ingredient_id, nutrient_id, restriction_id, list_id, planner_id, bio_id} |
| 50 | | |
| 51 | | Чекор 1: секој идентификатор го определува својот ентитет, па K+ ги добива атрибутите на COMMENT, INGREDIENT, NUTRIENT, RESTRICTION, GROCERY_LIST, INTAKE_PLANNER и BIOMETRICS, а со нив post_id и user_id (од comment_id) плус nutrient_amount и buy_quantity (од паровите што веќе се во K+). |
| 52 | | |
| 53 | | Чекор 2: post_id сега е во K+, па ги додава атрибутите на POST и recipe_id; user_id додава email, username, password, role. |
| 54 | | |
| 55 | | Чекор 3: recipe_id сега е во K+, па додава recipe_name, guide, kcal_sum, servings, а со {recipe_id, ingredient_id} и ingredient_quantity. |
| 56 | | |
| 57 | | Чекор 4: едно цело поминување не додава ништо ново. K+ = R. |
| | 49 | K = { comment_id, ingredient_id, nutrient_id, restriction_id, list_id, planner_id, bio_id } |
| | 50 | }}} |
| | 51 | |
| | 52 | {{{ |
| | 53 | Чекор 0 - K+ = K: comment_id, ingredient_id, nutrient_id, restriction_id, list_id, planner_id, bio_id |
| | 54 | |
| | 55 | Чекор 1 - секој идентификатор ја активира сопствената зависност: |
| | 56 | comment_id → comment_text, comment_created_at, post_id, user_id; |
| | 57 | ingredient_id → ingredient_name, ingr_description, energy, kcal, ingr_type; |
| | 58 | nutrient_id → nutr_description, rdi_quantity, unit, nutr_type; |
| | 59 | restriction_id → restr_description, restr_type; |
| | 60 | list_id → list_date_time, list_notes, is_bought, list_kcal; |
| | 61 | planner_id → planner_date_time, planner_notes, planner_kcal, is_consumed; |
| | 62 | bio_id → bio_date, weight, height, age, muscle_fat_ratio; |
| | 63 | {ingredient_id, nutrient_id} → nutrient_amount; |
| | 64 | {list_id, ingredient_id} → buy_quantity |
| | 65 | |
| | 66 | Чекор 2 - post_id и user_id влегоа во K+ во чекор 1, па сега се активираат: |
| | 67 | post_id → media, media_type, media_name, is_private, is_favourite, status, post_created_at, recipe_id; |
| | 68 | user_id → email, username, password, role |
| | 69 | |
| | 70 | Чекор 3 - recipe_id влезе во K+ во чекор 2: |
| | 71 | recipe_id → recipe_name, guide, kcal_sum, servings; |
| | 72 | {recipe_id, ingredient_id} → ingredient_quantity |
| | 73 | |
| | 74 | Чекор 4 - цело поминување низ зависностите не додава ништо -> К+ = R |
| | 75 | |
| | 150 | Остаточна релација: |
| | 151 | {{{ |
| | 152 | R′1 ( user_id, ingredient_id, ingredient_name, ingr_description, energy, kcal, ingr_type, nutrient_id, nutr_description, rdi_quantity, unit, nutr_type, restriction_id, restr_description, restr_type, recipe_id, recipe_name, guide, kcal_sum, servings, post_id, media, media_type, media_name, is_private, is_favourite, status, post_created_at, comment_id, comment_text, comment_created_at, list_id, list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity ) |
| | 153 | }}} |
| | 154 | |
| | 155 | * lossless тест: R1 ∩ R′1 = {user_id}; {user_id} → R1 |
| | 168 | Остаточна релација: |
| | 169 | {{{ |
| | 170 | R′2 ( user_id, ingredient_id, nutrient_id, nutr_description, rdi_quantity, unit, nutr_type, restriction_id, restr_description, restr_type, recipe_id, recipe_name, guide, kcal_sum, servings, post_id, media, media_type, media_name, is_private, is_favourite, status, post_created_at, comment_id, comment_text, comment_created_at, list_id, list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity ) |
| | 171 | }}} |
| | 172 | * lossless тест: R2 ∩ R′2 = {ingredient_id}; {ingredient_id} → R2 |
| | 173 | |
| | 185 | Остаточна релација: |
| | 186 | |
| | 187 | {{{ |
| | 188 | R′3 ( user_id, ingredient_id, nutrient_id, restriction_id, restr_description, restr_type, recipe_id, recipe_name, guide, kcal_sum, servings, post_id, media, media_type, media_name, is_private, is_favourite, status, post_created_at, comment_id, comment_text, comment_created_at, list_id, list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity ) |
| | 189 | }}} |
| | 190 | |
| | 191 | |
| | 192 | * lossless тест: R3 ∩ R′3 = {nutrient_id}; {nutrient_id} → R3 |
| | 193 | |