Changes between Version 1 and Version 2 of DatabaseCreation


Ignore:
Timestamp:
09/14/26 13:11:58 (11 days ago)
Author:
231039
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseCreation

    v1 v2  
    11== Phase P2: DatabaseCreation
     2
     3== Notation ==
     4Primary keys are marked in '''bold'''.
     5Foreign keys are marked with FK* and the referenced table is written in parentheses ().
     6
     7== Tables ==
     8
     9=== Owners & Pets ===
     10Owner ('''owner_id''', last_name, first_name, phone, email, address, gender)
     11
     12Pet ('''pet_id''', name, is_active, type, breed, age, medical_history, age_display, owner_id*(Owner))
     13
     14=== Staff ===
     15Role ('''role_id''', name, description)
     16
     17Employee ('''employee_id''', last_name, first_name, phone, email, address, date_employment, experience, gender, role_id*(Role), supervised_by*(Employee))
     18
     19Specialization ('''specialization_id''', specialization, license_number, employee_id*(Employee))
     20
     21Certificate ('''certificate_id''', certificate_name, category, employee_id*(Employee))
     22
     23=== Scheduling ===
     24Appointment ('''appointment_id''', date_appointment, reason, phone, owner_id*(Owner), pet_id*(Pet))
     25
     26Examination_room ('''examination_room_id''', room_number, type, capacity, status)
     27
     28Examination ('''examination_id''', date_examination, status, description, appointment_id*(Appointment), employee_id*(Employee), examination_room_id*(Examination_room))
     29
     30=== Treatments ===
     31Treatment_type ('''treatment_type_id''', name)
     32
     33Treatment ('''treatment_id''', date_treatment, notes, treatment_type_id*(Treatment_type), examination_id*(Examination))
     34
     35Treatment_attribute ('''treatment_attribute_id''', name, data_type, treatment_type_id*(Treatment_type))
     36
     37Treatment_attribute_value ('''treatment_attribute_value_id''', value, notes, treatment_attribute_id*(Treatment_attribute), treatment_id*(Treatment))
     38
     39=== Prescriptions & Medicine ===
     40Prescription ('''prescription_id''', date_start, date_end, description, examination_id*(Examination))
     41
     42Prescription_medicine ('''prescription_id'''*(Prescription), '''medicine_id'''*(Medicine), dosage, num_days)
     43
     44Medicine ('''medicine_id''', name, manufacturer, description, shop_item_id*(Shop_item))
     45
     46=== Shop ===
     47Shop_item_category ('''shop_item_category_id''', name, parent_id*(Shop_item_category))
     48
     49Shop_item ('''shop_item_id''', name, price, stock, shop_item_category_id*(Shop_item_category))
     50
     51Shop_item_attribute ('''shop_item_attribute_id''', name, data_type, shop_item_category_id*(Shop_item_category))
     52
     53Shop_item_attribute_value ('''shop_item_attribute_value_id''', value, notes, shop_item_attribute_id*(Shop_item_attribute), shop_item_id*(Shop_item))
     54
     55Discount ('''discount_id''', type, value, description, date_from, date_to, shop_item_id*(Shop_item))
     56
     57=== Billing ===
     58Coupon ('''coupon_id''', code, type, value, valid_from, valid_to, usage_limit, usage_count, is_active, min_total)
     59
     60Invoice ('''invoice_id''', date_invoice, total, coupon_id*(Coupon), owner_id*(Owner))
     61
     62Invoice_item ('''num_item''', '''invoice_id'''*(Invoice), price, quantity, type, shop_item_id*(Shop_item), treatment_id*(Treatment))
     63
     64Payment ('''payment_id''', date_payment, amount, method, invoice_id*(Invoice))