Changes between Version 8 and Version 9 of ERModel
- Timestamp:
- 09/11/26 00:00:19 (8 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ERModel
v8 v9 180 180 {{{UserReview}}} 181 181 [[BR]] 182 UserReview is the specialization of Review used when a review is directed at a user (for example another owner, sitter, or vet user). It is modeled as a subtype of Review so that all generic review attributes (text, rating, author, time) come from the parent, while UserReview adds only the information specific to “reviews about users”, namely who the target user is. 182 UserReview is the specialization of Review used when a review is directed at a user (for example another owner, sitter, or vet user). It is modeled as a subtype of Review so that all generic review attributes (text, rating, author, time) come from the parent, while UserReview adds only the information specific to “reviews about users”, namely who the target user is. A Client can leave a review only for those clients he had an interaction with. 183 183 [[BR]] 184 184 '''[[span(style=color: #E30B5C, Candidate keys: )]]''' … … 247 247 [[BR]] 248 248 '''[[span(style=color: #E30B5C, Candidate keys: )]]''' 249 * {{{(client_id, listing_id)}}} – composite natural key (chosen primary key). 250 The composite key is chosen as PK because a favorite is uniquely defined by “which client favorited which listing” and no additional surrogate identifier is needed. 249 * {{{fav_listing_id}}} – id for a saved listing 251 250 [[BR]] 252 251 '''[[span(style=color: #E30B5C, Attributes: )]]''' … … 266 265 * {{{reason}}} – text, why isn't it available(clinics can make appointments not available without having an appointment scheduled) 267 266 * {{{created_at}}} - timestamp, when was it created 267 268 268 === RELATIONS === 269 [[BR]] 270 {{{interaction_with (Client-Client)}}} 271 [[BR]] 272 interacts_with is a recursive many-to-many relationship between clients. A client can interact with multiple other clients, while another client can also interact with multiple clients. 273 [[BR]] 274 '''[[span(style=color: #E30B5C, Keys: )]]''' 275 * In the relational model, the relationship is transformed into client_interactions, whose composite primary key consists of client_id_1 and client_id_2. 276 [[BR]] 277 '''[[span(style=color: #E30B5C, Attributes: )]]''' 278 Both attributes are foreign keys referencing clients(user_id). The relationship is used to restrict user reviews so that a client can review only another client with whom an interaction has previously been recorded. 269 279 [[BR]] 270 280 {{{receives (User – Notification)}}}
