Changes between Version 5 and Version 6 of P2


Ignore:
Timestamp:
02/13/26 14:23:25 (5 weeks ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • P2

    v5 v6  
    99== Tables ==
    1010
    11 1. STORY(__'''story_ID'''__, '''mature_content''', '''short_description''', image, '''content''', __user_ID__*)
    12    * user_ID references WRITER
    13    * status (multi-valued attribute, see table STATUS)
     11= Relational Design for ChapterX =
    1412
    15 2. STATUS(__'''story_ID'''__*, __'''status'''__)
    16    * story_ID references STORY
     13== Notation ==
    1714
    18 3. USER(__'''user_ID'''__, '''username''', '''email''', '''name''', '''surname''', '''password''')
     15* Primary keys are bolded and underlined.
     16* Foreign keys are marked with `*` at the end of their name and the referenced entity is written in parentheses.
     17* Complex attributes are bolded, and their containing attributes are following them, made italic.
     18* Multivalued attributes have their own table
    1919
    20 4. ADMIN(__'''user_ID'''__*)
    21    * user_ID references USER
     20== Tables ==
    2221
    23 5. REGULAR_USER(__'''user_ID'''__*)
    24    * user_ID references USER
     221. **USER** (**__{{{user_ID}}}__**, {{{username}}}, {{{email}}}, {{{name}}}, {{{surname}}}, {{{password}}})
    2523
    26 6. WRITER(__'''user_ID'''__*, created_story)
    27    * user_ID references USER
     242. **ADMIN** (**__{{{user_ID*}}}__** (USER))
    2825
    29 7. CHAPTER(__'''chapter_ID'''__, '''chapter_name''', '''title''', '''content''', word_count, rating, '''published_at''', view_count, __story_ID__*)
    30    * story_ID references STORY
     263. **REGULAR_USER** (**__{{{user_ID*}}}__** (USER))
    3127
    32 8. GENRE(__'''genre_ID'''__, '''name''')
     284. **WRITER** (**__{{{user_ID*}}}__** (USER), {{{created_story}}})
    3329
    34 9. READING_LIST(__'''list_ID'''__, '''name''', content, '''is_public''', __user_ID__*)
    35    * user_ID references USER
     305. **STORY** (**__{{{story_ID}}}__**, {{{mature_content}}}, {{{short_description}}}, {{{image}}}, {{{content}}}, **__{{{user_ID*}}}__** (WRITER))
     31   * status (multi-valued attribute, see table **STATUS**)
    3632
    37 10. NOTIFICATION(__'''notification_ID'''__, '''content''', '''content_type''', __user_ID__*)
    38     * user_ID references USER
     336. **STATUS** (**__{{{story_ID*}}}__** (STORY), **__{{{status}}}__**)
    3934
    40 11. AI_SUGGESTION(__'''suggestion_ID'''__, '''original_text''', '''suggested_text''', '''suggestion_type''', '''accepted''', __story_ID__*)
    41     * story_ID references STORY
     357. **CHAPTER** (**__{{{chapter_ID}}}__**, {{{chapter_name}}}, {{{title}}}, {{{content}}}, {{{word_count}}}, {{{rating}}}, {{{published_at}}}, {{{view_count}}}, **__{{{story_ID*}}}__** (STORY))
    4236
    43 12. LIKE(__'''user_ID'''__*, __'''story_ID'''__*)
    44     * user_ID references USER
    45     * story_ID references STORY
     378. **GENRE** (**__{{{genre_ID}}}__**, {{{name}}})
    4638
    47 13. COMMENT(__'''comment_ID'''__, '''content''', __user_ID__*, __story_ID__*)
    48     * user_ID references USER
    49     * story_ID references STORY
     399. **READING_LIST** (**__{{{list_ID}}}__**, {{{name}}}, {{{content}}}, {{{is_public}}}, **__{{{user_ID*}}}__** (USER))
    5040
    51 14. COLLABORATION(__'''user_ID'''__*, __'''story_ID'''__*, role, permission_level)
    52     * user_ID references USER
    53     * story_ID references STORY
    54     * role (multi-valued attribute, see table ROLE)
    55     * permission_level (multi-valued attribute, see table PERMISSION_LEVEL)
     4110. **NOTIFICATION** (**__{{{notification_ID}}}__**, {{{content}}}, {{{content_type}}}, **__{{{user_ID*}}}__** (USER))
    5642
    57 15. ROLE(__'''user_ID'''__*, __'''story_ID'''__*, __'''role'''__)
    58     * user_ID references COLLABORATION
    59     * story_ID references COLLABORATION
     4311. **AI_SUGGESTION** (**__{{{suggestion_ID}}}__**, {{{original_text}}}, {{{suggested_text}}}, {{{suggestion_type}}}, {{{accepted}}}, **__{{{story_ID*}}}__** (STORY))
    6044
    61 16. PERMISSION_LEVEL(__'''user_ID'''__*, __'''story_ID'''__*, __'''permission_level'''__)
    62     * user_ID references COLLABORATION
    63     * story_ID references COLLABORATION
     4512. **LIKE** (**__{{{user_ID*}}}__** (USER), **__{{{story_ID*}}}__** (STORY))
    6446
    65 17. HAS_GENRE(__'''story_ID'''__*, __'''genre_ID'''__*)
    66     * story_ID references STORY
    67     * genre_ID references GENRE
     4713. **COMMENT** (**__{{{comment_ID}}}__**, {{{content}}}, **__{{{user_ID*}}}__** (USER), **__{{{story_ID*}}}__** (STORY))
     48
     4914. **COLLABORATION** (**__{{{user_ID*}}}__** (USER), **__{{{story_ID*}}}__** (STORY), {{{role}}}, {{{permission_level}}})
     50    * role (multi-valued attribute, see table **ROLE**)
     51    * permission_level (multi-valued attribute, see table **PERMISSION_LEVEL**)
     52
     5315. **ROLE** (**__{{{user_ID*}}}__** (COLLABORATION), **__{{{story_ID*}}}__** (COLLABORATION), **__{{{role}}}__**)
     54
     5516. **PERMISSION_LEVEL** (**__{{{user_ID*}}}__** (COLLABORATION), **__{{{story_ID*}}}__** (COLLABORATION), **__{{{permission_level}}}__**)
     56
     5717. **HAS_GENRE** (**__{{{story_ID*}}}__** (STORY), **__{{{genre_ID*}}}__** (GENRE))
    6858
    6959=== DDL script for creation and deletion of tables ===