| 3 | | **Почетна релација:** |
| 4 | | |
| 5 | | R(!UserId, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, !BookId, Title, Author, Language, !ImageURL, !BookISBNId, ISBN, !GenreId, Genre, !InventoryId, Availability, Condition, !WishId, Priority, !RequestId, !RequestStatus, !RequestDate, !TransactionId, !BorrowDate, !ReturnDate, !BorrowDuration, !SwapId, !ReviewId, Rating, !ReviewerComment, !ReviewDate, !MessageId, !MsgTime, !MsgDate, !MessageContent, !FriendshipId, !DateCreated, !FriendshipStatus, !ReportId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, !NotificationId, Type, !NotifTime, !NotifDate, !NotificationStatus, !TN_Description, !MN_Description, !FR_Description, !BR_Description) |
| 6 | | |
| 7 | | |
| 8 | | **Функционални зависности:** |
| 9 | | |
| 10 | | !UserId -> !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote |
| 11 | | Email -> !UserId, !FirstName, !LastName, Username, Password, City, Neighborhood, Bio, Quote |
| 12 | | Username -> !UserId, !FirstName, !LastName, Email, Password, City, Neighborhood, Bio, Quote |
| 13 | | |
| 14 | | !BookId -> Title, Author, Language, !ImageURL |
| 15 | | |
| 16 | | !BookISBNId -> !BookId, ISBN |
| 17 | | |
| 18 | | !GenreId -> !BookId, Genre |
| 19 | | |
| 20 | | !InventoryId-> !UserId, Availability, Condition, !BookId |
| 21 | | |
| 22 | | !WishId -> !UserId, Priority, !BookId |
| 23 | | |
| 24 | | !RequestId -> !UserId, !InventoryId, !RequestStatus, !RequestDate |
| 25 | | |
| 26 | | !TransactionId -> !RequestId, !BorrowDate, !ReturnDate, !BorrowDuration |
| 27 | | |
| 28 | | !SwapId -> !TransactionId |
| 29 | | |
| 30 | | !ReviewId -> !TransactionId, !UserId, Rating, !ReviewerComment, !ReviewDate |
| 31 | | |
| 32 | | !MessageId -> !UserId, !MsgTime, !MsgDate, !MessageContent |
| 33 | | |
| 34 | | !FriendshipId -> !UserId, !DateCreated, !FriendshipStatus |
| 35 | | |
| 36 | | !ReportId -> !UserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity |
| 37 | | |
| 38 | | !NotificationId -> Type, !NotifTime, !NotifDate, !NotificationStatus |
| 39 | | |
| 40 | | !TransactionId -> !NotificationId, !TN_Description |
| 41 | | |
| 42 | | !MessageId -> !NotificationId, !MN_Description |
| 43 | | |
| 44 | | !FriendshipId -> !NotificationId, !FR_Description |
| 45 | | |
| 46 | | !RequestId -> !NotificationId, !BR_Description |
| 47 | | |
| 48 | | |
| 49 | | |
| 50 | | === === |
| 51 | | |
| 52 | | **Лево:** !BookISBNId,!GenreId, !WishId, !SwapId, !ReviewId, !ReportId |
| 53 | | |
| 54 | | **Десно:** 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 |
| 55 | | |
| 56 | | **Од двете страни:** !UserId, Email, Username, !BookId, !InventoryId, !RequestId, !TransactionId, !MessageId, !FriendshipId, !NotificationId, !TransactionId, !MessageId, !FriendRequestId, !BookRequestId |
| 57 | | |
| 58 | | === === |
| 59 | | |
| 60 | | **BookISBNId** += {!BookId, ISBN, Title, Author, Language, !ImageURL} |
| 61 | | Не ги содржи сите атрибути |
| 62 | | |
| 63 | | **GenreId** += {!BookId, Genre, Title, Author, Language, !ImageURL} |
| 64 | | Не ги содржи сите атрибути |
| 65 | | |
| 66 | | **WishId** += {!UserId, Priority, !BookId, Title, Author, Language, !ImageURL, FirstName, LastName, Email, Username, Password, City, Neighborhood, Bio, Quote} |
| 67 | | Не ги содржи сите атрибути |
| 68 | | |
| 69 | | **SwapId** += {!TransactionId, !RequestId, !UserId, !InventoryId, !BorrowDate, !ReturnDate, !BorrowDuration, !BookId, !RequestStatus, !RequestDate, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, Availability, Condition, Title, Author, Language, !ImageURL} |
| 70 | | Не ги содржи сите атрибути |
| 71 | | |
| 72 | | **ReviewId** += {!TransactionId, !UserId, Rating, !ReviewerComment, !ReviewDate, !RequestId, !InventoryId, !BorrowDate, !ReturnDate, !BorrowDuration, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, !BookId, !RequestStatus, !RequestDate, Availability, Condition, Title, Author, Language, !ImageURL} |
| 73 | | Не ги содржи сите атрибути |
| 74 | | |
| 75 | | **ReportId** += {!UserId, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote} |
| 76 | | Не ги содржи сите атрибути |
| 77 | | |
| 78 | | |
| 79 | | |
| 80 | | **!ReviewId, !BookISBNId, !GenreId, !WishId, !SwapId, !ReportId** = { !ReviewId, !BookISBNId, !GenreId, !WishId, !SwapId, !ReportId, !NotificationId, !TransactionId, !UserId, Rating, !ReviewerComment, !ReviewDate, !InventoryId, !BorrowDate, !ReturnDate, !BorrowDuration, !FirstName, !LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, Availability, Condition, !BookId, Title, Author, Language, !ImageURL, ISBN, Genre, Priority, !ReportType, !ReportDate, Details, !ReportStatus, !ReportedEntity, !MessageId, !FriendshipId, !RequestId, Type, !NotifTime, !NotifDate, !NotificationStatus, MsgTime, !MsgDate, !MessageContent, !DateCreated, !FriendshipStatus, !RequestStatus, !RequestDate, !TN_Description, !MN_Description, !FR_Description, !BR_Description} |
| 81 | | |
| 82 | | **Следува дека е единствен кандидат клуч и го прогласуваме за примарен клуч. ** |
| 83 | | |
| 84 | | === === |
| 85 | | |
| 86 | | **Декомпозиција** |
| 87 | | |
| 88 | | |
| 89 | | R1 (BookId, Title, Author, Language, ImageURL) |
| 90 | | |
| 91 | | |
| 92 | | R2 (BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, UserId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, FirstName, LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, Availability, Condition, ISBN, Genre, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, MessageId, FriendshipId, RequestId, Type, NotifTime, NotifDate, Description, NotificationStatus, MsgTime, MsgDate, MessageContent, DateCreated, FriendshipStatus, RequestStatus, RequestDate, TN_Description, MN_Description, FR_Description, BR_Description) |
| 93 | | |
| 94 | | R21 (BookISBNId, GenreId, BookId, ISBN, Genre) |
| 95 | | |
| 96 | | |
| 97 | | R22 (BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, UserId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, FirstName, LastName, Email, Username, Password, City, Neighborhood, Bio, Quote, Availability, Condition, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, MessageId, FriendshipId, RequestId, Type, NotifTime, NotifDate, NotificationStatus, MsgTime, MsgDate, MessageContent, DateCreated, FriendshipStatus, RequestStatus, RequestDate, TN_Description, MN_Description, FR_Description, BR_Description) |
| 98 | | |
| 99 | | R211(BookId, BookISBNId, ISBN) |
| 100 | | |
| 101 | | |
| 102 | | R212(BookId, GenreId, Genre) |
| 103 | | |
| 104 | | R221(UserId, FirstName, LastName, Email, Username, Password, City, Neighborhood, Bio, Quote) |
| 105 | | |
| 106 | | |
| 107 | | R222(UserId, BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, MessageId, FriendshipId, RequestId, Type, NotifTime, NotifDate,NotificationStatus, MsgTime, MsgDate, MessageContent, DateCreated, FriendshipStatus, RequestStatus, RequestDate, TN_Description, MN_Description, FR_Description, BR_Description) |
| 108 | | |
| 109 | | |
| 110 | | R2221(NotificationId, Type, NotifTime, NotifDate, NotificationStatus) |
| 111 | | |
| 112 | | |
| 113 | | R2222(NotificationId, UserId, BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, MessageId, FriendshipId, RequestId, MsgTime, MsgDate, MessageContent, DateCreated, FriendshipStatus, RequestStatus, RequestDate, TN_Description, MN_Description, FR_Description, BR_Description) |
| 114 | | |
| 115 | | R22221(TransactionId, NotificationId, TN_Description, RequestId, BorrowDate, ReturnDate, BorrowDuration) |
| 116 | | |
| 117 | | |
| 118 | | R22222(TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, MessageId, FriendshipId, RequestId, MsgTime, MsgDate, MessageContent, DateCreated, FriendshipStatus, RequestStatus, RequestDate, MN_Description, FR_Description, BR_Description) |
| 119 | | |
| 120 | | R222211(TransactionId, NotificationId, TN_Description) |
| 121 | | |
| 122 | | |
| 123 | | R222212(TransactionId, RequestId, BorrowDate, ReturnDate, BorrowDuration) |
| 124 | | |
| 125 | | R222221(MessageId, NotificationId, MN_Description, UserId, MsgTime, MsgDate, MessageContent) |
| 126 | | |
| 127 | | |
| 128 | | R222222(MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, FriendshipId, RequestId, DateCreated, FriendshipStatus, RequestStatus, RequestDate, FR_Description, BR_Description) |
| 129 | | |
| 130 | | R2222211(MessageId, NotificationId, MN_Description) |
| 131 | | |
| 132 | | |
| 133 | | R2222212(MessageId, UserId, MsgTime, MsgDate, MessageContent) |
| 134 | | |
| 135 | | R2222221(FriendshipId, NotificationId, FR_Description, UserId, DateCreated, FriendshipStatus) |
| 136 | | |
| 137 | | |
| 138 | | R2222222(FriendshipId, MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, ReportId, NotificationId, TransactionId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, ReportType, ReportDate, Details, ReportStatus, ReportedEntity, RequestId, RequestStatus, RequestDate, BR_Description) |
| 139 | | |
| 140 | | |
| 141 | | R22222211(FriendshipId, NotificationId, FR_Description) |
| 142 | | |
| 143 | | |
| 144 | | R22222212(FriendshipId, UserId, DateCreated, FriendshipStatus) |
| 145 | | |
| 146 | | R22222221(ReportId, UserId, ReportType, ReportDate, Details, ReportStatus, ReportedEntity) |
| 147 | | |
| 148 | | |
| 149 | | R22222222( ReportId, FriendshipId, MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, ReviewId, BookISBNId, GenreId, WishId, SwapId, NotificationId, TransactionId, Rating, ReviewerComment, ReviewDate, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, RequestId, RequestStatus, RequestDate, BR_Description) |
| 150 | | |
| 151 | | R222222221( ReviewId, TransactionId, UserId, Rating, ReviewerComment, ReviewDate) |
| 152 | | |
| 153 | | |
| 154 | | R222222222( ReviewId, ReportId, FriendshipId, MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, BookISBNId, GenreId, WishId, SwapId, NotificationId, TransactionId, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, RequestId, RequestStatus, RequestDate, BR_Description) |
| 155 | | |
| 156 | | |
| 157 | | R2222222221(RequestId, NotificationId, BR_Description, UserId, InventoryId, RequestStatus, RequestDate) |
| 158 | | |
| 159 | | |
| 160 | | R2222222222( RequestId, ReportId, FriendshipId, MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, BookISBNId, GenreId, WishId, SwapId, NotificationId, TransactionId, InventoryId, BorrowDate, ReturnDate, BorrowDuration, Availability, Condition, Priority, RequestId) |
| 161 | | |
| 162 | | |
| 163 | | R22222222211(RequestId, NotificationId, BR_Description) |
| 164 | | |
| 165 | | |
| 166 | | R22222222212(RequestId, UserId, InventoryId, RequestStatus, RequestDate) |
| 167 | | |
| 168 | | R22222222221(TransactionId, SwapId, RequestId, BorrowDate, ReturnDate, BorrowDuration) |
| 169 | | |
| 170 | | |
| 171 | | R22222222222( TransactionId, SwapId, ReportId, FriendshipId, MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, BookISBNId, GenreId, WishId, NotificationId, InventoryId, Availability, Condition, Priority, RequestId) |
| 172 | | |
| 173 | | |
| 174 | | R222222222211(TransactionId, RequestId, BorrowDate, ReturnDate, BorrowDuration) |
| 175 | | |
| 176 | | |
| 177 | | R222222222211(TransactionId, SwapId) |
| 178 | | |
| 179 | | |
| 180 | | R222222222221( InvenotryId, WishId, UserId, Availability, Condition, BookId, Priority) |
| 181 | | |
| 182 | | |
| 183 | | R222222222222( ReportId, FriendshipId, MessageId, TransactionId, NotificationId, UserId, BookISBNId, GenreId, BookId, BookISBNId, GenreId, WishId, SwapId, NotificationId, TransactionId, InventoryId, RequestId) |
| 184 | | |
| 185 | | R2222222222211( InvenotryId, UserId, Availability, Condition, BookId) |
| 186 | | |
| 187 | | |
| 188 | | R2222222222212( WishId, UserId, Priority, BookId) |
| | 2 | * [wiki:Normalization011 прв обид] |
| | 3 | * [wiki:Normalization012 втор обид] |