Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

What does SQL stand for, and what purpose does it serve?

Answered: 1 week ago

Question

How do you create and run an SQL query in MySQL?

Answered: 1 week ago