Using the relations that I attached, defined and normalized, create the SQL DDL statements necessary to implement 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. The answer should 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 attachment.  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  Shoulkd include: * the SQL DDL statements required to implement at least the following relations: Doctor  Patient  Appointment  Specialty  PatientMedicine  Medicine  PatientAllergy  Allergy  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.  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.  make appropriate use of keys including the automatic generation of key values where appropriate.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Using the relations that I attached, defined and normalized, create the SQL DDL statements necessary to implement 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. The answer should 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 attachment. 
  • 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 

Shoulkd include:

* the SQL DDL statements required to implement at least the following relations:

    • Doctor 
    • Patient 
    • Appointment 
    • Specialty 
    • PatientMedicine 
    • Medicine 
    • PatientAllergy 
    • Allergy 

  • 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. 

  • 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. 

  • make appropriate use of keys including the automatic generation of key values where appropriate.
There is no left-to-right ordering to the columns
• There are no duplicate rows
• Every row-and-column intersection contains exactly one value from the applicable
domain (and nothing else)
• All columns are regular
When determining 1st Normal Form, you should ask yourselt: Are there any repesting
groups or multivalued attributes? If there are, you should determine how they should be
broken into relations and related to the existing relations?
Now look at the Appointment and Patient relations. Medicines attribute of Appointment
and Allergies attribute of Patient are actually multivalued attributes. Esch of these requires
a new relation and a linking relation as shown in E-R diagram below.
2 Normal Form
• Relations are in 1NF
• There is no such non-key attributes that depends upon part of the candidate key but on
the entire candidate key
There are no changes required to 2" Normal Form.
3 Normal Form
• Relations are in 2NF
• There is no such non-key attribute that depends transitively on the candidate key
As you can see in Doctor relation; SpecialityName which is a non-key attribute depends
transitively on SpecialtyNumber. Therefore, we need to create a new relation as shown in
E-R disgram below.
Dactar
Patient
PatientID
Nane
Phone
Email
Address
-AdtedDate
-DoctorID
Specialty
Specialtylunter
ESpecialtylane
-Dector1D
-Name
-Phone
SpecialtyNunter
Superviser
PatientAlergY
eALlergyID
PatientID
Alergy
ALlergylame
PatientMedikine
AppointmentID
Madicinel
Appointment
AppeintnentID
1-0actorID
PatientID
AppointnentDate
stoedPressure
eight
TrestnentNotes
Medicine
edicineID
edicinelame
Transcribed Image Text:There is no left-to-right ordering to the columns • There are no duplicate rows • Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else) • All columns are regular When determining 1st Normal Form, you should ask yourselt: Are there any repesting groups or multivalued attributes? If there are, you should determine how they should be broken into relations and related to the existing relations? Now look at the Appointment and Patient relations. Medicines attribute of Appointment and Allergies attribute of Patient are actually multivalued attributes. Esch of these requires a new relation and a linking relation as shown in E-R diagram below. 2 Normal Form • Relations are in 1NF • There is no such non-key attributes that depends upon part of the candidate key but on the entire candidate key There are no changes required to 2" Normal Form. 3 Normal Form • Relations are in 2NF • There is no such non-key attribute that depends transitively on the candidate key As you can see in Doctor relation; SpecialityName which is a non-key attribute depends transitively on SpecialtyNumber. Therefore, we need to create a new relation as shown in E-R disgram below. Dactar Patient PatientID Nane Phone Email Address -AdtedDate -DoctorID Specialty Specialtylunter ESpecialtylane -Dector1D -Name -Phone SpecialtyNunter Superviser PatientAlergY eALlergyID PatientID Alergy ALlergylame PatientMedikine AppointmentID Madicinel Appointment AppeintnentID 1-0actorID PatientID AppointnentDate stoedPressure eight TrestnentNotes Medicine edicineID edicinelame
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY