The opioid epidemic is still raging, and many individuals ar…

The opioid epidemic is still raging, and many individuals are losing their lives to addiction.  Opioids are used for treating pain, but they can lead to addiction. The ERD below presents the processes of a healthcare facility with a pharmacy employing many pharmacists. The management wants to keep track of the physician prescribing the opioid and the pharmacist who is filling the prescription to prevent fraud or abuse. Foreign keys are omitted.  Identify for each entity the foreign key(s) if any. If there is no foreign key for an entity, type “none”.   Physician foreign key(s): Specialty foreign key(s): PrescriptionFilling foreign key(s): Patient foreign key(s): Pharmacist foreign key(s): InsuranceType foreign key(s):    

You are creating a database to record data on cities across…

You are creating a database to record data on cities across the United States. You want to know the average population per city. What data type would you select for the number of inhabitants in each city, knowing that this number ranges from one (1) inhabitant in Monowi, Nebraska to more than 8.8 million inhabitants in New York City? 

Given the following tables: Write a SQL code to provide the…

Given the following tables: Write a SQL code to provide the average length of time (in days) between sale date and shipping date by state. Your report should include the state and the average length of time. Order your list from the largest to the smallest time interval.