Doctor Name Specialty DSSN DOCTOR Date prescribes M Pre ne PRESCRIPTION M Consist_of Pharmacy Name Address Phone N N Nam
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Doctor Name Specialty DSSN DOCTOR Date prescribes M Pre ne PRESCRIPTION M Consist_of Pharmacy Name Address Phone N N Nam
Doctor Name Specialty DSSN DOCTOR Date prescribes M Pre ne PRESCRIPTION M Consist_of Pharmacy Name Address Phone N N Name N M DRUG Sells PHARMACY Formula M Price Makes PHARMACEUTICAL COMPANY Phone Compang Name
Doctor (dssn dname, specialty) Prescription( dssn. pre_no, pdate) foreign key (dssn) references to doctor(dssn) Ph_company( pname, phone) Drug (pname, trade_name, formula) foreign key (pname) references to Ph_company(pname) Consist of (dsen, pre_no, pname, trade name) foreign key (dssn, pre_no) references prescription(dssn, pre_no), foreign key (pname, trade_name) references drug(panme, trade_name) Pharmacy (pcy_name, address, phone) Sell (pharmacy name, pname, trade name price) foreign key (pname, trade_name) references drug (pname, trade_name), foreign key (pharmacy_name) references pharmacy (pcy_name)
5) Retrieve number of type of drugs made by 'Pfizer". (Type is distinguished by "trade_name"). 6) Obtain information (pharmacy name, address) of pharmacy that sells “Ibuprofen" with the highest price among all pharmacies. ("Ibuprofen" is a trade name) 7) Retrieve the pharmacies that sell more than 2 types of drugs. List pharmacy name and number of types of drugs sold. (Type is distinguished by "trade_name". However, if two drugs with the same trade name are produced by two different pharmaceutical companies, they are considered as two different types of drugs.)