Changes between Version 14 and Version 15 of LogicalAndPhysicalDesign


Ignore:
Timestamp:
05/05/26 09:15:53 (4 hours ago)
Author:
231035
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LogicalAndPhysicalDesign

    v14 v15  
    1010* Client(user_id [PK, FK→Users(user_id)])
    1111* Owner(user_id [PK, FK→Client(user_id)]) (Owner is a subtype of Client, as in the diagram)
     12* Vet_clinic(user_id [PK, FK→vet_clinic(user_id)])
    1213
    1314{{{NOTIFICATIONS}}}
    1415* Notification(notification_id [PK], user_id [FK→Users(user_id)], type, message, is_read, created_at)
     16
     17{{{VET CLINIC APPLICATIONS}}}
     18* vet_clinic_applications(application_id[PK],name,email,phone,city,address,submitted_at,status,reviewd_at,reviewd_by[FK→Admin(user_id)],denial_reason)
    1519 
    1620{{{VET CLINICS}}}
    17 * !VetClinic(clinic_id [PK], name, email, phone, city, address, approved_by [FK→Admin(user_id)])
     21* !VetClinic(clinic_id [PK], name, email, phone, city, address, user_if(FK→vet_clinic(user_id)),application_id[FK→vet_clinic_applications(application_id)])
    1822
    1923{{{ANIMALS}}}
     
    2226{{{LISTINGS}}}
    2327* Listing(listing_id [PK], owner_id [FK→Owner(user_id)], animal_id [FK→Animal(animal_id)], status, price, description, created_at)
     28{{{FAVORITE LISTINGS}}}
     29* favorite_listings(client_id[FK→User(user_id)],listing_id[FK→Listing(listing_id)])→The whole thing is the PK
     30
    2431{{{APPOINTMENTS}}}
    2532* 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)
     33
    2634{{{REVIEWS (SUPERTYPE + SUBTYPES)}}}
    2735* Review(review_id [PK], reviewer_id [FK→Client(user_id)], rating, comment, created_at)
    2836* !UserReview(review_id [PK, FK→Review(review_id)], target_user_id [FK→Users(user_id)])
    2937* !ClinicReview(review_id [PK, FK→Review(review_id)], target_clinic_id [FK→!VetClinic(clinic_id)])
     38
    3039{{{HEALTH RECORDS}}}
    3140* !HealthRecord(healthrecord_id [PK], animal_id [FK→Animal(animal_id)], appointment_id [FK→Appointment(appointment_id)], type, description, date)
     41
     42{{{CLINIC UNAVAILABLE SLOTS}}}
     43* clinic_unavailable_slots(slot_id[PK],clinic_id[FK→vet_clinics(clinic_id)],date_time,reason,created_at)
    3244----
    3345Business rules enforced in DDL: