Changes between Version 32 and Version 33 of Normalization


Ignore:
Timestamp:
05/04/26 11:14:03 (3 weeks ago)
Author:
221296
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Normalization

    v32 v33  
    9696
    9797{{{
    98 K = {payment_id, ticket_id, course_id, category_id, attempt_id, certificate_id}
     98K = {payment_id, ticket_id, category_id, attempt_id, certificate_id}
    9999}}}
    100100
     
    104104{{{
    105105
    106 Let K = {payment_id, ticket_id, course_id, category_id, attempt_id, certificate_id}
     106Let K = {payment_id, ticket_id, category_id, attempt_id, certificate_id}
    107107
    108108Compute K+:
    109 Start: K+ = {payment_id, ticket_id, course_id, category_id, attempt_id, certificate_id}
     109Start: K+ = {payment_id, ticket_id, category_id, attempt_id, certificate_id}
    110110
    111111From FD6:
     
    138138Add: category_name, category_description
    139139
    140 From FD9:
    141 course_id → course_name, course_price, course_status, instructor_id
    142 Add: course_name, course_price, course_status, instructor_id
    143 
    144 From FD2:
    145 instructor_id → user_id
    146 user_id already belongs to K+
    147 
    148140From FD13:
    149141attempt_id → user_id, quiz_id, score, attempt_date
     
    161153From FD10:
    162154module_id → course_id, module_title, module_description
    163 Add: module_title, module_description
    164 (course_id already belongs to K+)
     155Add: course_id, module_title, module_description
     156
     157From FD9:
     158course_id → course_name, course_price, course_status, instructor_id
     159Add: course_name, course_price, course_status, instructor_id
     160
     161From FD2:
     162instructor_id → user_id
     163user_id already belongs to K+
    165164
    166165From FD15:
     
    178177
    179178- without payment_id, payment/subscription information is lost
    180 - Without ticket_id, support ticket information is lost
    181 - without course_id or category_id, the course-category association is lost
    182 - without attempt_id, quiz attempt, and course content assessment information is lost
    183 - Without certificate_id, certificate, and enrollment completion information is lost
     179- without ticket_id, support ticket information is lost
     180- without category_id, the course-category association is lost
     181- without attempt_id, quiz attempt, course content and course information are lost
     182- without certificate_id, certificate and enrollment completion information is lost
    184183
    185184So, K is a candidate key.
    186185}}}
     186
     187=== Discussion about other possible candidate keys
     188To prove that there are no other candidate keys for the initial universal relation R, we analyze the attributes that do not appear on the right-hand side of any functional dependency.
     189
     190A candidate key must be a minimal superkey, meaning that its closure must contain all attributes of R, and no proper subset of it may also determine all attributes.
     191
     192From the initial set of functional dependencies, the attributes that are not functionally determined by any other attribute are:
     193
     194payment_id, ticket_id, category_id, attempt_id, certificate_id
     195
     196Therefore, every candidate key must contain all of these attributes.
     197
     198The attribute course_id is not required in the candidate key, because it can be functionally determined from attempt_id:
     199
     200attempt_id → quiz_id
     201quiz_id → lesson_id
     202lesson_id → module_id
     203module_id → course_id
     204
     205This means that adding course_id to K would make the key non-minimal.
     206
     207Therefore, the only candidate key, according to the given set of functional dependencies, is:
     208
     209K = {payment_id, ticket_id, category_id, attempt_id, certificate_id}
     210
     211Since there is no alternative determinant for any of these required attributes in the initial set of functional dependencies, there are no other candidate keys.
     212
    187213=== Chosen primary key
    188214We select the candidate key above as the primary key of the initial de-normalized relation:
    189215
    190216{{{
    191 K = {payment_id, ticket_id, course_id, category_id, attempt_id, certificate_id}
     217K = {payment_id, ticket_id, category_id, attempt_id, certificate_id}
    192218}}}
    193219