Database Management

I wanted to receive a more hands-on learning approach to SQL so I started emailing professors at the university near me. One professor in particular, Jian Ma, agreed to meet with me to discuss my goals. By the end of that meeting he invited me to sit in on his Database Management class.

Every Thursday I would be very excited at work because I knew directly after work I would have class again. Class was exciting and I was engaged not only because the teacher was excellent, but because this is something I truly wanted to learn.

For the final project, our task was to create a database for a hospital that met the criteria they wanted. We had to use the managerial language they provided and turn it into an ERD with assumptions, DB Schema, SQL database, and run SQL queries from it.

Our ERD set us up for success from the start and our queries executed as expected. We received the highest grade in the class and it was advantageous to get a real world problem to solve such as this.

The DB Schema

‚ÄčPatient: PID (pk) [ CHAR ] patient_FName [ VARCHAR, NOT NULL ] patient_LName [ VARCHAR, NOT NULL ] patient_DOB [ CHAR, NOT NULL ] patient_Email [ VARCHAR ] patient_Phone [ VARCHAR, NOT NULL ] Admission: AID (pk) [ CHAR ] PID (fk) [ CHAR] EID (fk) [ CHAR ] DID (fk) [ CHAR ] Date_admitted [ CHAR, NOT NULL ] Date_released [ CHAR, NOT NULL ] Emergency Contact: EID (pk) [ CHAR ] emergency_contact_FName [ VARCHAR, NOT NULL ] emergency_contact_LName [ VARCHAR, NOT NULL ] emergency_contact_Email [ VARCHAR ] emergency_contact_Phone [ VARCHAR, NOT NULL ] emergency_contact_Relationship [ VARCHAR, NOT NULL ] Doctor: DID (pk) [ CHAR ] doctor_FName [ VARCHAR, NOT NULL ] doctor_LName [ VARCHAR, NOT NULL ] DPID (fk) [ CHAR, NOT NULL ] Department: DPID (pk) [ CHAR ] Dept_Name [ VARCHAR, NOT NULL ] Dept_Building [ VARCHAR, NOT NULL ] Dept_Floor [ CHAR, NOT NuLL ] Dept_Head [ CHAR, NOT NULL, UNIQUE ] Treatment: TID (pk) [ CHAR ] AID (fk) [ CHAR ] Treatment_Date [ CHAR, NOT NULL ] Treatment_Description [ VARCHAR, NOT NULL ] DID (fk) [ CHAR ] Specialties: SID (pk) [ CHAR ] Specialty_Name [ VARCHAR, NOT NULL ] Specialty_Description [ VARCHAR, NOT NULL ] Specialty Log: SPID (pk) [ CHAR ] DID (fk) [ CHAR ] SID (fk) [ CHAR ]