Changes between Version 20 and Version 21 of P5


Ignore:
Timestamp:
04/21/26 12:01:28 (11 days ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • P5

    v20 v21  
    139139NEED_APPROVAL(suggestion_id, story_id, chapter_id) → There are no other attributes, so it satisfies 2NF.
    140140
     141For a decomposition to be lossless, the common attributes between two joined relations must be a superkey in at least one of them. We verify this for all connected relations:
     142
     143CHAPTER ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     144
     145STORY ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     146
     147READING_LIST ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     148
     149AI_SUGGESTION ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     150
     151COMMENT ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     152
     153COMMENT ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     154
     155STATUS ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     156
     157CONTENT_TYPE ⋈ NOTIFICATION: common attribute notification_id → notification_id is the primary key of NOTIFICATION
     158
     159SUGGESTION_TYPE ⋈ AI_SUGGESTION: common attribute suggestion_id → suggestion_id is the primary key of AI_SUGGESTION
     160
     161LIKES ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     162
     163LIKES ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     164
     165COLLABORATION ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     166
     167COLLABORATION ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     168
     169ROLES ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     170
     171ROLES ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     172
     173PERMISSION_LEVEL ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     174
     175PERMISSION_LEVEL ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     176
     177HAS_GENRE ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     178
     179HAS_GENRE ⋈ GENRE: common attribute genre_id → genre_id is the primary key of GENRE
     180
     181READING_LIST_ITEMS ⋈ READING_LIST: common attribute list_id → list_id is the primary key of READING_LIST
     182
     183READING_LIST_ITEMS ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     184
     185NOTIFY ⋈ USERS: common attribute user_id → user_id is the primary key of USERS
     186
     187NOTIFY ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     188
     189NOTIFY ⋈ NOTIFICATION: common attribute notification_id → notification_id is the primary key of NOTIFICATION
     190
     191NEED_APPROVAL ⋈ AI_SUGGESTION: common attribute suggestion_id → suggestion_id is the primary key of AI_SUGGESTION
     192
     193NEED_APPROVAL ⋈ STORY: common attribute story_id → story_id is the primary key of STORY
     194
     195NEED_APPROVAL ⋈ CHAPTER: common attribute chapter_id → chapter_id is the primary key of CHAPTER
     196
     197In every case the common attributes form a primary key in at least one of the joined relations, so all joins are lossless and no information is lost during decomposition.
     198
    141199Since there are no partial dependencies in any of the resulting tables, this schema satisfies 2NF.
    142200