Changes between Version 14 and Version 15 of LogicalAndPhysicalDesign
- Timestamp:
- 05/05/26 09:15:53 (4 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
LogicalAndPhysicalDesign
v14 v15 10 10 * Client(user_id [PK, FK→Users(user_id)]) 11 11 * 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)]) 12 13 13 14 {{{NOTIFICATIONS}}} 14 15 * 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) 15 19 16 20 {{{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)]) 18 22 19 23 {{{ANIMALS}}} … … 22 26 {{{LISTINGS}}} 23 27 * 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 24 31 {{{APPOINTMENTS}}} 25 32 * 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 26 34 {{{REVIEWS (SUPERTYPE + SUBTYPES)}}} 27 35 * Review(review_id [PK], reviewer_id [FK→Client(user_id)], rating, comment, created_at) 28 36 * !UserReview(review_id [PK, FK→Review(review_id)], target_user_id [FK→Users(user_id)]) 29 37 * !ClinicReview(review_id [PK, FK→Review(review_id)], target_clinic_id [FK→!VetClinic(clinic_id)]) 38 30 39 {{{HEALTH RECORDS}}} 31 40 * !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) 32 44 ---- 33 45 Business rules enforced in DDL:
