Changes between Version 10 and Version 11 of LogicalAndPhysicalDesign


Ignore:
Timestamp:
12/21/25 23:39:02 (7 days ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LogicalAndPhysicalDesign

    v10 v11  
    1515 
    1616{{{VET CLINICS}}}
    17 * VetClinic(clinic_id [PK], name, email, phone, city, address, approved_by [FK→Admin(user_id)])
     17* !VetClinic(clinic_id [PK], name, email, phone, city, address, approved_by [FK→Admin(user_id)])
    1818
    1919{{{ANIMALS}}}
     
    2323* Listing(listing_id [PK], owner_id [FK→Owner(user_id)], animal_id [FK→Animal(animal_id)], status, price, description, created_at)
    2424{{{APPOINTMENTS}}}
    25 * Appointment(appointment_id [PK], clinic_id [FK→VetClinic(clinic_id)], animal_id [FK→Animal(animal_id)], responsible_owner_id [FK→Owner(user_id)], status, date_time, notes)
     25* Appointment(appointment_id [PK], clinic_id [FK→!VetClinic(clinic_id)], animal_id [FK→Animal(animal_id)], responsible_owner_id [FK→Owner(user_id)], status, date_time, notes)
    2626{{{REVIEWS (SUPERTYPE + SUBTYPES)}}}
    2727* Review(review_id [PK], reviewer_id [FK→Client(user_id)], rating, comment, created_at)
    28 * UserReview(review_id [PK, FK→Review(review_id)], target_user_id [FK→Users(user_id)])
    29 * ClinicReview(review_id [PK, FK→Review(review_id)], target_clinic_id [FK→VetClinic(clinic_id)])
     28* !UserReview(review_id [PK, FK→Review(review_id)], target_user_id [FK→Users(user_id)])
     29* !ClinicReview(review_id [PK, FK→Review(review_id)], target_clinic_id [FK→!VetClinic(clinic_id)])
    3030{{{HEALTH RECORDS}}}
    31 * HealthRecord(healthrecord_id [PK], animal_id [FK→Animal(animal_id)], appointment_id [FK→Appointment(appointment_id)], type, description, date)
     31* !HealthRecord(healthrecord_id [PK], animal_id [FK→Animal(animal_id)], appointment_id [FK→Appointment(appointment_id)], type, description, date)
    3232----
    3333Business rules enforced in DDL:
     
    3535Review rating range (1–5)
    3636[[BR]]
    37 Disjoint review specialization (a Review can be either UserReview or ClinicReview, not both) via trigger
     37Disjoint review specialization (a Review can be either !UserReview or !ClinicReview, not both) via trigger
    3838[[BR]]
    3939Clinic review constraint: reviewer must have at least one DONE appointment at that clinic (via trigger)
    4040[[BR]]
    41 HealthRecord consistency: its animal_id must match appointment.animal_id (via trigger)
     41!HealthRecord consistency: its animal_id must match appointment.animal_id (via trigger)
    4242== DDL
    4343 * [attachment:schema_creation.sql]