Changes between Version 4 and Version 5 of Normalization


Ignore:
Timestamp:
01/28/26 02:50:49 (12 days ago)
Author:
233144
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Normalization

    v4 v5  
    7575build_id → user_id, build_name, build_created_at, build_description, build_total_price, build_is_approved
    7676
     77build_component_id → build_id, user_id
     78
    7779(build_id, user_id) → rating_value
    7880
     
    103105cooler_cpu_sockets(cooler_id, socket)
    104106
    105 build_component(build_id, component_id)
    106 
    107107
    108108We separate obvious entities in individual relations:
     
    144144build(build_id, user_id, build_name, build_created_at, build_description, build_total_price, build_is_approved)
    145145
     146build_component(build_component_id, build_id, component_id)
     147
    146148review(review_id, build_id, user_id, review_content, review_created_at)
    147149
     
    165167build → build_id
    166168
     169build_component → build_component_id
     170
    167171review → review_id
    168172
     
    175179== Second Normal Form (2NF)
    176180
    177 2NF focuses on partial dependencies, which can only occur when a relation has a composite primary key and a non-key attribute depends on only part of that key. Relations with a single-attribute primary key were considered to be automatically in 2NF. Most of the relations obtained after 1NF like users, components, build, review and suggestions, have single-attribute primary keys so partial dependencies cannot exist in these relations. The remaining relations that have composite primary keys build_component, favorite_build, rating_build were analyzed separately.
    178 
    179 build_component(build_id, component_id) - doesn't have non-key attributes so it is already 2NF
     1812NF focuses on partial dependencies, which can only occur when a relation has a composite primary key and a non-key attribute depends on only part of that key. Relations with a single-attribute primary key were considered to be automatically in 2NF. Most of the relations obtained after 1NF like users, components, build, review and suggestions, have single-attribute primary keys so partial dependencies cannot exist in these relations. The remaining relations that have composite primary keys favorite_build and rating_build were analyzed separately.
    180182
    181183favorite_build(build_id, user_id) - doesn't have non-key attributes so it is already 2NF
     
    211213cooler_cpu_sockets(cooler_id, socket) - no transitive dependencies, 3NF is satisfied
    212214
    213 build_component(build_id, component_id) - no transitive dependencies because there are no non-key attributes, therefore 3NF is satisfied.
     215build_component(build_component_id, build_id, component_id) - no transitive dependencies because all attributes depend on build_component_id, therefore 3NF is satisfied.
    214216
    215217== BCNF decomposition
     
    252254
    253255
    254 build_component(build_id, component_id):
    255 
    256  FD: composite key (build_id, component_id) → /
    257 
    258  No non-key attributes so its by default BCNF
     256build_component(build_component_id, build_id, component_id):
     257
     258 FD: build_component_id → build_id, component_id
     259
     260 Determinant build_component_id is primary key(superkey), BCNF
    259261
    260262