Changes between Version 10 and Version 11 of Normalization
- Timestamp:
- 07/07/26 18:47:39 (2 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Normalization
v10 v11 8 8 9 9 - FD1: user_id -> profile_photo, email, username, full_name, password 10 - FD2: musical_entity_id -> title, genre, me_cover,release_date, artist_id10 - FD2: musical_entity_id -> title, genre, release_date, artist_id 11 11 - FD3: song_id -> link, album_id 12 12 - FD4: playlist_id -> playlist_cover, playlist_name, listener_id … … 28 28 29 29 **Десно**: 30 profile_photo, email, username, full_name, password, title, genre, release_date, me_cover,link, playlist_cover, playlist_name, event_name, location, venue, date, time, role, grade, comment30 profile_photo, email, username, full_name, password, title, genre, release_date, link, playlist_cover, playlist_name, event_name, location, venue, date, time, role, grade, comment 31 31 32 32 **Лево и десно**: … … 37 37 === Глобална релација 38 38 39 R={ playlist_id, event_id, song_id, timestamp, admin_id, profile_photo, email, username, full_name, password, title, genre, release_date, me_cover,link, playlist_cover, playlist_name, event_name, location, venue, date, time, role, grade, comment, user_id, musical_entity_id, artist_id, non_admin_user_id, album_id, listener_id}39 R={ playlist_id, event_id, song_id, timestamp, admin_id, profile_photo, email, username, full_name, password, title, genre, release_date, link, playlist_cover, playlist_name, event_name, location, venue, date, time, role, grade, comment, user_id, musical_entity_id, artist_id, non_admin_user_id, album_id, listener_id} 40 40 41 41 … … 45 45 1. **playlist_id+** = {playlist_id, playlist_name, playlist_cover, listener_id, user_id, full_name, email, password, username, profile_photo} -> **Не ги содржи сите атрибути** 46 46 2. **event_id+** = {event_id, event_name, location, venue, date, time, user_id, full_name, email, password, username, profile_photo} -> **Не ги содржи сите атрибути** 47 3. **song_id+** = {song_id, link, album_id, musical_entity_id, title, genre, me_cover,release_date, artist_id, non_admin_user_id, user_id, full_name, email, password, username, profile_photo} -> **Не ги содржи сите атрибути**47 3. **song_id+** = {song_id, link, album_id, musical_entity_id, title, genre, release_date, artist_id, non_admin_user_id, user_id, full_name, email, password, username, profile_photo} -> **Не ги содржи сите атрибути** 48 48 4. **timestamp+** = {timestamp} -> **Не ги содржи сите атрибути** 49 49 5. **admin_id+** = {admin_id, user_id, full_name, email, password, username, profile_photo } -> **Не ги содржи сите атрибути** … … 56 56 тие мора да бидат дел од примарниот клуч. 57 57 58 **{playlist_id, event_id, song_id, timestamp, admin_id}+** = { playlist_id, event_id, song_id, timestamp, admin_id, playlist_name, playlist_cover, user_id, listener_id, full_name, email, password, username, profile_photo, event_name, location, venue, date, time, link, album_id, musical_entity_id, title, genre, me_cover,release_date, artist_id, non_admin_user_id, role, grade, comment}58 **{playlist_id, event_id, song_id, timestamp, admin_id}+** = { playlist_id, event_id, song_id, timestamp, admin_id, playlist_name, playlist_cover, user_id, listener_id, full_name, email, password, username, profile_photo, event_name, location, venue, date, time, link, album_id, musical_entity_id, title, genre, release_date, artist_id, non_admin_user_id, role, grade, comment} 59 59 60 60 Покривачот составен од сите атрибути кои се наоѓаат само од левата страна ги содржи сите атрибути на глобалната релација. Всушност тоа ни е и минимален суперклуч. … … 89 89 R1 = R - {playlist_name, playlist_cover} 90 90 91 R1 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, full_name, email, password, username, profile_photo, event_name, location, venue, date, time, link, album_id, musical_entity_id, title, genre, me_cover,release_date, artist_id, non_admin_user_id, role, grade, comment}91 R1 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, full_name, email, password, username, profile_photo, event_name, location, venue, date, time, link, album_id, musical_entity_id, title, genre, release_date, artist_id, non_admin_user_id, role, grade, comment} 92 92 93 93 Lossless join: Релацијата може да се реконструира преку join со `playlist_id`. … … 100 100 R2 = R1 - {link} 101 101 102 R2 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, full_name, email, password, username, profile_photo, event_name, location, venue, date, time,musical_entity_id, title, genre, me_cover,release_date, artist_id,non_admin_user_id, role, grade, comment}102 R2 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, full_name, email, password, username, profile_photo, event_name, location, venue, date, time,musical_entity_id, title, genre, release_date, artist_id,non_admin_user_id, role, grade, comment} 103 103 104 104 Lossless join: Релацијата може да се реконструира преку join со `song_id` … … 111 111 R3 = R2 - {event_name, location, venue, date, time} 112 112 113 R3 = {playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, full_name, email, password, username, profile_photo, musical_entity_id, title, genre, me_cover,release_date, artist_id, non_admin_user_id, role, grade, comment}113 R3 = {playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, full_name, email, password, username, profile_photo, musical_entity_id, title, genre, release_date, artist_id, non_admin_user_id, role, grade, comment} 114 114 115 115 Lossless join: Релацијата може да се реконструира преку join со `event_id` … … 131 131 3. Events(event_id, event_name, location, venue, date, time, user_id) 132 132 4. Admins(admin_id, user_id) 133 5. R3 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, full_name, email, password, username, profile_photo, musical_entity_id, title, genre, me_cover,release_date, artist_id, non_admin_user_id, role, grade, comment }133 5. R3 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, full_name, email, password, username, profile_photo, musical_entity_id, title, genre, release_date, artist_id, non_admin_user_id, role, grade, comment } 134 134 135 135 … … 162 162 R4 = R3 - {profile_photo, email, username, full_name, password} 163 163 164 R4 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, musical_entity_id, title, genre, me_cover,release_date, artist_id, non_admin_user_id, role, grade, comment}164 R4 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, musical_entity_id, title, genre, release_date, artist_id, non_admin_user_id, role, grade, comment} 165 165 166 166 Lossless join: Релацијата може да се реконструира преку join со `user_id` … … 172 172 Декомпозиција по FD12: 173 173 174 **Albums(album_id, musical_entity_id)** -> има транзитивна преку `FD2: musical_entity_id-> title, genre, me_cover,release_date, artist_id`174 **Albums(album_id, musical_entity_id)** -> има транзитивна преку `FD2: musical_entity_id-> title, genre, release_date, artist_id` 175 175 176 176 Lossless join: Релацијата може да се реконструира преку join со `album_id` … … 180 180 Декомпозиција по FD2: 181 181 182 **Musical_Entities(musical_entity_id, title, genre, me_cover,release_date, artist_id)**182 **Musical_Entities(musical_entity_id, title, genre, release_date, artist_id)** 183 183 184 184 `Albums(album_id)` - `album_id` е всушност примарен клуч во релацијата `Albums` и надворешен клуч во релацијата `Musical_Entities`. 185 185 186 R5 = R4 - {title, genre, me_cover,release_date}186 R5 = R4 - {title, genre, release_date} 187 187 188 188 R5 = { playlist_id, event_id, song_id, timestamp, admin_id,user_id, listener_id, album_id, musical_entity_id, artist_id, non_admin_user_id, role, grade, comment} … … 192 192 Dependency preservation: FD2 е сочувана преку новата релација `Musical_Entities` 193 193 194 `Musical_Entities(musical_entity_id, title, genre, me_cover,release_date, artist_id)` -> има транзитивна зависност преку `FD11: artist_id -> non_admin_user_id`194 `Musical_Entities(musical_entity_id, title, genre, release_date, artist_id)` -> има транзитивна зависност преку `FD11: artist_id -> non_admin_user_id` 195 195 196 196 Декомпозиција по FD11: … … 216 216 7. Users(user_id, profile_photo, email, username, full_name, password) 217 217 8. Albums(album_id) 218 9. Musical_Entities(musical_entity_id, title, genre, me_cover,release_date, artist_id)218 9. Musical_Entities(musical_entity_id, title, genre, release_date, artist_id) 219 219 10. Artists(artist_id) 220 220 11. R5 = { playlist_id, event_id, song_id, timestamp, admin_id, user_id, listener_id, album_id, musical_entity_id, artist_id, non_admin_user_id, role, grade, comment} … … 259 259 7. Users(**user_id**, profile_photo, email, username, full_name, password) -> **задоволува БКНФ** 260 260 8. Albums(**album_id**) -> **задоволува БКНФ** 261 9. Musical_Entities(**musical_entity_id**, title, genre, me_cover,release_date, artist_id) -> **задоволува БКНФ**261 9. Musical_Entities(**musical_entity_id**, title, genre, release_date, artist_id) -> **задоволува БКНФ** 262 262 10. Artist_Contributions(**artist_id, musical_entity_id**, role) -> **задоволува БКНФ** 263 263 11. Reviews(**listener_id, musical_entity_id**, grade, comment) -> **задоволува БКНФ** … … 296 296 7. Users(**user_id**, profile_photo, email, username, full_name, password) 297 297 8. Albums(**album_id**) 298 9. Musical_Entities(**musical_entity_id**, title, genre, me_cover,release_date, artist_id)298 9. Musical_Entities(**musical_entity_id**, title, genre, release_date, artist_id) 299 299 10. Artist_Contributions(**artist_id, musical_entity_id**, role) 300 300 11. Reviews(**listener_id, musical_entity_id**, grade, comment)
