wiki:RelationalDesign

Version 10 (modified by 222003, 42 hours ago) ( diff )

--

Релациско Мапирање

Ознаки

  • Примарните кличеви се болдирани и подвлечени.
  • Надворешните кличеви се означени со * до името на надворешниот клуч и во заградата () е името на ентитетот кој го референцираат
  • Задолжителните атрибути се болдирани

Табели

  1. Company (id, company_name, description, registration_number)
  1. Medicine (id, medicine_name, active_ingredient)
  1. PaymentMethod (id, method_name)
  1. Users (id, first_name, last_name, username, hashed_password, e_mail, gender, date_created)
  1. Admins (user_id*(Users))
  1. DeliveryCompany (company_id*(Company))
  1. Distributor (company_id*(Company))
  1. Facility (id, company_id*(Company), facility_name, code)
  1. Inventory (facility_id*(Facility))
  1. Manufacturer (company_id*(Company))
  1. MedicineInteraction (medicine_id_1*(Medicine), medicine_id_2*(Medicine), type, description, severity)
  1. Client(user_id*(Users), is_verified)
  1. Payment (id, client_id*(Client), payment_method_id*(PaymentMethod), payment_date, amount, status)
  1. Pharmacist (user_id*(Users))
  1. Pharmacy (company_id*(Company))
  1. Prescription (id, client_id*(Client), medicine_id*(Medicine), issued_by, issued_at, valid_to, embg)
  1. SensitiveClientData (id, client_id*(Client), pharmacist_id*(Pharmacist), embg, portrait_photo)
  1. ShoppingCart (id, client_id*(Client))
  1. SupplyOrder (id, distributor_id*(Distributor), pharmacy_id*(Pharmacy), order_date, expected_arrival_date)
  1. BrandedMedicine (id, manufacturer_id*(Manufacturer), price, description, dosage_form, strength, origin_country)
  1. BrandedMedicineImage (id, branded_medicine_id*(BrandedMedicine), image)
  1. ClubCard (id, user_id*(Client), club_program, points)
  1. ContactInformation (id, phone, address, user_id*(User), facility_id*(Facility))
  1. Distributor_BrandedMedicine (id, distributor_id*(Distributor), branded_medicine_id*(BrandedMedicine))
  1. HealthProfile (id, client_id*(Client), blood_type)
  1. Inventory_BrandedMedicine (inventory_id*(Inventory), branded_medicine_id*(BrandedMedicine), quantity, last_changed)
  1. ClientOrder (id, client_id*(Client), delivery_company_id*(DeliveryCompany), payment_id*(Payment), order_date, expected_arrival_date, status, total_price)
  1. ClientOrder_BrandedMedicine (id, order_id*(Order), branded_medicine_id*(BrandedMedicine), quantity)
  1. Pharmacy_Catalog (pharmacy_id*(Pharmacy), branded_medicine_id*(BrandedMedicine))
  1. ShoppingCart_BrandedMedicine (shopping_cart_id*(ShoppingCart), branded_medicine_id*(BrandedMedicine), quantity)
  1. SupplyOrder_BrandedMedicine (supply_order_id*(SupplyOrder), branded_medicine_id*(BrandedMedicine), quantity)
  1. AllergicReaction_HealthProfile_Medicine (health_profile_id*(HealthProfile), medicine_id*(Medicine), date_diagnosed, description, severity)
  1. Branded_Medicine_InstanceOf_Medicine (branded_medicine_id*(BrandedMedicine), medicine_id*(Medicine))

DDL скрипта за бришење и креирање на табелите

synergymed_ddl.sql

DDL скрипта за полнење на табелите со податоци

Релациски Дијаграм

relatonal_diagram

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.