تم الحل ✓
categoryهندسة الحاسبات
schoolبكالوريوس
event_available2026-07-15
السؤال
Transcribed Image Text:
Fig 3: A Database State of the RX pharmacies Database
Drug
TRADENAME
FORMULA
MADEBY
Tylenol
C8H9NO2
Johnson and Johnson
Advil
C13H1802
Pfizer
Motrin
C13H1802
Johnson and Johnson
Allegra
C32H39N04
US FDA
Asprin
C9H804
Bayer
PCompany
CNAME
Johnson and Johnson
CPHONE
1(732) 524-0400
Pfizer
1 (877) 633-2001
US FDA
1 (888) 463-6332
Bayer
1 (800) 265-7382
Pharmacy
PHNAME
PHADDRESS
PHPHONE
Walmart
3120 Dougall, Windsor
519-969-8121
Shoppers 1675 Wyandotte, Windsor 519-253-4477
Rexall
Cotsco
1215 Ouellette, Windsor 519-256-1700
4411 Walker, Windsor
519-972-1899
Sells
CNAME
TRADENAME
PHNAME
PRICE
Johnson and Johnson
Tylenol
Walmart
55.33
Johnson and Johnson
Tylenol
Rexall
57.45
Johnson and Johnson
Tylenol
Shoppers
58.00
Johnson and Johnson
Tylenol
Costco
55.10
Bayer
Asprin
Shoppers
90.20
US FDA
Allegra
Shoppers
9.28
Pfizer
Advil
Walmart
80.50
Pfizer
Advil
Shoppers
83.99
Contracts
CNAME
PHNAME
SUPERVISOR
SDATE
ENDDATE CTEXT
Johnson and Johnson
Johnson and Johnson
Walmart
Rexall
Mary Adams
Pete Batta
21-jan-2019
12-mar-2019 15-jan-2021
31-dec-2020 NULL
APPROVED
Using the RX pharmacies Database of Fig 3, answer the following questions
by expressing the queries in:
(i) SQL,
(ii) Relational algebra (RA),
(iii) Relational Calculus (RC) as well as showing the,
(iv) result of each query.
Note: specify any needed aggregate function or group by attributes within your
relational calculus and algebra queries appropriately by specifying those
aggregate function and group by in the regular RC query if it does not have a
function to represent it usually.
(a) Retrieve the company names (Cname) and their phone numbers, drug name
(Tradename) for drugs that are sold at Shoppers pharmacy (Phname) and which
cost less than $55.
(10 marks)
(b) For each drug, list the drug name (tradename) and the minimum price this
drug is sold (by all pharmacies). For example, the minimum price that Tylenol is
sold is $55.10.
** Some symbols that may be useful for copying are: σ, л, ←,--,
(10 marks)
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.