| 1 | | == Нормализација |
| 2 | | За табелите од нашата база на податоци, со цел разликување на самите id за секој ентитет, |
| 3 | | ќе ги преименуваме id атрибутите во <име_на_релација>_id. |
| 4 | | Со тоа добиваме: user_id, non_admin_user_id, admin_id, listener_id, |
| 5 | | musical_entity_id, song_id, artist_id, event_id, album_id, playlist_id |
| | 1 | = Нормализација |
| | 2 | За табелите од нашата база на податоци, со цел разликување на самите id за секој ентитет, ќе ги преименуваме id атрибутите во <име_на_релација>_id. Со тоа добиваме: user_id, non_admin_user_id, admin_id, listener_id, musical_entity_id, song_id, artist_id, event_id, album_id, playlist_id. |
| 58 | | **user_id+** = {user_id, profile_photo, email, username, full_name, password} -> Не ги содржи сите атрибути[[br]] |
| 59 | | **musical_entity_id+** = {musical_entity_id, title, genre, release_date, artist_id, role} -> Не ги содржи сите атрибути[[br]] |
| 60 | | **song_id+** = {song_id, link} -> Не ги содржи сите атрибути[[br]] |
| 61 | | **playlist_id+** = {playlist_id, cover, playlist_name, listener_id} -> Не ги содржи сите атрибути[[br]] |
| 62 | | **event_id+** = {event_id, event_name, location, venue, date, time, artist_id, admin_id} -> Не ги содржи сите атрибути[[br]] |
| 63 | | **non_admin_user_id+** = {non_admin_user_id} -> Не ги содржи сите атрибути[[br]] |
| 64 | | **follower_id+** = {follower_id} -> Не ги содржи сите атрибути[[br]] |
| 65 | | **followee_id+** = {followee_id} -> Не ги содржи сите атрибути[[br]] |
| | 55 | 1. **user_id+** = {user_id, profile_photo, email, username, full_name, password} -> **Не ги содржи сите атрибути** |
| | 56 | 2. **musical_entity_id+** = {musical_entity_id, title, genre, release_date, artist_id, role} -> **Не ги содржи сите атрибути** |
| | 57 | 3. **song_id+** = {song_id, link} -> **Не ги содржи сите атрибути** |
| | 58 | 4. **playlist_id+** = {playlist_id, cover, playlist_name, listener_id} -> **Не ги содржи сите атрибути** |
| | 59 | 5. **event_id+** = {event_id, event_name, location, venue, date, time, artist_id, admin_id} -> **Не ги содржи сите атрибути** |
| | 60 | 6. **non_admin_user_id+** = {non_admin_user_id} -> **Не ги содржи сите атрибути** |
| | 61 | 7. **follower_id+** = {follower_id} -> **Не ги содржи сите атрибути** |
| | 62 | 8. **followee_id+** = {followee_id} -> **Не ги содржи сите атрибути** |
| 68 | | 1. {user_id, musical_entity_id}+ = {user_id,musical_entity_id, profile_photo, email, username, full_name, password, |
| 69 | | title, genre, release_date, artist_id, role} -> Не ги содржи сите атрибути |
| | 65 | 1. **{user_id, musical_entity_id}+** = {user_id,musical_entity_id, profile_photo, email, username, full_name, password, title, genre, release_date, artist_id, role} -> **Не ги содржи сите атрибути** |
| 71 | | 2. {user_id, musical_entity_id, song_id}+ = {user_id, musical_entity_id, song_id, profile_photo, email, username, full_name, password, |
| 72 | | title, genre, release_date, artist_id, role, , link, album_id} -> Не ги содржи сите атрибути |
| | 67 | 2. **{user_id, musical_entity_id, song_id}+** = {user_id, musical_entity_id, song_id, profile_photo, email, username, full_name, password, title, genre, release_date, artist_id, role, link, album_id} -> **Не ги содржи сите атрибути** |
| 74 | | 3. {user_id, musical_entity_id, song_id, playlist_id }+ = {user_id, musical_entity_id, song_id, playlist_id, profile_photo, email, username, full_name, password, |
| 75 | | title, genre, release_date, artist_id, role , link, album_id, cover, playlist_name, listener_id, grade, comment, timestamp } -> Не ги содржи сите атрибути |
| | 69 | 3. **{user_id, musical_entity_id, song_id, playlist_id }+** = {user_id, musical_entity_id, song_id, playlist_id, profile_photo, email, username, full_name, password, title, genre, release_date, artist_id, role , link, album_id, cover, playlist_name, listener_id, grade, comment, timestamp } -> **Не ги содржи сите атрибути** |
| 78 | | 4. {user_id, musical_entity_id, song_id, playlist_id, event_id }+ = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, admin_id, profile_photo, email, username, full_name, password, |
| 79 | | title, genre, release_date, role , link, album_id, |
| 80 | | cover, playlist_name, listener_id, grade, comment, timestamp, |
| 81 | | event_name, location, venue, date, time} -> Не ги содржи сите атрибути |
| | 72 | 4. **{user_id, musical_entity_id, song_id, playlist_id, event_id }+** = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, admin_id, profile_photo, email, username, full_name, password,title, genre, release_date, role , link, album_id,cover, playlist_name, listener_id, grade, comment, timestamp,event_name, location, venue, date, time} -> **Не ги содржи сите атрибути** |
| 83 | | 5. {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id}+ = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, profile_photo, email, username, full_name, password, |
| 84 | | title, genre, release_date, , role, , link, album_id, |
| 85 | | cover, playlist_name, listener_id, grade, comment, timestamp, |
| 86 | | event_name, location, venue, date, time, admin_id } -> Не ги содржи сите атрибути |
| | 74 | 5. **{user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id}+** = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_id, cover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> **Не ги содржи сите атрибути** |
| 88 | | 6. {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id}+ = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_id, cover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> Не ги содржи сите атрибути |
| | 76 | 6. **{user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id}+** = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_id, cover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> **Не ги содржи сите атрибути** |
| 91 | | 7. {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id}+ = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_idcover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> Не ги содржи сите атрибути |
| | 79 | 7. **{user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id}+** = {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_idcover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> **Не ги содржи сите атрибути** |
| | 82 | 8. **{user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id, non_admin_user_id}+** = {user_id, musical_entity_id, song_id, playlist_id, event_id, follower_id, followee_id, non_admin_user_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_id, artist_id, cover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> **Ги содржи сите атрибути** |
| 95 | | 8. {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id, non_admin_user_id}+ = {user_id, musical_entity_id, song_id, playlist_id, event_id, follower_id, followee_id, non_admin_user_id, profile_photo, email, username, full_name, password,title, genre, release_date, role, link, album_id, artist_id, cover, playlist_name, listener_id, grade, comment, timestamp, event_name, location, venue, date, time, admin_id } -> Ги содржи сите атрибути |
| 96 | | |
| 97 | | Избран примарен клуч: {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id, non_admin_user_id}[[br]] |
| 98 | | Релацијата ја задоволува 1НФ, но не ја задоволува 2НФ поради постоење на парцијални зависности |
| | 84 | **Избран примарен клуч: {user_id, musical_entity_id, song_id, playlist_id, event_id, artist_id, follower_id, followee_id, non_admin_user_id}**[[br]] |
| | 85 | Релацијата ја задоволува **1НФ**, но не ја задоволува **2НФ** поради постоење на парцијални зависности. |
| 104 | | user_id-> profile_photo, email, username, full_name, password |
| 105 | | musical_entity_id-> title, genre, release_date, artist_id |
| 106 | | song_id-> link, album_id |
| 107 | | playlist_id-> cover, playlist_name, listener_id |
| 108 | | event_id-> event_name, location, venue, date, time, artist_id, admin_id |
| | 91 | 1. user_id-> profile_photo, email, username, full_name, password |
| | 92 | 2. musical_entity_id-> title, genre, release_date, artist_id |
| | 93 | 3. song_id-> link, album_id |
| | 94 | 4. playlist_id-> cover, playlist_name, listener_id |
| | 95 | 5. event_id-> event_name, location, venue, date, time, artist_id, admin_id |
| 112 | | user_id-> profile_photo, email, username, full_name, password |
| 113 | | musical_entity_id-> title, genre, release_date, artist_id |
| 114 | | song_id-> link, album_id |
| 115 | | playlist_id-> cover, playlist_name, listener_id |
| 116 | | event_id-> event_name, location, venue, date, time, artist_id, admin_id |
| 117 | | (artist_id, musical_entity_id)-> role |
| 118 | | (listener_id, musical_entity_id)-> grade, comment |
| 119 | | (listener_id, song_id)-> timestamp |
| | 99 | - user_id-> profile_photo, email, username, full_name, password |
| | 100 | - musical_entity_id-> title, genre, release_date, artist_id |
| | 101 | - song_id-> link, album_id |
| | 102 | - playlist_id-> cover, playlist_name, listener_id |
| | 103 | - event_id-> event_name, location, venue, date, time, artist_id, admin_id |
| | 104 | - (artist_id, musical_entity_id)-> role |
| | 105 | - (listener_id, musical_entity_id)-> grade, comment |
| | 106 | - (listener_id, song_id)-> timestamp |
| 121 | | R1 {user_id, profile_photo, email, username, full_name, password} -> BCNF |
| 122 | | R2 {musical_entity_id, title, genre, release_date, artist_id} -> BCNF |
| 123 | | R3 {song_id, link, album_id} -> BCNF |
| 124 | | R4 {playlist_id, cover, playlist_name, listener_id} -> BCNF |
| 125 | | R5 {event_id, event_name, location, venue, date, time, artist_id, admin_id} -> Не задоволува 3НФ |
| 126 | | R6 {(artist_id, musical_entity_id), role} -> BCNF |
| 127 | | R7 {(listener_id, musical_entity_id), grade, comment} -> BCNF |
| 128 | | R8 {(listener_id, song_id), timestamp} -> BCNF |
| 129 | | R9 {(follower_id, followee_id)} -> BCNF |
| 130 | | R10 {(playlist_id, song_id)} -> BCNF |
| 131 | | R11 {(listener_id, musical_entity_id)} |
| 132 | | R12 {(listener_id, playlist_id)} |
| 133 | | R13 {(event_id, artist_id)} -> BCNF |
| | 108 | **R1 - {user_id, profile_photo, email, username, full_name, password} -> BCNF** |
| | 109 | |
| | 110 | **R2 - {musical_entity_id, title, genre, release_date, artist_id} -> BCNF** |
| | 111 | |
| | 112 | **R3 - {song_id, link, album_id} -> BCNF** |
| | 113 | |
| | 114 | **R4 - {playlist_id, cover, playlist_name, listener_id} -> BCNF** |
| | 115 | |
| | 116 | **R5 - {event_id, event_name, location, venue, date, time, artist_id, admin_id} -> Не задоволува 3НФ** |
| | 117 | |
| | 118 | **R6 - {(artist_id, musical_entity_id), role} -> BCNF** |
| | 119 | |
| | 120 | **R7 - {(listener_id, musical_entity_id), grade, comment} -> BCNF** |
| | 121 | |
| | 122 | **R8 - {(listener_id, song_id), timestamp} -> BCNF** |
| | 123 | |
| | 124 | **R9 - {(follower_id, followee_id)} -> BCNF** |
| | 125 | |
| | 126 | **R10 - {(playlist_id, song_id)} -> BCNF** |
| | 127 | |
| | 128 | **R11 - {(listener_id, musical_entity_id)}** |
| | 129 | |
| | 130 | **R12 - {(listener_id, playlist_id)}** |
| | 131 | |
| | 132 | **R13 - {(event_id, artist_id)} -> BCNF** |
| 144 | | R1 Клуч: user_id и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 145 | | R2 Клуч: musical_entity_id и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 146 | | R3 Клуч: song_id и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 147 | | R4 {playlist_id, cover, playlist_name, listener_id} -> BCNF |
| 148 | | Клуч: playlist_id и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 149 | | R5.1 Клуч: event_id и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 150 | | R6 Клуч: (artist_id, musical_entity_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 151 | | R7 Клуч: (listener_id, musical_entity_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 152 | | R8 Клуч: (listener_id, song_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 153 | | R9 Клуч: (follower_id, followee_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 154 | | R10 Клуч: (playlist_id, song_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 155 | | R11 Клуч: (listener_id, musical_entity_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 156 | | R12 Клуч: (listener_id, playlist_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 157 | | R13 Клуч: (event_id, artist_id) и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| 158 | | R14 Клуч: venue и сите атрибути зависат директно само од него. Релацијата е во БКНФ |
| | 143 | **R1 - Клуч: user_id и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 144 | |
| | 145 | **R2 - Клуч: musical_entity_id и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 146 | |
| | 147 | **R3 - Клуч: song_id и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 148 | |
| | 149 | **R4 - Клуч: playlist_id и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 150 | |
| | 151 | **R5.1 - Клуч: event_id и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 152 | |
| | 153 | **R6 - Клуч: (artist_id, musical_entity_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 154 | |
| | 155 | **R7 - Клуч: (listener_id, musical_entity_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 156 | |
| | 157 | **R8 - Клуч: (listener_id, song_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 158 | |
| | 159 | **R9 - Клуч: (follower_id, followee_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 160 | |
| | 161 | **R10 - Клуч: (playlist_id, song_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 162 | |
| | 163 | **R11 - Клуч: (listener_id, musical_entity_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 164 | |
| | 165 | **R12 - Клуч: (listener_id, playlist_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 166 | |
| | 167 | **R13 - Клуч: (event_id, artist_id) и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 168 | |
| | 169 | **R14 - Клуч: venue и сите атрибути зависат директно само од него. Релацијата е во BCNF** |
| | 170 | |
| 161 | | 1. Users {user_id, profile_photo, email, username, full_name, password} |
| 162 | | 2. Musical_Entities {musical_entity_id, title, genre, release_date, artist_id} |
| 163 | | 3. Songs {song_id, link, album_id} |
| 164 | | 4. Playlists {playlist_id, cover, playlist_name, listener_id} |
| 165 | | 5. Events {event_id, event_name, location, venue, date, time, artist_id, admin_id} |
| 166 | | 6. Artist_Contributions {artist_id, musical_entity_id, role} |
| 167 | | 7. Reviews {listener_id, musical_entity_id, grade, comment} |
| 168 | | 8. Listens {listener_id, song_id, timestamp} |
| 169 | | 9. Follows {follower_id, followee_id} |
| 170 | | 10. Playlist_Songs {playlist_id, song_id} |
| 171 | | 11. Likes {listener_id, musical_entity_id} |
| 172 | | 12. Saved_Playlists {listener_id, playlist_id} |
| 173 | | 13. Performs_At {event_id, artist_id} |
| 174 | | 14. Venues {venue, location} |
| | 173 | 1. **Users** {user_id, profile_photo, email, username, full_name, password} |
| | 174 | 2. **Musical_Entities** {musical_entity_id, title, genre, release_date, artist_id} |
| | 175 | 3. **Songs** {song_id, link, album_id} |
| | 176 | 4. **Playlists** {playlist_id, cover, playlist_name, listener_id} |
| | 177 | 5. **Events** {event_id, event_name, location, venue, date, time, artist_id, admin_id} |
| | 178 | 6. **Artist_Contributions** {artist_id, musical_entity_id, role} |
| | 179 | 7. **Reviews** {listener_id, musical_entity_id, grade, comment} |
| | 180 | 8. **Listens** {listener_id, song_id, timestamp} |
| | 181 | 9. **Follows** {follower_id, followee_id} |
| | 182 | 10. **Playlist_Songs** {playlist_id, song_id} |
| | 183 | 11. **Likes** {listener_id, musical_entity_id} |
| | 184 | 12. **Saved_Playlists** {listener_id, playlist_id} |
| | 185 | 13. **Performs_At** {event_id, artist_id} |
| | 186 | 14. **Venues** {venue, location} |