Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

DB Hospital

Table Doctors{
Id_doctor int [primary key]
Name varchar
Major varchar
Phone smallint
Address varchar
Nationality varchar
Blood_type char
Schedule smallint
Patients varchar
Salary smallint
}
Table Patients{
Id_patient int [primary key]
Name varchar
Age smallint
Sex varchar
Phone bigint
Address varchar
Blood_type char
Pathology varchar
Sickness varchar
Doctor varchar
Medicine varchar
Emergency smallint
Ambulance smallint
}
Table Medicines{
Id_medicine int [primary key]
Name varchar
Year smallint
Number smallint
Function varchar
Description varchar
Location varchar
Patient varchar
}
Table Nurses{
Id_nurse int [primary key]
Name varchar
Age smallint
Gender varchar
Phone bigint
Nationality varchar
Blood_type char
Address varchar
Schedule smallint
Beds smallint
Salary smallint
}
Table Medical_materials{
Id_medical_material int [primary key]
Name varchar
Year smallint
Status varchar
Ambulance smallint
Function varchar
Description varchar
}
Table Infrastructure_materials{
Id_infrastructure_material int [primary key]
Name varchar
Location varchar
Responsable varchar
Description varchar
Status varchar
}
Table Ambulance{
Id_ambulance int [primary key]
Functionality varchar
Schedule smallint
Materials varchar
Number smallint
Material varchar
Patient varchar
Driver varchar
}
Table Beds{
Id_bed int [primary key]
Patients varchar
Number smallint
Functionality varchar
Schedule smallint
Nurse varchar
}
Table Staff{
Id_staff int [primary key]
Name varchar
Major varchar
Phone smallint
Gender varchar
Schedule smallint
Materials varchar
location varchar
}
Table Doctors_patients {
Following_doctors_id integer
Following_patients_id integer
}
Table Nurses_beds {
Following_nurses_id integer
Following_beds_id integer
}
Table Ambulance_medical_materials {
Following_ambulance_id integer
Following_medical_materials_id integer
}
Table Staff_infrastructure_materials {
Following_staff_id integer
Following_infrastructure_materials_id integer
}
Table Patients_medicines {
Following_patients_id integer
Following_medicine_id integer
}
Table Patients_beds {
Following_patients_id integer
Following_beds_id integer
}
Table Patients_ambulance {
Following_patients_id integer
Following_ambulance_id integer
}
Table Reservation {
Following_patients_id int
Following_doctors_id int
Id_reservation int
Date_reservation date
Date_in datetime
}
Table Storage {
Following_medicines_id int [primary key]
Following_infrastructure_material_id int [primary key]
Following_medical_material_id int [primary key]
Id_storage int [primary key]
Following_nurses_id int [primary key]
Following_ambulance_id int [primary key]
Following_staff_id int [primary key]
Date date
Photo imagen
Description varchar
}
Table Availability {
Following_medicines_id int [primary key]
Following_beds_id int [primary key]
Following_infrastructure_material_id int [primary key]
Following_medical_material_id int [primary key]
Following_ambulance_id int [primary key]
Number_of_medicines int
Number_of_beds int
Number_of_infrastructurematerial int
Number_of_medicalmaterial int
Number_of_ambulance int
}
Ref: Doctors.Id_doctor - Doctors_patients.Following_doctors_id
Ref: Patients.Id_patient - Doctors_patients.Following_patients_id
Ref: Nurses.Id_nurse - Nurses_beds.Following_nurses_id
Ref: Beds.Id_bed - Nurses_beds.Following_beds_id
Ref: Patients.Id_patient - Patients_medicines.Following_patients_id
Ref: Medicines.Id_medicine - Patients_medicines.Following_medicine_id
Ref: Patients.Id_patient - Patients_ambulance.Following_patients_id
Ref: Ambulance.Id_ambulance - Patients_ambulance.Following_ambulance_id
Ref: Ambulance.Id_ambulance -
Ambulance_medical_materials.Following_ambulance_id
Ref: Medical_materials.Id_medical_material -
Ambulance_medical_materials.Following_medical_materials_id
Ref: Patients.Id_patient - Patients_beds.Following_patients_id
Ref: Beds.Id_bed - Patients_beds.Following_beds_id
Ref: Staff.Id_staff - Staff_infrastructure_materials.Following_staff_id
Ref: Doctors_patients.Following_doctors_id -
Reservation.Following_doctors_id
Ref: Doctors_patients.Following_patients_id -
Reservation.Following_patients_id
Ref: Patients_medicines.Following_medicine_id -
Storage.Following_medicines_id
Ref: Staff_infrastructure_materials.Following_infrastructure_materials_id -
Storage.Following_infrastructure_material_id
Ref: Ambulance_medical_materials.Following_medical_materials_id -
Storage.Following_medical_material_id
Ref: Nurses_beds.Following_nurses_id - Storage.Following_nurses_id
Ref: Patients_ambulance.Following_ambulance_id -
Storage.Following_ambulance_id
Ref: Staff_infrastructure_materials.Following_staff_id -
Storage.Following_staff_id

You might also like