Changes between Version 18 and Version 19 of Normalization


Ignore:
Timestamp:
09/24/26 10:34:28 (5 days ago)
Author:
201165
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Normalization

    v18 v19  
    150150Остаточна релација:
    151151{{{
    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 )
     152R′1 ( user_id, ingredient_id, ingredient_name, ingr_description, energy, kcal, ingr_type, nutrient_id, nutr_description,
     153rdi_quantity, unit, nutr_type, restriction_id, restr_description, restr_type, recipe_id, recipe_name, guide, kcal_sum, servings,
     154post_id, media, media_type, media_name, is_private, is_favourite, status, post_created_at, comment_id, comment_text,
     155comment_created_at, list_id, list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, planner_notes,
     156planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount,
     157buy_quantity )
    153158}}}
    154159
    … …  
    158163|| 6 || acko@lavurovski.com || acko_l || testPass@1 || admin ||
    159164|| 8 || marija.trajko@gmail.com || marija_t || testPass@1 || user ||
    160 * Спојување без загуба во случајов се изведува од R1 ∩ R′ = {user_id}
     165
    161166
    162167=== R2 - INGREDIENT
    … …  
    166171{ingredient_id} → {ingredient_name, ingr_description, energy, kcal, ingr_type}
    167172}}}
    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 }}}
     173
     174Остаточна релација:
     175{{{
     176R′2 ( user_id, ingredient_id, nutrient_id, nutr_description, rdi_quantity, unit, nutr_type, restriction_id, restr_description,
     177restr_type, recipe_id, recipe_name, guide, kcal_sum, servings, post_id, media, media_type, media_name, is_private, is_favourite,
     178status, post_created_at, comment_id, comment_text, comment_created_at, list_id, list_date_time, list_notes, is_bought, list_kcal,
     179planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio,
     180ingredient_quantity, nutrient_amount, buy_quantity )
     181}}}
     182
    172183* lossless тест: R2 ∩ R′2 = {ingredient_id}; {ingredient_id} → R2
    173184
    … …  
    176187|| 26 || Onion || White or Red, will make you cry || 167 || 40 || vegetable ||
    177188|| 28 || Bread || Plain Bread || 1000 || 40 || carbs ||
    178 * Спојување без загуба во случајов се изведува од R1 ∩ R′ = {ingredient_id}
     189
    179190
    180191=== R3 - NUTRIENT
    … …  
    195206|| 1 || Protein || 50 || gram || macro ||
    196207|| 9 || Vitamin C || 80 || milligram || micro ||
    197 * Спојување без загуба во случајов се изведува од R3 ∩ R′ = {nutrient_id}
     208
    198209
    199210=== R4 - RESTRICTION
    … …  
    202213{restriction_id} → {restr_description, restr_type}
    203214}}}
     215Остаточна релација:
     216
     217{{{
     218R′4 ( user_id, ingredient_id, nutrient_id, restriction_id, recipe_id, recipe_name, guide, kcal_sum, servings, post_id, media,
     219media_type, media_name, is_private, is_favourite, status, post_created_at, comment_id, comment_text, comment_created_at, list_id,
     220list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed,
     221bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity )
     222}}}
     223
     224* lossless тест: R4 ∩ R′4 = {restriction_id}, а {restriction_id} → R4
     225
    204226||= restriction_id =||= restr_description =||= type =||
    205227|| 12 || No animal origins || vegan ||
    206228|| 20 || Only animal origins || carnivore ||
    207 * Спојување без загуба во случајов се изведува од R4 ∩ R′ = {restriction_id}
    208229=== R5 - RECIPE
    209230Проверка на кандидат-клучот: recipe_id е примарен клуч. user_id е надворешен клуч кон R1.
    … …  
    211232{recipe_id} → {recipe_name, guide, kcal_sum, servings, user_id}
    212233}}}
     234Остаточна релација:
     235
     236{{{
     237R′5 ( user_id, ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, media, media_type, media_name, is_private,
     238is_favourite, status, post_created_at, comment_id, comment_text, comment_created_at, list_id, list_date_time, list_notes,
     239is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height,
     240age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity )
     241}}}
     242
     243* lossless тест: R5 ∩ R′5 = {recipe_id, user_id}, а {recipe_id} → R5.
     244//Заедничкото множество е поширако од клучот затоа што надворешните клучеви на R5 остануваат во R′ за надмножество на детерминанта и понатаму е детерминанта.//
    213245
    214246||= recipe_id =||= name =||= guide =||= kcal_sum =||= servings =||= user_id =||
    215247|| 1 || Omlette|| 1.Get Eggs 2... || 1167 || 1 || 2 ||
    216248|| 2 || Cesar Salad || 1. Get Bowl 2... || 2400 || 2 || 3 ||
    217 * Спојување без загуба во случајов се изведува од R5 ∩ R′ = {recipe_id, user_id}
    218249
    219250
    … …  
    223254{post_id} → {media, media_type, media_name, is_private, is_favourite, status, post_created_at, user_id, recipe_id}
    224255}}}
     256Остаточна релација:
     257{{{
     258R′6 ( user_id, ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, comment_id, comment_text, comment_created_at,
     259list_id, list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal,
     260is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity )
     261}}}
     262
     263* lossless тест:  R6 ∩ R′6 = {post_id, user_id, recipe_id}, а {post_id} → R6
     264//Заедничкото множество е поширако од клучот затоа што надворешните клучеви на R6 остануваат во R′ за надмножество на детерминанта и понатаму е детерминанта.//
     265
    225266
    226267||= post_id =||= is_private =||= is_favourite =||= status =||= created_at =||= user_id =||= recipe_id =||=
    227268|| 1 || true || true  || published || 2026-01-30 07:30 || 2 || NULL ||
    228269|| 2 || true  || false || published || 2026-03-20 09:35 || 3 || 1 ||
    229 * Спојување без загуба во случајов се изведува од R6 ∩ R′ = {post_id, user_id, recipe_id}.
     270
     271
    230272=== R7 - COMMENT
    231273Проверка на кандидат-клучот: comment_id е примарен клуч.
    … …  
    233275{comment_id} → {comment_text, comment_created_at, post_id, user_id}
    234276}}}
     277Остаточна релација:
     278
     279{{{
     280R′7 ( user_id, ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, comment_id, list_id, list_date_time, list_notes,
     281is_bought, list_kcal, planner_id, planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height,
     282age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity )
     283}}}
     284
     285* lossless тест:  R7 ∩ R′7 = {comment_id, post_id, user_id}, а {comment_id} → R7
     286//Заедничкото множество е поширако од клучот затоа што надворешните клучеви на R7 остануваат во R′ за надмножество на детерминанта и понатаму е детерминанта.//
     287
    235288||= comment_id =||= description =||= created_at =||= post_id =||= user_id =||
    236289|| 12 || Pozdrav do Baba Rada || 2026-01-30 07:30 || 3 || 1 ||