Changes between Version 34 and Version 35 of Нормализација и подобрувања на дизајнот
- Timestamp:
- 09/15/25 12:40:07 (4 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Нормализација и подобрувања на дизајнот
v34 v35 28 28 !TransactionId -> !RequestId, !BorrowerId, !LenderId, !InventoryId, !BorrowDate, !ReturnDate, !BorrowDuration 29 29 30 !SwapId -> !TransactionId1, !TransactionId230 !SwapId -> TransactionId1, TransactionId2 31 31 32 32 !ReviewId -> !TransactionId, !ReceiverId, !GiverId, Rating, !ReviewerComment, !ReviewDate … … 45 45 **Лево**: BookISBNId, !GenreId, !WishId, !SwapId, !ReviewId, !ReportId, !NotificationId 46 46 47 **Десно**: !FirstName, !LastName, Password, City, Neighborhood, Bio, Quote, Title, Author, Language, !ImageURL, ISBN, Genre, Availability, Condition, Priority, !RequestStatus, !RequestDate, !BorrowDate, !ReturnDate, !BorrowDuration, Rating, !ReviewerComment, !ReviewDate, !MsgTime, !MsgDate, !MessageContent ,!DateCreated, !FriendshipStatus, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, !RequesterId, !OwnerId, !BorrowerId, !LenderId, !TransactionId1, !TransactionId2, !ReceiverId, !GiverId, !MsgSenderId, !MsgReceiverId, !FriendshipSenderId, !FriendshipReceiverId, !ReportedUserId, !ReportingUserId47 **Десно**: !FirstName, !LastName, Password, City, Neighborhood, Bio, Quote, Title, Author, Language, ImageURL, ISBN, Genre, Availability, Condition, Priority, !RequestStatus, !RequestDate, !BorrowDate, !ReturnDate, !BorrowDuration, Rating, !ReviewerComment, !ReviewDate, !MsgTime, !MsgDate, !MessageContent ,!DateCreated, !FriendshipStatus, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, !RequesterId, !OwnerId, !BorrowerId, !LenderId, TransactionId1, TransactionId2, !ReceiverId, !GiverId, !MsgSenderId, !MsgReceiverId, !FriendshipSenderId, !FriendshipReceiverId, !ReportedUserId, !ReportingUserId 48 48 49 49 **Од двете страни**: !UserId, Email, Username, !BookId, !InventoryId, !RequestId, !TransactionId, !MessageId, !FriendshipId … … 53 53 54 54 55 BookISBNId += {!BookId, ISBN, Title, Author, Language, !ImageURL}56 57 Не ги содржи сите атрибути 58 59 !GenreId += {!BookId, Genre, Title, Author, Language, !ImageURL}55 BookISBNId += {!BookId, ISBN, Title, Author, Language, ImageURL} 56 57 Не ги содржи сите атрибути 58 59 !GenreId += {!BookId, Genre, Title, Author, Language, ImageURL} 60 60 61 61 Не ги содржи сите атрибути … … 65 65 Не ги содржи сите атрибути 66 66 67 !SwapId += { !TransactionId1, !TransactionId2, !RequestId, !BorrowerId, !LenderId, !InventoryId, !BorrowDate, !ReturnDate, !BorrowDuration, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, Availability, Condition, !BookId, Title, Author, Language, !ImageURL}67 !SwapId += {TransactionId1, TransactionId2, !RequestId, !BorrowerId, !LenderId, !InventoryId, !BorrowDate, !ReturnDate, !BorrowDuration, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, Availability, Condition, !BookId, Title, Author, Language, !ImageURL} 68 68 69 69 Не ги содржи сите атрибути … … 90 90 !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, 91 91 !UserId, Availability, Condition, 92 Title, Author, Language, !ImageURL}92 Title, Author, Language, ImageURL} 93 93 94 94 Не ги содржи сите атрибути … … 138 138 !RequesterId, !OwnerId, **!BookId**, !RequestStatus, !RequestDate, 139 139 Availability, Condition, 140 ISBN, Genre, !UserId, Priority, !TransactionId1, !TransactionId2,140 ISBN, Genre, !UserId, Priority, TransactionId1, TransactionId2, 141 141 !ReportedUserId, !ReportingUserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, 142 142 !MessageId, !FriendshipId, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, … … 144 144 !FriendshipSenderId, !FriendshipReceiverId, !DateCreated, !FriendshipStatus} 145 145 146 R2 е се уште во 2НФ поради останатите парцијални зависности. Една од нив е !UserId -> FirstName. За да го решиме ова, ќе го ставиме !UserId во посебна релација R3, заедно со сите атрибути поврзани со него, а сите останати атрибути ги пренесуваме во R4, заедно со !UserId како заеднички атрибут.146 R2 е се уште во 2НФ поради останатите парцијални зависности. Една од нив е !UserId -> !FirstName. За да го решиме ова, ќе го ставиме !UserId во посебна релација R3, заедно со сите атрибути поврзани со него, а сите останати атрибути ги пренесуваме во R4, заедно со !UserId како заеднички атрибут. 147 147 148 148 ---- … … 163 163 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 164 164 Availability, Condition, 165 ISBN, Genre, **!UserId**, Priority, !TransactionId1, !TransactionId2,165 ISBN, Genre, **!UserId**, Priority, TransactionId1, TransactionId2, 166 166 !ReportedUserId, !ReportingUserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, 167 167 !MessageId, !FriendshipId, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, … … 181 181 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 182 182 Availability, Condition, 183 Genre, !UserId, Priority, !TransactionId1, !TransactionId2,183 Genre, !UserId, Priority, TransactionId1, TransactionId2, 184 184 !ReportedUserId, !ReportingUserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, 185 185 !MessageId, !FriendshipId, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, … … 199 199 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 200 200 Availability, Condition, 201 !UserId, Priority, !TransactionId1, !TransactionId2,201 !UserId, Priority, TransactionId1, TransactionId2, 202 202 !ReportedUserId, !ReportingUserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, 203 203 !MessageId, !FriendshipId, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, … … 215 215 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 216 216 Availability, Condition, 217 !UserId, Priority, !TransactionId1, !TransactionId2,217 !UserId, Priority, TransactionId1, TransactionId2, 218 218 !ReportedUserId, !ReportingUserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, 219 219 !MessageId, !FriendshipId, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, … … 231 231 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 232 232 Availability, Condition, 233 !UserId, Priority, !TransactionId1, !TransactionId2,233 !UserId, Priority, TransactionId1, TransactionId2, 234 234 !MessageId, !FriendshipId, Type, !NotifTime, !NotifDate, Description, !NotificationStatus, 235 235 !MsgSenderId, !MsgReceiverId, !MsgTime, !MsgDate, !MessageContent, … … 246 246 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 247 247 Availability, Condition, 248 !UserId, Priority, !TransactionId1, !TransactionId2,248 !UserId, Priority, TransactionId1, TransactionId2, 249 249 !MessageId, !FriendshipId, 250 250 !MsgSenderId, !MsgReceiverId, !MsgTime, !MsgDate, !MessageContent, … … 261 261 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 262 262 Availability, Condition, 263 !UserId, Priority, !TransactionId1, !TransactionId2,263 !UserId, Priority, TransactionId1, TransactionId2, 264 264 !MessageId, !FriendshipId, 265 265 !MsgSenderId, !MsgReceiverId, !MsgTime, !MsgDate, !MessageContent, … … 275 275 !RequestId, **!InventoryId**, 276 276 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 277 !UserId, Priority, !TransactionId1, !TransactionId2,277 !UserId, Priority, TransactionId1, TransactionId2, 278 278 !MessageId, !FriendshipId, 279 279 !MsgSenderId, !MsgReceiverId, !MsgTime, !MsgDate, !MessageContent, … … 289 289 !RequestId, !InventoryId, 290 290 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 291 !UserId, !TransactionId1, !TransactionId2,291 !UserId, TransactionId1, TransactionId2, 292 292 !MessageId, !FriendshipId, 293 293 !MsgSenderId, !MsgReceiverId, !MsgTime, !MsgDate, !MessageContent, … … 303 303 !RequestId, !InventoryId, 304 304 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 305 !UserId, !TransactionId1, !TransactionId2,305 !UserId, TransactionId1, TransactionId2, 306 306 **!MessageId**, !FriendshipId, 307 307 !FriendshipSenderId, !FriendshipReceiverId, !DateCreated, !FriendshipStatus} … … 316 316 !RequestId, !InventoryId, 317 317 !RequesterId, !OwnerId, !BookId, !RequestStatus, !RequestDate, 318 !UserId, !TransactionId1, !TransactionId2,318 !UserId, TransactionId1, TransactionId2, 319 319 !MessageId, **!FriendshipId**} 320 320 321 321 ---- 322 322 323 R25 = {**!RequestId**, !RequesterId, !OwnerId, ,!RequestStatus, !RequestDate}323 R25 = {**!RequestId**, !RequesterId, !OwnerId, !RequestStatus, !RequestDate} 324 324 325 325 ---- … … 328 328 **!RequestId**, !InventoryId, 329 329 !BookId, 330 !UserId, !TransactionId1, !TransactionId2,330 !UserId, TransactionId1, TransactionId2, 331 331 !MessageId, !FriendshipId} 332 332 333 333 ---- 334 334 335 R27 = { **!SwapId**, !TransactionId1, !TransactionId2 }335 R27 = { **!SwapId**, TransactionId1, TransactionId2 } 336 336 337 337 ---- … … 463 463 **Genre** 464 464 465 R7 = {**__ !GenreId__**, **Genre**}465 R7 = {**__GenreId__**, **Genre**} 466 466 467 467 468 468 **Review** 469 469 470 R9 = {**__ !ReviewId__**, **__!ReceiverId*__**, **__!GiverId*__**, **Rating**, !ReviewerComment, **!ReviewDate**}470 R9 = {**__ReviewId__**, **__!ReceiverId*__**, **__!GiverId*__**, **Rating**, !ReviewerComment, **!ReviewDate**} 471 471 • !ReceiverId референцира кон !AppUser(!UserId) 472 472 • !GiverId референцира кон !AppUser(!UserId) … … 494 494 **!LibraryBook** 495 495 496 R17 = {**__ !InventoryId__**, **Availability**, **Condition**}496 R17 = {**__InventoryId__**, **Availability**, **Condition**} 497 497 498 498 499 499 **!WishlistBook** 500 500 501 R19 = {**__ !WishId__**, Priority}501 R19 = {**__WishId__**, Priority} 502 502 503 503 504 504 **Message** 505 505 506 R21 = {**__ !MessageId__**, **__!MsgSenderId*__**, **__!MsgReceiverId*__**, **!MsgTime**, **!MsgDate**, **!MessageContent**}506 R21 = {**__MessageId__**, **__!MsgSenderId*__**, **__!MsgReceiverId*__**, **!MsgTime**, **!MsgDate**, **!MessageContent**} 507 507 • !MsgSenderId референцира кон !AppUser(!UserId) 508 508 • !MsgReceiverId референцира кон !AppUser(!UserId) … … 511 511 **!FriendRequest** 512 512 513 R23 = {**__ !FriendshipId__**, **__!FriendshipSenderId*__**, **__!FriendshipReceiverId*__**, **!DateCreated**, **!FriendshipStatus**}513 R23 = {**__FriendshipId__**, **__!FriendshipSenderId*__**, **__!FriendshipReceiverId*__**, **!DateCreated**, **!FriendshipStatus**} 514 514 • !FriendshipSenderId референцира кон !AppUser(!UserId) 515 515 • !FriendshipReceiverId референцира кон !AppUser(!UserId) … … 517 517 **!BookRequest** 518 518 519 R25 = {**__ !RequestId__**, **__!RequesterId*__**, **__!OwnerId*__**, **!RequestStatus**, **!RequestDate**}519 R25 = {**__RequestId__**, **__!RequesterId*__**, **__!OwnerId*__**, **!RequestStatus**, **!RequestDate**} 520 520 • !RequesterId референцира кон !AppUser(!UserId) 521 521 • !OwnerId референцира кон !AppUser(!UserId) … … 531 531 R301 = {!BookId*, !GenreId*} 532 532 533 ** !ISBNLink**533 **ISBNLink** 534 534 535 535 R302 = {!BookId*, BookISBNId*}