| 262 | | {{{is_liked (LIKE – STORY)}}} |
| 263 | | [[BR]] |
| 264 | | Represents likes given to stories. |
| 265 | | [[BR]] |
| 266 | | '''[[span(style=color: #9A0000, Cardinality:)]]''' |
| 267 | | 1:N (One story can have many likes) |
| 268 | | [[BR]] |
| 269 | | '''[[span(style=color: #9A0000, Keys:)]]''' |
| 270 | | Foreign key: {{{story_id}}} in LIKE references STORY. |
| 271 | | [[BR]] |
| 272 | | ---- |
| 273 | | |
| 274 | | {{{is_commented (COMMENT – STORY)}}} |
| 275 | | [[BR]] |
| 276 | | Represents comments made on stories. |
| 277 | | [[BR]] |
| 278 | | '''[[span(style=color: #9A0000, Cardinality:)]]''' |
| 279 | | 1:N (One story can have many comments) |
| 280 | | [[BR]] |
| 281 | | '''[[span(style=color: #9A0000, Keys:)]]''' |
| 282 | | Foreign key: {{{story_id}}} in COMMENT references STORY. |
| | 262 | {{{is_liked (USER – LIKE – STORY)}}} |
| | 263 | [[BR]] |
| | 264 | Represents likes given by users to stories. |
| | 265 | [[BR]] |
| | 266 | '''[[span(style=color: #9A0000, Cardinality:)]]''' |
| | 267 | User 1:N LIKE, Story 1:N LIKE (One user can like many stories, one story can have many likes) |
| | 268 | [[BR]] |
| | 269 | '''[[span(style=color: #9A0000, Keys:)]]''' |
| | 270 | Composite key: (user_id, story_id) in LIKE |
| | 271 | Foreign key: {{{user_id}}} in LIKE references USER. |
| | 272 | Foreign key: {{{story_id in}}} LIKE references STORY. |
| | 273 | [[BR]] |
| | 274 | ---- |
| | 275 | |
| | 276 | {{{is_commented (USER – COMMENT – STORY)}}} |
| | 277 | [[BR]] |
| | 278 | Represents comments made by users on stories. |
| | 279 | [[BR]] |
| | 280 | '''[[span(style=color: #9A0000, Cardinality:)]]''' |
| | 281 | User 1:N COMMENT, Story 1:N COMMENT (One user can make many comments, one story can have many comments) |
| | 282 | [[BR]] |
| | 283 | '''[[span(style=color: #9A0000, Keys:)]]''' |
| | 284 | Foreign key: {{{user_id}}} in COMMENT references USER. |
| | 285 | Foreign key: {{{story_id in}}} COMMENT references STORY. |