Question: Using the relations that you defined and normalized as part of the Unit 4 Programming Assignment, create the SQL DDL statements necessary to implement your

Using the relations that you defined and normalized as part of the Unit 4 Programming Assignment, create the SQL DDL statements necessary to implement your database schema as an OpenOffice database. You may also implement your database in MySQL, IBM DB2 Express, Microsoft Access, SQL Server if you have access to these database systems. Your assignment must include a document that contains all of the SQL statements that you created and a screenshot that shows the structures that you implemented in the database of your choice. Your DDL statements must accommodate the following elements:

  • Create statements to create tables from the entities defined as part of the Unit 4 assignment
  • Appropriate use of Null (and Not Null) parameters to ensure data validity
  • Appropriate use of constraint clauses to implement appropriate referential integrity
  • Use of data types and formats that is appropriate for the data in your database schema.
  • Appropriate use of keys including automatic generation of key values if appropriate

Unit 4 ER Diagram:

H SPECIALTY Specialty Number? Specialty DOCTOR Doctor ID 8 Name Phone Specialty

Assignment Instructions: 

 

  • The assignment must include the SQL DDL statements required to implement at least the following relations:
    • Doctor
    • Patient
    • Appointment
    • Specialty
    • PatientMedicine
    • Medicine
    • PatientAllergy
    • Allergy

       
  • The assignment must make appropriate use of Null (and Not Null) parameters to ensure data validity. The minimum standard will be measured against the instructor's example and will be based upon rules associated with primary and foreign keys and integrity constraint rules.

     
  • The assignment must make appropriate use of constraint clauses to ensure the referential integrity of the relations in the schema. The minimum standard will be measured against the instructor's example and will be based upon rules associated with primary and foreign keys and integrity constraint rules. NOTE: the unary relationship that we defined for the Doctor relation is NOT required as part of this assignment.

     
  • The assignment must make appropriate use of keys including the automatic generation of key values where appropriate.

H SPECIALTY Specialty Number? Specialty DOCTOR Doctor ID 8 Name Phone Specialty Number Supervisor H+ . APPOINTMENT Appointment ID Date Patient ID Doctor ID Blood Pressure Pulse Treatment Notes Medicines ID PATIENT +H Patient ID Name Phone Email Address Date registered Doctor ID Allergy ID i |++ ALLERGIES Allergy ID Allergy Name Allergy detail description Allergy treatment MEDICINES Medicines ID 8 Medicine Name Medicine detail description Allergy ID Notes Primary Key Foreign Key 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!