Changes between Version 19 and Version 20 of Normalization
- Timestamp:
- 09/24/26 11:02:09 (5 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Normalization
v19 v20 197 197 198 198 {{{ 199 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 ) 199 R′3 ( user_id, ingredient_id, nutrient_id, restriction_id, restr_description, restr_type, recipe_id, recipe_name, guide, 200 kcal_sum, servings, post_id, media, media_type, media_name, is_private, is_favourite, status, post_created_at, comment_id, 201 comment_text, comment_created_at, list_id, list_date_time, list_notes, is_bought, list_kcal, planner_id, planner_date_time, 202 planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, ingredient_quantity, 203 nutrient_amount, buy_quantity ) 200 204 }}} 201 205 … … 289 293 || 12 || Pozdrav do Baba Rada || 2026-01-30 07:30 || 3 || 1 || 290 294 || 29 || Vkusno i zdravo || 2026-12-10 08:30 || 2|| 5 || 291 * Спојување без загуба во случајов се изведува од R7 ∩ R′ = {comment_id, post_id, user_id}.292 295 293 296 === R8 - GROCERY_LIST … … 296 299 {list_id} → {list_date_time, list_notes, is_bought, list_kcal, user_id} 297 300 }}} 298 301 Одделена релација: 302 303 {{{ 304 R′8 ( user_id, ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, comment_id, list_id, planner_id, 305 planner_date_time, planner_notes, planner_kcal, is_consumed, bio_id, bio_date, weight, height, age, muscle_fat_ratio, 306 ingredient_quantity, nutrient_amount, buy_quantity ) 307 }}} 308 309 310 311 * lossless тест: R8 ∩ R′8 = {list_id, user_id}, а {list_id} → R8. 312 //Заедничкото множество е поширако од клучот затоа што надворешните клучеви на R8 остануваат во R′ за надмножество на детерминанта и понатаму е детерминанта.// 299 313 ||= list_id =||= date_time =||= notes =||= is_bought =||= kcal =||= user_id =|| 300 314 || 12 || 2026-01-30 07:30 || Sabota Rucek || true || 1167 || 2 || 301 315 || 23 || 2026-12-10 08:30 || Igor Rodenden || true || 2400 || 3 || 302 * Спојување без загуба во случајов се изведува од R8 ∩ R′ = {list_id, user_id}. 316 303 317 304 318 === R9 - INTAKE_PLANNER … … 307 321 {planner_id} → {planner_date_time, planner_notes, planner_kcal, is_consumed, user_id} 308 322 }}} 323 Остаточна релација: 324 {{{ 325 R′9 ( user_id, ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, comment_id, 326 list_id, planner_id, bio_id, bio_date, 327 weight, height, age, muscle_fat_ratio, ingredient_quantity, nutrient_amount, buy_quantity ) 328 }}} 329 330 * lossless тест: R9 ∩ R′9 = {planner_id, user_id}, а {planner_id} → R9 331 //Заедничкото множество е поширако од клучот затоа што надворешните клучеви на R9 остануваат во R′ за надмножество на детерминанта и понатаму е детерминанта.// 332 309 333 310 334 ||= planner_id =||= date_time =||= notes =||= kcal =||= is_consumed =||= user_id =|| 311 335 || 12 || 2026-01-30 07:30 || Sabota Rucek || 1167 || true || 2 || 312 336 || 23 || 2026-12-10 08:30 || Igor Rodenden || 2400 || true || 3 || 313 * Спојување без загуба во случајов се изведува од R9 ∩ R′ = {planner_id, user_id}.314 337 315 338 === R10 - BIOMETRICS … … 318 341 {bio_id} → {bio_date, weight, height, age, muscle_fat_ratio, user_id} 319 342 }}} 343 344 Остаточна релација: 345 {{{ 346 R′10 ( ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, comment_id, list_id, planner_id, bio_id, 347 ingredient_quantity, nutrient_amount, buy_quantity ) 348 }}} 349 * lossless тест: R10 ∩ R′10 = {bio_id}, а {bio_id} → R10 350 320 351 321 352 ||= bio_id =||= date =||= weight =||= height =||= age =||= muscle_fat_ratio =||= user_id =|| 322 353 || 1 || 2026-01-10 || 100 || 189 || 25 || 1 || 323 354 || 2 || 2026-01-11 || 99.5 || 189 || 25 || 1 || 324 * Спојување без загуба во случајов се изведува од R10 ∩ R′ = {bio_id, user_id}.325 355 326 356 === R11 - RECIPE_CONTAINS_INGREDIENT … … 329 359 {recipe_id, ingredient_id} → {ingredient_quantity} 330 360 }}} 361 Одделена релација: 362 363 {{{ 364 R′11 ( ingredient_id, nutrient_id, restriction_id, recipe_id, post_id, comment_id, list_id, 365 planner_id, bio_id, nutrient_amount, buy_quantity ) 366 }}} 367 368 * lossless тест: R11 ∩ R′11 = {recipe_id, ingredient_id}, а {recipe_id, ingredient_id} → R11 369 331 370 332 371 ||= recipe_id =||= ingredient_id =||= ingredient_quantity =|| 333 372 || 1 || 20 || 100 || 334 373 || 2 || 30 || 450 || 335 * Спојување без загуба во случајов се изведува од R11 ∩ R′ = {recipe_id, ingredient_id}.336 374 337 375 === R12 - INGREDIENT_CONTAINS_NUTRIENT … … 340 378 {ingredient_id, nutrient_id} → {nutrient_amount} 341 379 }}} 380 381 Остаточна релација: 382 {{{ 383 R′12 ( ingredient_id, nutrient_id, restriction_id, recipe_id, 384 post_id, comment_id, list_id, planner_id, bio_id, buy_quantity ) 385 }}} 386 * lossless тест: R12 ∩ R′12 = {ingredient_id, nutrient_id}, а {ingredient_id, nutrient_id} → R12 387 388 342 389 343 390 ||= ingredient_id =||= nutrient_id =||= quantity =|| 344 391 || 21 || 1 || 10.0 || 345 392 || 22 || 2 || 5.0 || 346 * Спојување без загуба во случајов се изведува од R12 ∩ R′ = {ingredient_id, nutrient_id}.347 393 348 394 … … 352 398 {ingredient_id, nutrient_id} → {nutrient_amount} 353 399 }}} 400 401 Остаточна релација: 402 403 {{{ 404 R′13 ( ingredient_id, nutrient_id, restriction_id, recipe_id, 405 post_id, comment_id, list_id, planner_id, bio_id, buy_quantity ) 406 }}} 407 * lossless тест: R13 ∩ R′13 = {recipe_id, restriction_id}, а {recipe_id, restriction_id} → R13 408 354 409 355 410 ||= recipe_id =||= restriction_id =|| 356 411 || 1 || 1 || 357 412 || 2 || 2 || 358 * Спојување без загуба во случајов се изведува од R13 ∩ R′ = {recipe_id, restriction_id}.359 413 360 414 … … 364 418 {list_id, recipe_id} → Нема атрибути надвор од клучот. 365 419 }}} 420 421 Остаточна релација: 422 423 {{{ 424 R′14 ( ingredient_id, nutrient_id, restriction_id, 425 recipe_id, post_id, comment_id, list_id, planner_id, bio_id, buy_quantity ) 426 }}} 427 * lossless тест: R14 ∩ R′14 = {list_id, recipe_id}, а {list_id, recipe_id} → R14. 428 429 366 430 367 431 ||= list_id =||= recipe_id =|| 368 432 || 1 || 3 || 369 433 || 2 || 4 || 370 * Спојување без загуба во случајов се изведува од R14 ∩ R′ = {list_id, recipe_id}.371 434 372 435 … … 376 439 {list_id, ingredient_id} → {buy_quantity} 377 440 }}} 441 Остаточна релација: 442 {{{ 443 R′15 ( ingredient_id, nutrient_id, restriction_id, 444 recipe_id, post_id, comment_id, list_id, planner_id, bio_id ) 445 }}} 446 * lossless тест: R15 ∩ R′15 = {list_id, ingredient_id}, а {list_id, ingredient_id} → R15 447 378 448 379 449 ||= list_id =||= ingredient_id =||= buy_quantity =|| 380 450 || 1 || 3 || 1000 || 381 451 || 2 || 4 || 250 || 382 * Спојување без загуба во случајов се изведува од R15 ∩ R′ = {list_id, ingredient_id}383 452 384 453 === R16 - INTAKE_PLANNER_SAVE_TO_LIST_POST … … 387 456 {planner_id, post_id} → Нема атрибути надвор од клучот. 388 457 }}} 458 Остаточна релација: 459 {{{ 460 R′16 ( ingredient_id, nutrient_id, restriction_id, 461 recipe_id, post_id, comment_id, list_id, planner_id, bio_id ) 462 }}} 463 * lossless тест: R16 ∩ R′16 = {planner_id, post_id}, а {planner_id, post_id} → R16 464 389 465 390 466 ||= planner_id =||= post_id =|| 391 467 || 1 || 3 || 392 468 || 2 || 4 || 393 * Спојување без загуба во случајов се изведува од R16 ∩ R′ = {planner_id, post_id}.394 469 395 470
