| | 95 | {{{#!div style="text-align: justify; width: 100%;" |
| | 96 | When identifying a candidate key, we first consider the attributes that appear only on the left-hand side (LHS) of the functional dependencies: |
| | 97 | |
| | 98 | **{artist_id, song_id, product_id, order_id,modification_id, album_id}** |
| | 99 | |
| | 100 | These attributes cannot be derived from any other attributes using the given functional dependencies, so they must be included in a candidate key. |
| | 101 | |
| | 102 | Therefore, we initially define: |
| | 103 | |
| | 104 | **K = {order_id, product_id, artist_id, song_id, modification_id, album_id}** |
| | 105 | |
| | 106 | The closure K+ contains all attributes of the universal relation R. Therefore, K is a superkey. Each attribute in K is necessary because removing any one of them prevents at least one set of attributes of R from being derived. Therefore, K is minimal and the selected primary key for the initial de-normalized relation is: |
| | 107 | |
| | 108 | **(order_id, product_id, artist_id, song_id, modification_id, album_id)** |