Difference between revisions of "Hivanson Week 8"
Jump to navigation
Jump to search
(→Results: add line for q9) |
(→Results: added output tables for all applicable queries) |
||
Line 10: | Line 10: | ||
*Query 1: SELECT DrugName FROM Products WHERE form ='INJECTABLE;INTRAVENOUS, SUBCUTANEOUS'; | *Query 1: SELECT DrugName FROM Products WHERE form ='INJECTABLE;INTRAVENOUS, SUBCUTANEOUS'; | ||
+ | **[[Media:Hivanson_Week8_Query1.xlsx|Table output here]] | ||
*Query 2: SELECT DrugName FROM Products WHERE ActiveIngredient ='ATROPINE'; | *Query 2: SELECT DrugName FROM Products WHERE ActiveIngredient ='ATROPINE'; | ||
+ | **[[Media:Hivanson_Week8_Query2.xlsx|Table output here]] | ||
*Query 3: SELECT Form, Strength FROM Products WHERE DrugName = 'Benadryl'; | *Query 3: SELECT Form, Strength FROM Products WHERE DrugName = 'Benadryl'; | ||
+ | **[[Media:Hivanson_Week8_Query3.xlsx|Table output here]] | ||
*Query 4: SELECT DrugName FROM Products WHERE DrugName LIKE '*ESTROL'; | *Query 4: SELECT DrugName FROM Products WHERE DrugName LIKE '*ESTROL'; | ||
+ | **[[Media:Hivanson_Week8_Query4.xlsx|Table output here]] | ||
*Query 5: Instructions "Produce a table listing all of the known values for the therapeutic_potential column in the application table and how many application records there are of each. (Side note: The therapeutic_potential codes are explained in the ReviewClass_Lookup.txt file, in case you’re interested.)" | *Query 5: Instructions "Produce a table listing all of the known values for the therapeutic_potential column in the application table and how many application records there are of each. (Side note: The therapeutic_potential codes are explained in the ReviewClass_Lookup.txt file, in case you’re interested.)" | ||
Line 24: | Line 28: | ||
*Query 7: SELECT DrugName FROM Applications RIGHT JOIN Products ON Applications.ApplNo = Products.ApplNo WHERE SponsorName = 'Merck'; | *Query 7: SELECT DrugName FROM Applications RIGHT JOIN Products ON Applications.ApplNo = Products.ApplNo WHERE SponsorName = 'Merck'; | ||
+ | **[[Media:Hivanson_Week8_Query7.xlsx|Table output here]] | ||
*Query 8: SELECT SponsorName, ActiveIngredient FROM Applications RIGHT JOIN Products ON Applications.ApplNo = Products.ApplNo WHERE ActiveIngredient LIKE '*ASPIRIN*CAFFEINE*' And SponsorName LIKE '*Labs*'; | *Query 8: SELECT SponsorName, ActiveIngredient FROM Applications RIGHT JOIN Products ON Applications.ApplNo = Products.ApplNo WHERE ActiveIngredient LIKE '*ASPIRIN*CAFFEINE*' And SponsorName LIKE '*Labs*'; | ||
+ | **[[Media:Hivanson_Week8_Query8.xlsx|Table output here]] | ||
*Question 9: | *Question 9: |
Revision as of 20:19, 13 March 2024
Contents
Purpose
Import public-access FDA drug database into Microsoft Access, then compare query capabilities using SQL on Access to those of the search function on the FDA drug database.
Methods
- I downloaded and extracted the files from the FDA Drug Database.
- I created a Microsoft Access database and imported all data files from step 1 using "Import"-->"Text File", and selecting "First Row Contains Field Names."
- When importing, I ensured that the fields matched the datatype outlined by the FDA website schema. I did not match the keys, as many of the fields that were stated to be keys contained duplicate information and therefore could not be listed as primary keys on Access.
- I attempted to set the relationships between my tables to match the schema provided by the FDA, but he two photos provided on the FDA website contained some conflicting information. I matched the relationships as best I could according to the photos and according to common field names. See screenshot of my relationships below:
Results
- Query 1: SELECT DrugName FROM Products WHERE form ='INJECTABLE;INTRAVENOUS, SUBCUTANEOUS';
- Query 2: SELECT DrugName FROM Products WHERE ActiveIngredient ='ATROPINE';
- Query 3: SELECT Form, Strength FROM Products WHERE DrugName = 'Benadryl';
- Query 4: SELECT DrugName FROM Products WHERE DrugName LIKE '*ESTROL';
- Query 5: Instructions "Produce a table listing all of the known values for the therapeutic_potential column in the application table and how many application records there are of each. (Side note: The therapeutic_potential codes are explained in the ReviewClass_Lookup.txt file, in case you’re interested.)"
- No "therapeutic_potential" column present in database, so cannot search column for query.
- Query 6: Instructions "Produce a table listing all of the known values for the chemical_type column in the application table and how many application records there are of each. (Side note: The chemical_type codes are explained in the ChemTypeLookup.txt file, in case you’re interested.)"
- No "chemical_type" column present in database, so cannot search column for query.
- Query 7: SELECT DrugName FROM Applications RIGHT JOIN Products ON Applications.ApplNo = Products.ApplNo WHERE SponsorName = 'Merck';
- Query 8: SELECT SponsorName, ActiveIngredient FROM Applications RIGHT JOIN Products ON Applications.ApplNo = Products.ApplNo WHERE ActiveIngredient LIKE '*ASPIRIN*CAFFEINE*' And SponsorName LIKE '*Labs*';
- Question 9:
Conclusion
- what was your main finding for today's project? Did you fulfill the purpose? Why or why not?