13. Find the name of all patients whose ID ends with '445' 14. Add new medicine to the database 15. Change the price of 'Panadol’ medicine to 4

Database Systems: Design, Implementation, & Management
11th Edition
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter11: Database Performance Tuning And Query Optimization
Section: Chapter Questions
Problem 2P: Problem 1 and 2 are based on the following query: SELECT EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX...
icon
Related questions
Question
What is the solution for this question (using sql queries)
13. Find the name of all patients whose ID ends with '445'
14. Add new medicine to the database
15. Change the price of 'Panadol’ medicine to 4
Transcribed Image Text:13. Find the name of all patients whose ID ends with '445' 14. Add new medicine to the database 15. Change the price of 'Panadol’ medicine to 4
Problem 4: SQL Queries
Consider the following Relational schema and Relations instances.
Patient (ID:char(9), p_name:varchar(25), City: varchar(50))
Prescription (Patient_ID:char(9), Medicine_code:char(5), Clinic:varchar(25))
Medicine (code:char(5), m_name:varchar, Ingredients:varchar, Price:float )
Patient
Prescription
ID
P_name
City
Patient ID
Medicine code
Clinic
112233445
Adam
Beirut
112233445
Nx306
Well Nutrition
998877665
Bob
Saida
112233445
Pa003
Healthy Clinic
556677889
Sara
Zahle
998877665
Pa003
Safe Clinic
443322445
Eve
Туre
443322445
Ad500
Safe Clinic
443322445
Nx306
Well Nutrition
Medicine
code
M_name
Ingredients
Price
Pa003
Panadol
Potassium, Paracetamol, Starch
5.5
Nx306
Nexume
Magnesium, Polysorbate, Glyceryl
20.0
Ad500
Adol
Acetaminophen, Paracetamol
3.0
Aр800
Aspirin
Acetysalicylic Acid, Starch
8.55
Transcribed Image Text:Problem 4: SQL Queries Consider the following Relational schema and Relations instances. Patient (ID:char(9), p_name:varchar(25), City: varchar(50)) Prescription (Patient_ID:char(9), Medicine_code:char(5), Clinic:varchar(25)) Medicine (code:char(5), m_name:varchar, Ingredients:varchar, Price:float ) Patient Prescription ID P_name City Patient ID Medicine code Clinic 112233445 Adam Beirut 112233445 Nx306 Well Nutrition 998877665 Bob Saida 112233445 Pa003 Healthy Clinic 556677889 Sara Zahle 998877665 Pa003 Safe Clinic 443322445 Eve Туre 443322445 Ad500 Safe Clinic 443322445 Nx306 Well Nutrition Medicine code M_name Ingredients Price Pa003 Panadol Potassium, Paracetamol, Starch 5.5 Nx306 Nexume Magnesium, Polysorbate, Glyceryl 20.0 Ad500 Adol Acetaminophen, Paracetamol 3.0 Aр800 Aspirin Acetysalicylic Acid, Starch 8.55
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
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
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr