Telkom-StayHomeSA 46 l Eal K E E O O 0187% 17:13 Vodacom SA Create a query to display all patients who made appointments. The query must also display patient's treatment and whether the patient has allergies or not. For every patient with no allergies, the word "None" should be inserted as detailed in the output below. PATIENT PRESCRIPTION ALLERGY Catafast 50mg Imodium 2mg De Waardt , W, 7609097812034 Mhlanga , J, 7809124123456 De Waardt , W , 7609097812034 Mhlanga , J, 7809124123456 De Waardt , W , De Waardt , W , 7609097812034 None None Ultracet None Probiflora None 7609097812034 Probiflora None Degoran None

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Please note database structure below 

Telkom-StayHomeSA 46
O0187%
|i 17:13
Vodacom SA
Create a query to display all patients who made appointments. The query must also
display patient's treatment and whether the patient has allergies or not. For every
patient with no allergies, the word "None" should be inserted as detailed in the
output below.
PATIENT
PRESCRIPTION
ALLERGY
De Waardt , W , 7609097812034
Mhlanga , J, 7809124123456
De Waardt , W , 7609097812034
Mhlanga , J, 7809124123456
De Waardt , W , 7609097812034
De Waardt , W , 7609097812034
Catafast 50mg
Imodium 2mg
None
None
Ultracet
None
Probiflora
None
Probiflora
None
Degoran
None
6 rows selected.
Transcribed Image Text:Telkom-StayHomeSA 46 O0187% |i 17:13 Vodacom SA Create a query to display all patients who made appointments. The query must also display patient's treatment and whether the patient has allergies or not. For every patient with no allergies, the word "None" should be inserted as detailed in the output below. PATIENT PRESCRIPTION ALLERGY De Waardt , W , 7609097812034 Mhlanga , J, 7809124123456 De Waardt , W , 7609097812034 Mhlanga , J, 7809124123456 De Waardt , W , 7609097812034 De Waardt , W , 7609097812034 Catafast 50mg Imodium 2mg None None Ultracet None Probiflora None Probiflora None Degoran None 6 rows selected.
DATABASE STRUCTURE
CONTRA
MEDICALCONDITIONS
V EVENT
PATIENTVISIT
PRESCODE CHAR(S)
Y ALLERGY
VARCHAR2(30)
CHAR(5) NOT NULL
V PATIENTID
VARCHARZ(13) NOT NULL
DESCRIPTION VARCHAR2(30)
COMMENTS LONG
VISITDATE
DIAGNOSIS
DATE NOT NULL
ALLERGYLOOKUP
VARCHARZ(30)
v ALLERGY VARCHAR2(30) NOT NULL
PRESCRIBED
V PRESCODE
CHAR(5) NOT NULL
PATIENTHISTORY
DESCRIPTION VARCHARZ(30)
V PATIENTID
/ MEDICALEVENT
V DATE OF_EVENT DATE NOT NULL
VARCHAR2(13) NOT NULL
CHAR(S) NOT NULL
DOCTOR
V DOCTORID
VARCHAR2(13) NOT NULL
DOCTORNAME VARCHAR2(25)
DOCTORCODE CHAR(7) NOT NULL
PATIENTALLERGY
PATENTID VARCHAR2(13) NOT NULL
V ALLERGY
VARCHAR2(30) NOT NULL
TREATMENT
V TREATIO
CHAR(S) NOT NULL
APPOINTMENT
PATIENTMEDICINE
TREATDESCRIPTION VARCHAR2(30)
V PATIENTID
v
* APPOINTTYPE VARCHARZ(20)
V APPOINTDATE DATE NOT NULL
CANCELLED
VARCHAR2(13) NOT NULL
V PATIENTID
V PRESC_DATE DATE NOT NULL
V PRESCODE
VARCHAR2(13) NOT NULL
DOCTORID
VARCHAR2(13) NOT NULL
CHAR(5) NOT NULL
CHAR(1)
TREATCOST
CHAR(5) NOT NULL
V STARTDATE DATE NOT NULL
NUMBER(6,2)
NUMBER(6,2)
PATIENTTREATMENT
V TREATID
V TREATID
V PATIENTID
´TREATMENTDATE DATE NOT NULL
* DOCTORID
CHAR(S) NOT NULL
PATIENT
VARCHAR2(13) NOT NULL
V PATIENTID
VARCHAR2(13) NOT NULL
FEE
FIRSTNAME VARCHAR2(15)
COST
VARCHAR2(13)
LASTNAME VARCHAR2(30)
( RESP
VARCHAR2(13y
RESPACCOUNT
SEX
CHAR(1)
V IDNUMBER
MEDICALFUND
VARCHAR2(30) NOT NULL
VARCHAR2(20)
VARCHAR2(20)
VARCHAR2(13) NOT NULL
INITIALS
VARCHAR2(5)
TITLE
VARCHAR2(5)
V MEDFUND
FIRSTNAME
ADDRESS1
VARCHAR2(15)
VARCHAR2(3)
VARCHAR2(25)
ADDRESS2
POSTALCODE CHAR(4)
INITIALS
LASTNAME
ADDRESS1
VARCHAR2(15)
TELNO
VARCHAR2(20)
PAYMENTS
ADDRESS2
VARCHAR2(15)
E MAIL
VARCHAR2(20)
V RESPACCOUNT
V PAYDATE
METHOD
PAYTYPE
CHEQUENUMBER VARCHAR2(10)
BANKNUMBER
POSTALADDRESS1 VARCHAR2(20)
POSTALADDRESS2 VARCHAR2(30)
VARCHAR2(13) NOT NULL
DATE NOT NULL
VARCHAR2(10)
VARCHAR2(15)
POSTALCODE
CHAR(4)
VARCHAR2(30)
VARCHAR2(30)
МЕТНОD
RESPMEDFUND
EMPNAME
EMPADDRESS
Key Symbols
V RESPID
V MEDFUND
VARCHAR2(13) NOT NULL
v Primary Key
TELNO
VARCHAR2(20)
VARCHARZ(15)
VARCHAR2(20)
VARCHAR2(30) NOT NULL
VARCHAR2(20)
NUMBER(8,2)
MEDFUNDTYPE
VARCHAR2(15)
MEDFUNDNUMBER VARCHAR2(15)
AMOUNT
CELLNO
Foreign Key
TELNOWORK
EMPTELNO
VARCHAR2(15)
Unique Key
Transcribed Image Text:DATABASE STRUCTURE CONTRA MEDICALCONDITIONS V EVENT PATIENTVISIT PRESCODE CHAR(S) Y ALLERGY VARCHAR2(30) CHAR(5) NOT NULL V PATIENTID VARCHARZ(13) NOT NULL DESCRIPTION VARCHAR2(30) COMMENTS LONG VISITDATE DIAGNOSIS DATE NOT NULL ALLERGYLOOKUP VARCHARZ(30) v ALLERGY VARCHAR2(30) NOT NULL PRESCRIBED V PRESCODE CHAR(5) NOT NULL PATIENTHISTORY DESCRIPTION VARCHARZ(30) V PATIENTID / MEDICALEVENT V DATE OF_EVENT DATE NOT NULL VARCHAR2(13) NOT NULL CHAR(S) NOT NULL DOCTOR V DOCTORID VARCHAR2(13) NOT NULL DOCTORNAME VARCHAR2(25) DOCTORCODE CHAR(7) NOT NULL PATIENTALLERGY PATENTID VARCHAR2(13) NOT NULL V ALLERGY VARCHAR2(30) NOT NULL TREATMENT V TREATIO CHAR(S) NOT NULL APPOINTMENT PATIENTMEDICINE TREATDESCRIPTION VARCHAR2(30) V PATIENTID v * APPOINTTYPE VARCHARZ(20) V APPOINTDATE DATE NOT NULL CANCELLED VARCHAR2(13) NOT NULL V PATIENTID V PRESC_DATE DATE NOT NULL V PRESCODE VARCHAR2(13) NOT NULL DOCTORID VARCHAR2(13) NOT NULL CHAR(5) NOT NULL CHAR(1) TREATCOST CHAR(5) NOT NULL V STARTDATE DATE NOT NULL NUMBER(6,2) NUMBER(6,2) PATIENTTREATMENT V TREATID V TREATID V PATIENTID ´TREATMENTDATE DATE NOT NULL * DOCTORID CHAR(S) NOT NULL PATIENT VARCHAR2(13) NOT NULL V PATIENTID VARCHAR2(13) NOT NULL FEE FIRSTNAME VARCHAR2(15) COST VARCHAR2(13) LASTNAME VARCHAR2(30) ( RESP VARCHAR2(13y RESPACCOUNT SEX CHAR(1) V IDNUMBER MEDICALFUND VARCHAR2(30) NOT NULL VARCHAR2(20) VARCHAR2(20) VARCHAR2(13) NOT NULL INITIALS VARCHAR2(5) TITLE VARCHAR2(5) V MEDFUND FIRSTNAME ADDRESS1 VARCHAR2(15) VARCHAR2(3) VARCHAR2(25) ADDRESS2 POSTALCODE CHAR(4) INITIALS LASTNAME ADDRESS1 VARCHAR2(15) TELNO VARCHAR2(20) PAYMENTS ADDRESS2 VARCHAR2(15) E MAIL VARCHAR2(20) V RESPACCOUNT V PAYDATE METHOD PAYTYPE CHEQUENUMBER VARCHAR2(10) BANKNUMBER POSTALADDRESS1 VARCHAR2(20) POSTALADDRESS2 VARCHAR2(30) VARCHAR2(13) NOT NULL DATE NOT NULL VARCHAR2(10) VARCHAR2(15) POSTALCODE CHAR(4) VARCHAR2(30) VARCHAR2(30) МЕТНОD RESPMEDFUND EMPNAME EMPADDRESS Key Symbols V RESPID V MEDFUND VARCHAR2(13) NOT NULL v Primary Key TELNO VARCHAR2(20) VARCHARZ(15) VARCHAR2(20) VARCHAR2(30) NOT NULL VARCHAR2(20) NUMBER(8,2) MEDFUNDTYPE VARCHAR2(15) MEDFUNDNUMBER VARCHAR2(15) AMOUNT CELLNO Foreign Key TELNOWORK EMPTELNO VARCHAR2(15) Unique Key
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education