Changes between Version 8 and Version 9 of ERModel


Ignore:
Timestamp:
09/11/26 00:00:19 (8 hours ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v8 v9  
    180180{{{UserReview}}}
    181181[[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.
     182UserReview 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.
    183183[[BR]]
    184184'''[[span(style=color: #E30B5C, Candidate keys: )]]'''
     
    247247[[BR]]
    248248'''[[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
    251250[[BR]]
    252251'''[[span(style=color: #E30B5C, Attributes: )]]'''
     
    266265* {{{reason}}} – text, why isn't it available(clinics can make appointments not available without having an appointment scheduled)
    267266* {{{created_at}}} - timestamp, when was it created
     267
    268268=== RELATIONS ===
     269[[BR]]
     270{{{interaction_with (Client-Client)}}}
     271[[BR]]
     272interacts_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: )]]'''
     278Both 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.
    269279[[BR]]
    270280{{{receives (User – Notification)}}}