Changes between Version 22 and Version 23 of Normalization
- Timestamp:
- 08/07/26 15:55:31 (12 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Normalization
v22 v23 7 7 {{{ 8 8 Universal_Relation_Shifter( account_id, account_email, account_password_hash, account_name, 9 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, user_favorite_course_ids,9 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, user_favorite_course_ids, 10 10 meeting_reminder_id, meeting_at, meeting_scheduled_at, meeting_sent, meeting_link, 11 11 expert_id, … … 35 35 36 36 '''F = {''' 37 * '''FD1:''' user_id → user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id37 * '''FD1:''' user_id → user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id 38 38 * '''FD2:''' verification_token_uuid → token_created_at, token_expires_at, user_id 39 39 * '''FD3:''' meeting_reminder_id → meeting_at, meeting_scheduled_at, meeting_sent, meeting_link, user_id … … 52 52 * '''FD16:''' course_lecture_translate_id → lecture_title, lecture_content_file_name, lecture_description, lecture_content_text, course_lecture_id, language_id 53 53 * '''FD17:''' user_course_progress_id → progress_is_completed, progress_completed_at, enrollment_id, course_lecture_id 54 * '''FD18:''' user_email → user_id 55 * '''FD19:''' account_id → account_email, account_password_hash, account_name 56 * '''FD20:''' (course_id, version_number) → course_version_id 57 * '''FD21:''' (course_id, language_id) → course_translate_id 58 * '''FD22:''' (course_lecture_id, language_id) → course_lecture_translate_id 59 * '''FD23:''' (course_content_id, language_id) → course_content_translate_id 60 * '''FD24:''' (tag_id, language_id) → tag_translate_id 61 * '''FD25:''' (enrollment_id, course_lecture_id) → user_course_progress_id 62 * '''FD26:''' (course_version_id, content_position) → course_content_id 63 * '''FD27:''' (course_content_id, lecture_position) → course_lecture_id 64 * '''FD28:''' (course_translate_id, course_what_will_be_learned) → ∅ 65 * '''FD29:''' (user_id, user_favorite_course_ids) → ∅ 66 * '''FD30:''' account_email → account_id 67 * '''FD31:''' language_id → language_value 68 * '''FD32:''' language_value → language_id 69 * '''FD33:''' meeting_link → meeting_reminder_id 54 * '''FD18:''' account_id → account_email, account_password_hash, account_name 55 * '''FD19:''' (course_id, version_number) → course_version_id 56 * '''FD20:''' (course_id, language_id) → course_translate_id 57 * '''FD21:''' (course_lecture_id, language_id) → course_lecture_translate_id 58 * '''FD22:''' (course_content_id, language_id) → course_content_translate_id 59 * '''FD23:''' (tag_id, language_id) → tag_translate_id 60 * '''FD24:''' (enrollment_id, course_lecture_id) → user_course_progress_id 61 * '''FD25:''' (course_version_id, content_position) → course_content_id 62 * '''FD26:''' (course_content_id, lecture_position) → course_lecture_id 63 * '''FD27:''' (course_translate_id, course_what_will_be_learned) → ∅ 64 * '''FD28:''' (user_id, user_favorite_course_ids) → ∅ 65 * '''FD29:''' account_email → account_id 66 * '''FD30:''' language_id → language_value 67 * '''FD31:''' language_value → language_id 68 * '''FD32:''' meeting_link → meeting_reminder_id 70 69 '''}''' 71 70 … … 81 80 82 81 ||= Атрибут =||= Лева страна =||= Десна страна =||= Класификација =|| 83 || account_id || ✓ (FD19) || ✓ (FD1, FD4, FD30) || и лево и десно || 84 || account_email || ✓ (FD30) || ✓ (FD19) || и лево и десно || 85 || account_password_hash || ✗ || ✓ (FD19) || десно || 86 || account_name || ✗ || ✓ (FD19) || десно || 87 || user_id || ✓ (FD1, FD29) || ✓ (FD2, FD3, FD6, FD18) || и лево и десно || 88 || user_name || ✗ || ✓ (FD1) || десно || 89 || user_email || ✓ (FD18) || ✓ (FD1) || и лево и десно || 82 || account_id || ✓ (FD18) || ✓ (FD1, FD4, FD29) || и лево и десно || 83 || account_email || ✓ (FD29) || ✓ (FD18) || и лево и десно || 84 || account_password_hash || ✗ || ✓ (FD18) || десно || 85 || account_name || ✗ || ✓ (FD18) || десно || 86 || user_id || ✓ (FD1, FD28) || ✓ (FD2, FD3, FD6) || и лево и десно || 90 87 || user_login_provider || ✗ || ✓ (FD1) || десно || 91 || user_password_hash || ✗ || ✓ (FD1) || десно ||92 88 || user_is_verified || ✗ || ✓ (FD1) || десно || 93 89 || user_is_profile_complete || ✗ || ✓ (FD1) || десно || … … 96 92 || user_work_position || ✗ || ✓ (FD1) || десно || 97 93 || user_points || ✗ || ✓ (FD1) || десно || 98 || user_favorite_course_ids || ✓ (FD2 9) || ✗ || лево ||94 || user_favorite_course_ids || ✓ (FD28) || ✗ || лево || 99 95 || verification_token_uuid || ✓ (FD2) || ✗ || лево || 100 96 || token_created_at || ✗ || ✓ (FD2) || десно || 101 97 || token_expires_at || ✗ || ✓ (FD2) || десно || 102 || meeting_reminder_id || ✓ (FD3) || ✓ (FD3 3) || и лево и десно ||98 || meeting_reminder_id || ✓ (FD3) || ✓ (FD32) || и лево и десно || 103 99 || meeting_at || ✗ || ✓ (FD3) || десно || 104 100 || meeting_scheduled_at || ✗ || ✓ (FD3) || десно || 105 101 || meeting_sent || ✗ || ✓ (FD3) || десно || 106 || meeting_link || ✓ (FD3 3) || ✓ (FD3) || и лево и десно ||102 || meeting_link || ✓ (FD32) || ✓ (FD3) || и лево и десно || 107 103 || expert_id || ✓ (FD4) || ✗ || лево || 108 || language_id || ✓ (FD2 1, FD22, FD23, FD24, FD31) || ✓ (FD10, FD12, FD14, FD16, FD32) || и лево и десно ||109 || language_value || ✓ (FD3 2) || ✓ (FD31) || и лево и десно ||110 || course_id || ✓ (FD5, FD 20, FD21) || ✓ (FD11, FD12) || и лево и десно ||104 || language_id || ✓ (FD20, FD21, FD22, FD23, FD30) || ✓ (FD10, FD12, FD14, FD16, FD31) || и лево и десно || 105 || language_value || ✓ (FD31) || ✓ (FD30) || и лево и десно || 106 || course_id || ✓ (FD5, FD19, FD20) || ✓ (FD11, FD12) || и лево и десно || 111 107 || course_image_url || ✗ || ✓ (FD5) || десно || 112 108 || course_color || ✗ || ✓ (FD5) || десно || … … 114 110 || course_duration_minutes || ✗ || ✓ (FD5) || десно || 115 111 || course_price || ✗ || ✓ (FD5) || десно || 116 || enrollment_id || ✓ (FD6, FD2 5) || ✓ (FD7, FD8, FD17) || и лево и десно ||112 || enrollment_id || ✓ (FD6, FD24) || ✓ (FD7, FD8, FD17) || и лево и десно || 117 113 || enrollment_status || ✗ || ✓ (FD6) || десно || 118 114 || enrollment_purchase_date || ✗ || ✓ (FD6) || десно || … … 128 124 || review_comment || ✗ || ✓ (FD8) || десно || 129 125 || review_date || ✗ || ✓ (FD8) || десно || 130 || tag_id || ✓ (FD9, FD2 4) || ✓ (FD10) || и лево и десно ||126 || tag_id || ✓ (FD9, FD23) || ✓ (FD10) || и лево и десно || 131 127 || tag_type || ✗ || ✓ (FD9) || десно || 132 || tag_translate_id || ✓ (FD10) || ✓ (FD2 4) || и лево и десно ||128 || tag_translate_id || ✓ (FD10) || ✓ (FD23) || и лево и десно || 133 129 || tag_value || ✗ || ✓ (FD10) || десно || 134 || course_version_id || ✓ (FD11, FD2 6) || ✓ (FD6, FD13, FD20) || и лево и десно ||135 || version_number || ✓ (FD 20) || ✓ (FD11) || и лево и десно ||130 || course_version_id || ✓ (FD11, FD25) || ✓ (FD6, FD13, FD19) || и лево и десно || 131 || version_number || ✓ (FD19) || ✓ (FD11) || и лево и десно || 136 132 || version_created_at || ✗ || ✓ (FD11) || десно || 137 133 || version_is_active || ✗ || ✓ (FD11) || десно || 138 || course_translate_id || ✓ (FD12) || ✓ (FD2 1) || и лево и десно ||134 || course_translate_id || ✓ (FD12) || ✓ (FD20) || и лево и десно || 139 135 || course_title_short || ✗ || ✓ (FD12) || десно || 140 136 || course_title || ✗ || ✓ (FD12) || десно || … … 142 138 || course_description || ✗ || ✓ (FD12) || десно || 143 139 || course_description_long || ✗ || ✓ (FD12) || десно || 144 || course_what_will_be_learned || ✓ (FD2 8) || ✗ || лево ||145 || course_content_id || ✓ (FD13, FD2 3, FD27) || ✓ (FD14, FD15, FD26) || и лево и десно ||146 || content_position || ✓ (FD2 6) || ✓ (FD13) || и лево и десно ||147 || course_content_translate_id || ✓ (FD14) || ✓ (FD2 3) || и лево и десно ||140 || course_what_will_be_learned || ✓ (FD27) || ✗ || лево || 141 || course_content_id || ✓ (FD13, FD22, FD26) || ✓ (FD14, FD15, FD25) || и лево и десно || 142 || content_position || ✓ (FD25) || ✓ (FD13) || и лево и десно || 143 || course_content_translate_id || ✓ (FD14) || ✓ (FD22) || и лево и десно || 148 144 || content_translate_title || ✗ || ✓ (FD14) || десно || 149 || course_lecture_id || ✓ (FD15, FD2 2, FD25) || ✓ (FD16, FD17, FD27) || и лево и десно ||145 || course_lecture_id || ✓ (FD15, FD21, FD24) || ✓ (FD16, FD17, FD26) || и лево и десно || 150 146 || lecture_duration_minutes || ✗ || ✓ (FD15) || десно || 151 || lecture_position || ✓ (FD2 7) || ✓ (FD15) || и лево и десно ||147 || lecture_position || ✓ (FD26) || ✓ (FD15) || и лево и десно || 152 148 || lecture_content_type || ✗ || ✓ (FD15) || десно || 153 || course_lecture_translate_id || ✓ (FD16) || ✓ (FD2 2) || и лево и десно ||149 || course_lecture_translate_id || ✓ (FD16) || ✓ (FD21) || и лево и десно || 154 150 || lecture_title || ✗ || ✓ (FD16) || десно || 155 151 || lecture_content_file_name || ✗ || ✓ (FD16) || десно || 156 152 || lecture_description || ✗ || ✓ (FD16) || десно || 157 153 || lecture_content_text || ✗ || ✓ (FD16) || десно || 158 || user_course_progress_id || ✓ (FD17) || ✓ (FD2 5) || и лево и десно ||154 || user_course_progress_id || ✓ (FD17) || ✓ (FD24) || и лево и десно || 159 155 || progress_is_completed || ✗ || ✓ (FD17) || десно || 160 156 || progress_completed_at || ✗ || ✓ (FD17) || десно || … … 163 159 164 160 * '''verification_token_uuid''' - мора да биде дел од секој кандидат клуч 165 * '''meeting_reminder_id''' - мора да биде дел од секој кандидат клуч (или meeting_link, FD3 3)161 * '''meeting_reminder_id''' - мора да биде дел од секој кандидат клуч (или meeting_link, FD32) 166 162 * '''expert_id''' - мора да биде дел од секој кандидат клуч 167 163 * '''course_what_will_be_learned''' - мора да биде дел од секој кандидат клуч … … 176 172 - Од FD2 (verification_token_uuid →): добиваме token_created_at, token_expires_at, user_id 177 173 - Од FD3 (meeting_reminder_id →): добиваме meeting_at, meeting_scheduled_at, meeting_sent, meeting_link, user_id 178 - Од FD1 (user_id →): добиваме user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id174 - Од FD1 (user_id →): добиваме user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id 179 175 - Од FD4 (expert_id →): добиваме account_id 180 - Од FD19 (account_id →): добиваме account_email, account_password_hash, account_name 181 - Од FD18 (user_email →): добиваме user_id 182 - Од FD30 (account_email →): добиваме account_id 176 - Од FD18 (account_id →): добиваме account_email, account_password_hash, account_name 177 - Од FD29 (account_email →): добиваме account_id 183 178 }}} 184 179 … … 235 230 - Од FD12 (course_translate_id →): добиваме course_title_short, course_title, course_description_short, course_description, course_description_long, course_id, language_id 236 231 - Од FD10 (tag_translate_id →): добиваме tag_value, tag_id, language_id 237 - Од FD3 1(language_id →): добиваме language_value232 - Од FD30 (language_id →): добиваме language_value 238 233 - Од FD9 (tag_id →): добиваме tag_type 239 - Од FD2 8({course_translate_id, course_what_will_be_learned} →): добиваме ∅234 - Од FD27 ({course_translate_id, course_what_will_be_learned} →): добиваме ∅ 240 235 }}} 241 236 … … 260 255 Дополнителен кандидат клуч кој го разгледував беше '''{verification_token_uuid, meeting_reminder_id, expert_id, course_what_will_be_learned, user_favorite_course_ids, enrollment_id, course_lecture_id, course_lecture_translate_id, course_content_translate_id, course_translate_id, tag_translate_id}''', каде наместо user_course_progress_id присутни се enrollment_id и course_lecture_id. Меѓутоа овој кандидат клуч е поголем од тој со user_course_progress_id, па затоа не го земам во предвид при бирање на примарен клуч. 261 256 262 Втор кандидат клуч со иста големина се добива ако наместо meeting_reminder_id се земе meeting_link (FD3 3). Го избирам meeting_reminder_id бидејќи е сурогат клуч со фиксна должина, наспроти meeting_link кој е текстуален атрибут.257 Втор кандидат клуч со иста големина се добива ако наместо meeting_reminder_id се земе meeting_link (FD32). Го избирам meeting_reminder_id бидејќи е сурогат клуч со фиксна должина, наспроти meeting_link кој е текстуален атрибут. 263 258 264 259 === 3.7 Избор на примарен клуч === … … 290 285 Universal_Relation_Shifter_Base_1( 291 286 account_id, account_email, account_password_hash, account_name, 292 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, user_favorite_course_ids,287 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, user_favorite_course_ids, 293 288 meeting_reminder_id, meeting_at, meeting_scheduled_at, meeting_sent, meeting_link, 294 289 expert_id, … … 314 309 '''Проверка за lossless join:''' Може да се реконструира преку course_translate_id 315 310 316 '''Проверка за dependency preservation:''' FD2 8е зачувана во Course_Translate_What_Will_Be_Learned311 '''Проверка за dependency preservation:''' FD27 е зачувана во Course_Translate_What_Will_Be_Learned 317 312 318 313 === Чекор 4.2: Декомпозиција на релацијата Universal_Relation_Shifter === … … 330 325 Universal_Relation_Shifter_Base( 331 326 account_id, account_email, account_password_hash, account_name, 332 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,327 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 333 328 meeting_reminder_id, meeting_at, meeting_scheduled_at, meeting_sent, meeting_link, 334 329 expert_id, … … 354 349 '''Проверка за lossless join:''' Може да се реконструира преку user_id 355 350 356 '''Проверка за dependency preservation:''' FD2 9е зачувана во User_Favorite_Course351 '''Проверка за dependency preservation:''' FD28 е зачувана во User_Favorite_Course 357 352 358 353 … … 382 377 || FD16: course_lecture_translate_id → lecture_title, lecture_content_file_name, lecture_description, lecture_content_text, course_lecture_id, language_id || course_lecture_translate_id || ДА (дел од примарен клуч) || '''ДА''' || 383 378 || FD17: user_course_progress_id → progress_is_completed, progress_completed_at, enrollment_id, course_lecture_id || user_course_progress_id || ДА (дел од примарен клуч) || '''ДА''' || 384 || FD18: user_email → user_id || user_email || НЕ || Не || 385 || FD19: account_id → account_email, account_password_hash, account_name || account_id || НЕ (транзитивно преку expert_id и user_id) || Не директно || 386 || FD20: (course_id, version_number) → course_version_id || course_id, version_number || НЕ || Не || 387 || FD21: (course_id, language_id) → course_translate_id || course_id, language_id || НЕ || Не || 388 || FD22: (course_lecture_id, language_id) → course_lecture_translate_id || course_lecture_id, language_id || НЕ || Не || 389 || FD23: (course_content_id, language_id) → course_content_translate_id || course_content_id, language_id || НЕ || Не || 390 || FD24: (tag_id, language_id) → tag_translate_id || tag_id, language_id || НЕ || Не || 391 || FD25: (enrollment_id, course_lecture_id) → user_course_progress_id || enrollment_id, course_lecture_id || НЕ || Не || 392 || FD26: (course_version_id, content_position) → course_content_id || course_version_id, content_position || НЕ || Не || 393 || FD27: (course_content_id, lecture_position) → course_lecture_id || course_content_id, lecture_position || НЕ || Не || 394 || FD30: account_email → account_id || account_email || НЕ || Не || 395 || FD31: language_id → language_value || language_id || НЕ (транзитивно преку course_translate_id) || Не директно || 396 || FD32: language_value → language_id || language_value || НЕ || Не || 397 || FD33: meeting_link → meeting_reminder_id || meeting_link || НЕ || Не || 379 || FD18: account_id → account_email, account_password_hash, account_name || account_id || НЕ (транзитивно преку expert_id и user_id) || Не директно || 380 || FD19: (course_id, version_number) → course_version_id || course_id, version_number || НЕ || Не || 381 || FD20: (course_id, language_id) → course_translate_id || course_id, language_id || НЕ || Не || 382 || FD21: (course_lecture_id, language_id) → course_lecture_translate_id || course_lecture_id, language_id || НЕ || Не || 383 || FD22: (course_content_id, language_id) → course_content_translate_id || course_content_id, language_id || НЕ || Не || 384 || FD23: (tag_id, language_id) → tag_translate_id || tag_id, language_id || НЕ || Не || 385 || FD24: (enrollment_id, course_lecture_id) → user_course_progress_id || enrollment_id, course_lecture_id || НЕ || Не || 386 || FD25: (course_version_id, content_position) → course_content_id || course_version_id, content_position || НЕ || Не || 387 || FD26: (course_content_id, lecture_position) → course_lecture_id || course_content_id, lecture_position || НЕ || Не || 388 || FD29: account_email → account_id || account_email || НЕ || Не || 389 || FD30: language_id → language_value || language_id || НЕ (транзитивно преку course_translate_id) || Не директно || 390 || FD31: language_value → language_id || language_value || НЕ || Не || 391 || FD32: meeting_link → meeting_reminder_id || meeting_link || НЕ || Не || 398 392 399 393 '''Заклучок:''' Релацијата не е во 2NF бидејќи има парцијални зависности. Атрибутите на '''FD2, FD3, FD4, FD10, FD12, FD14, FD16, FD17''' зависат само од дел од примарниот клуч, а не од целиот клуч. … … 429 423 Universal_Relation_Shifter_Base_1( 430 424 account_id, account_email, account_password_hash, account_name, 431 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,425 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 432 426 meeting_reminder_id, meeting_at, meeting_scheduled_at, meeting_sent, meeting_link, 433 427 expert_id, … … 468 462 Universal_Relation_Shifter_Base_2( 469 463 account_id, account_email, account_password_hash, account_name, 470 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,464 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 471 465 expert_id, 472 466 language_id, language_value, … … 490 484 '''Проверка за lossless join:''' Може да се реконструира преку user_id 491 485 492 '''Проверка за dependency preservation:''' FD3 и FD3 3се зачувани во Meeting_Reminder486 '''Проверка за dependency preservation:''' FD3 и FD32 се зачувани во Meeting_Reminder 493 487 494 488 === Чекор 5.3: Декомпозиција по FD4 (expert_id → ...) === … … 506 500 Universal_Relation_Shifter_Base_3( 507 501 account_id, account_email, account_password_hash, account_name, 508 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,502 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 509 503 language_id, language_value, 510 504 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 543 537 Universal_Relation_Shifter_Base_4( 544 538 account_id, account_email, account_password_hash, account_name, 545 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,539 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 546 540 language_id, language_value, 547 541 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 579 573 Universal_Relation_Shifter_Base_5( 580 574 account_id, account_email, account_password_hash, account_name, 581 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,575 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 582 576 language_id, language_value, 583 577 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 614 608 Universal_Relation_Shifter_Base_6( 615 609 account_id, account_email, account_password_hash, account_name, 616 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,610 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 617 611 language_id, language_value, 618 612 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 648 642 Universal_Relation_Shifter_Base_7( 649 643 account_id, account_email, account_password_hash, account_name, 650 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,644 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 651 645 language_id, language_value, 652 646 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 681 675 Universal_Relation_Shifter_Base_8( 682 676 account_id, account_email, account_password_hash, account_name, 683 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,677 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 684 678 language_id, language_value, 685 679 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 734 728 Universal_Relation_Shifter_Base_8( 735 729 account_id, account_email, account_password_hash, account_name, 736 user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points,730 user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, 737 731 language_id, language_value, 738 732 course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price, … … 833 827 834 828 '''Заклучок:''' После извлекување на сите парцијални зависности (FD2, FD3, FD4, FD10, FD12, FD14, FD16, FD17), универзалната релација е целосно декомпонирана. Примарниот клуч на Universal_Relation_Shifter_Base_8 е празно множество (∅), што значи дека таа релација повеќе не постои како валидна релација. 835 Останатите функционални зависности (FD1, FD5-FD9, FD11, FD13, FD15, FD1 9, FD31) **нарушуваат 3NF** бидејќи нивните детерминанти (user_id, course_id, enrollment_id, account_id, language_id, итн.) не се примарни клучеви на829 Останатите функционални зависности (FD1, FD5-FD9, FD11, FD13, FD15, FD18, FD30) **нарушуваат 3NF** бидејќи нивните детерминанти (user_id, course_id, enrollment_id, account_id, language_id, итн.) не се примарни клучеви на 836 830 Universal_Relation_Shifter_Base_8, туку се независни детерминанти кои треба да формираат посебни релации. 837 831 … … 839 833 840 834 {{{ 841 User(user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id)835 User(user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id) 842 836 PK: user_id 843 837 844 Universal_Relation_Shifter_Base_9 = Universal_Relation_Shifter_Base_8 - {user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points}838 Universal_Relation_Shifter_Base_9 = Universal_Relation_Shifter_Base_8 - {user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points} 845 839 846 840 Universal_Relation_Shifter_Base_9( … … 860 854 '''Проверка за lossless join:''' Може да се реконструира преку enrollment_id 861 855 862 '''Проверка за dependency preservation:''' FD1 и FD18 се зачуваниво User856 '''Проверка за dependency preservation:''' FD1 е зачувана во User 863 857 864 858 === Чекор 6.2: Декомпозиција по FD5 (course_id → course_*) === … … 1002 996 '''Проверка за lossless join:''' Може да се реконструира преку enrollment_id 1003 997 1004 '''Проверка за dependency preservation:''' FD11 и FD 20се зачувани во Course_Version998 '''Проверка за dependency preservation:''' FD11 и FD19 се зачувани во Course_Version 1005 999 1006 1000 === Чекор 6.8: Декомпозиција по FD13 (course_content_id → course_content_*) === … … 1023 1017 '''Проверка за lossless join:''' Може да се реконструира преку enrollment_id → course_version_id 1024 1018 1025 '''Проверка за dependency preservation:''' FD13 и FD2 6се зачувани во Course_Content1019 '''Проверка за dependency preservation:''' FD13 и FD25 се зачувани во Course_Content 1026 1020 1027 1021 === Чекор 6.9: Декомпозиција по FD15 (course_lecture_id → course_lecture_*) === … … 1043 1037 '''Проверка за lossless join:''' Може да се реконструира преку enrollment_id → course_version_id → course_content_id 1044 1038 1045 '''Проверка за dependency preservation:''' FD15 и FD2 7се зачувани во Course_Lecture1046 1047 === Чекор 6.10: Декомпозиција по FD1 9(account_id → account_*) ===1039 '''Проверка за dependency preservation:''' FD15 и FD26 се зачувани во Course_Lecture 1040 1041 === Чекор 6.10: Декомпозиција по FD18 (account_id → account_*) === 1048 1042 1049 1043 {{{ … … 1062 1056 '''Проверка за lossless join:''' Може да се реконструира преку account_id во User и Expert 1063 1057 1064 '''Проверка за dependency preservation:''' FD1 9 и FD30се зачувани во Account1065 1066 === Чекор 6.11: Декомпозиција по FD3 1(language_id → language_value) ===1058 '''Проверка за dependency preservation:''' FD18 и FD29 се зачувани во Account 1059 1060 === Чекор 6.11: Декомпозиција по FD30 (language_id → language_value) === 1067 1061 1068 1062 {{{ … … 1080 1074 '''Проверка за lossless join:''' Може да се реконструира преку language_id во релациите за преводи 1081 1075 1082 '''Проверка за dependency preservation:''' FD3 1 и FD32се зачувани во Language1076 '''Проверка за dependency preservation:''' FD30 и FD31 се зачувани во Language 1083 1077 1084 1078 === Анализа на Universal_Relation_Shifter_Base_19 === … … 1098 1092 1099 1093 '''Заклучок од 3NF:''' 1100 Сите функционални зависности (FD1-FD3 3) се организирани во релации кои се во 3NF. Universal_Relation_Shifter_Base_19 повеќе не постои како валидна релација.1094 Сите функционални зависности (FD1-FD32) се организирани во релации кои се во 3NF. Universal_Relation_Shifter_Base_19 повеќе не постои како валидна релација. 1101 1095 1102 1096 '''Останати врски (many-to-many):''' … … 1130 1124 ||= Релација =||= Атрибути =||= Примарен клуч =|| 1131 1125 || Account || account_id, account_email, account_password_hash, account_name || account_id || 1132 || User || user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id || user_id ||1126 || User || user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id || user_id || 1133 1127 || Language || language_id, language_value || language_id || 1134 1128 || Course || course_id, course_image_url, course_color, course_difficulty, course_duration_minutes, course_price || course_id || … … 1313 1307 - Надворешни клучеви: - 1314 1308 1315 User(user_id, user_ name, user_email, user_login_provider, user_password_hash, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id)1309 User(user_id, user_login_provider, user_is_verified, user_is_profile_complete, user_has_used_free_consultation, user_company_size, user_work_position, user_points, account_id) 1316 1310 - Примарен клуч: user_id 1317 - Кандидат клучеви: user_id, user_email,account_id1311 - Кандидат клучеви: user_id, account_id 1318 1312 - Надворешни клучеви: account_id 1319 1313 … … 1429 1423 Следниве релации се '''целосно идентични''' со оние од концептуалниот ER модел: 1430 1424 1431 1. '''User''' - идентична структура и атрибути 1432 2. '''Course''' - идентична структура и атрибути 1433 3. '''Course_Version''' - идентична структура и атрибути 1434 4. '''Enrollment''' - идентична структура и атрибути 1435 5. '''Payment''' - идентична структура и атрибути (one-to-one со Enrollment) 1436 6. '''Review''' - идентична структура и атрибути (one-to-one со Enrollment) 1437 7. '''Tag''' - идентична структура и атрибути 1438 8. '''Course_Translate''' - идентична структура и атрибути 1439 9. '''Course_Content''' - идентична структура и атрибути 1440 10. '''Course_Content_Translate''' - идентична структура и атрибути 1441 11. '''Course_Lecture''' - идентична структура и атрибути 1442 12. '''Course_Lecture_Translate''' - идентична структура и атрибути 1443 13. '''Tag_Translate''' - идентична структура и атрибути 1444 14. '''Verification_Token''' - идентична структура и атрибути 1445 15. '''Meeting_Reminder''' - идентична структура и атрибути 1446 16. '''User_Course_Progress''' - идентична структура и атрибути 1425 1. '''Course''' - идентична структура и атрибути 1426 2. '''Course_Version''' - идентична структура и атрибути 1427 3. '''Enrollment''' - идентична структура и атрибути 1428 4. '''Payment''' - идентична структура и атрибути (one-to-one со Enrollment) 1429 5. '''Review''' - идентична структура и атрибути (one-to-one со Enrollment) 1430 6. '''Tag''' - идентична структура и атрибути 1431 7. '''Course_Translate''' - идентична структура и атрибути 1432 8. '''Course_Content''' - идентична структура и атрибути 1433 9. '''Course_Content_Translate''' - идентична структура и атрибути 1434 10. '''Course_Lecture''' - идентична структура и атрибути 1435 11. '''Course_Lecture_Translate''' - идентична структура и атрибути 1436 12. '''Tag_Translate''' - идентична структура и атрибути 1437 13. '''Verification_Token''' - идентична структура и атрибути 1438 14. '''Meeting_Reminder''' - идентична структура и атрибути 1439 15. '''User_Course_Progress''' - идентична структура и атрибути 1447 1440 1448 1441 ==== Релации кои се разликуваат од P2 ==== 1449 1442 1450 17. '''Account''' - нова релација која не постоеше во концептуалниот модел. Атрибутите за најава (email, password_hash, name) беа дуплирани во User и Expert, па се издвоени во заеднички ентитет. 1443 16. '''Account''' - нова релација која не постоеше во концептуалниот модел. Атрибутите за најава (email, password_hash, name) беа дуплирани во User и Expert, па се издвоени во заеднички ентитет. 1444 17. '''User''' - се разликува од P2. Атрибутите user_name, user_email и user_password_hash преминаа во Account, па User останува со атрибутите на профилот и надворешниот клуч account_id. 1451 1445 18. '''Expert''' - се разликува од P2. Атрибутите expert_name, expert_email, expert_login_provider и expert_password_hash преминаа во Account, па Expert останува само со expert_id и надворешниот клуч account_id. 1452 1446 19. '''Language''' - нова релација која не постоеше во концептуалниот модел. Јазикот беше текстуален атрибут во четирите релации за преводи, а сега е самостоен ентитет со надворешни клучеви language_id. … … 1465 1459 ==== Клучни наоди ==== 1466 1460 1467 1. '''Процесот на нормализација го потврди најголемиот дел од дизајнот''' - секоја декомпозиција базирана на функционалните зависности резултираше со релација која одговара на ентитет од оригиналниот модел, освен во три случаи: Account, Language и намалениотExpert.1461 1. '''Процесот на нормализација го потврди најголемиот дел од дизајнот''' - секоја декомпозиција базирана на функционалните зависности резултираше со релација која одговара на ентитет од оригиналниот модел, освен во четири случаи: Account, Language и намалените User и Expert. 1468 1462 1469 1463 2. '''Клучот на универзалната релација''' - примарниот клуч беше идентификуван како композитен клуч од 10 атрибути: {verification_token_uuid, meeting_reminder_id, expert_id, course_what_will_be_learned, user_favorite_course_ids, user_course_progress_id, course_lecture_translate_id, course_content_translate_id, course_translate_id, tag_translate_id}. Овој клуч беше идентификуван преку анализа на функционалните зависности и класификација лева/десна страна на атрибутите. … … 1471 1465 3. '''Декомпозицијата е lossless''' - на секој чекор од процесот на нормализација, оригиналната информација може да се реконструира преку JOIN операции на заедничките атрибути (foreign keys). 1472 1466 1473 4. '''Сите функционални зависности се зачувани''' - сите 3 3 функционални зависности (FD1-FD33) се зачувани во соодветните релации, што значи дека ограничувањата можат да се проверуваат без потреба од скапи JOIN операции.1467 4. '''Сите функционални зависности се зачувани''' - сите 32 функционални зависности (FD1-FD32) се зачувани во соодветните релации, што значи дека ограничувањата можат да се проверуваат без потреба од скапи JOIN операции. 1474 1468 1475 1469 5. '''Many-to-many релации''' - junction tables (Expert_Course, Course_Tag, User_Tag) не произлегуваат од функционални зависности, туку од ER моделот и бизнис логиката. Овие релации немаат свои атрибути освен composite primary key од два foreign keys. … … 1479 1473 Процесот на нормализација '''го потврди најголемиот дел од дизајнот''' од концептуалната фаза (P2). Ова покажува дека оригиналниот ER модел беше во голема мера креиран според принципите на добра база на податоци (минимална редундантност, јасна сепарација на концепти, правилна идентификација на ентитети и релации). 1480 1474 1481 '''Финалниот релационен модел се разликува од моделот од Фаза P2 во три релации: Account, Language и Expert'''.1475 '''Финалниот релационен модел се разликува од моделот од Фаза P2 во четири релации: Account, User, Expert и Language'''.
