| | 130 | |
| | 131 | == 2NF Decomposition |
| | 132 | |
| | 133 | |
| | 134 | ==== **1. PRODUCT(product_id, release_id, format, price, product_description, stock)** |
| | 135 | |
| | 136 | |
| | 137 | {{{ |
| | 138 | R1 = R - {release_id, format, price, product_description, stock} |
| | 139 | |
| | 140 | R1 = {user_id, email, username, password, date_created, shipping_address, telephone_number, admin_type, discount_percentage, points_collected, |
| | 141 | artist_id, artist_name, artist_description, artist_photo, release_id, title, record_label, genre, release_date, cover_photo, duration, |
| | 142 | album_id, song_id, song_name, song_duration, order_id, payment_method, purchase_date, points_earned, points_used, status, modification_id, |
| | 143 | admin_id, date_modified, type_of_modification, discount, wishlist_id, quantity, price_at_purchase, added_at, release_ordinal, |
| | 144 | release_artist_type, song_ordinal} |
| | 145 | }}} |
| | 146 | |
| | 147 | **Lossless join:** The original relation can be reconstructed through a join using {{{product_id}}}. |
| | 148 | |
| | 149 | **Dependency preservation:** The dependency {{{product_id → release_id, format, price, product_description, stock}}} is preserved in the new PRODUCT relation. |
| | 150 | |
| | 151 | |
| | 152 | ==== **2. ARTIST(artist_id, artist_name, artist_description, artist_photo)** |
| | 153 | |
| | 154 | |
| | 155 | {{{ |
| | 156 | R2 = R - {artist_name, artist_description, artist_photo} |
| | 157 | |
| | 158 | R2 = {user_id, email, username, password, date_created, shipping_address, telephone_number, admin_type, discount_percentage, points_collected, |
| | 159 | artist_id, release_id, title, record_label, genre, release_date, cover_photo, duration, album_id, song_id, song_name, song_duration, |
| | 160 | product_id, format, price, product_description, stock, order_id, payment_method, purchase_date, points_earned, points_used, status, |
| | 161 | modification_id, admin_id, date_modified, type_of_modification, discount, wishlist_id, quantity, price_at_purchase, added_at, release_ordinal, |
| | 162 | release_artist_type, song_ordinal} |
| | 163 | }}} |
| | 164 | |
| | 165 | **Lossless join:** The original relation can be reconstructed through a join using {{{artist_id}}}. |
| | 166 | |
| | 167 | **Dependency preservation:** The dependency {{{artist_id → artist_name, artist_description, artist_photo}}} is preserved in the new ARTIST relation. |
| | 168 | |