Hivanson Week 8
Contents
FDA Drugs Database on Microsoft Access
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 index.
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 entity relationship diagrams provided on the FDA website contained some conflicting information. I matched the relationships as best I could according to the diagrams and according to common field names. See screenshot of my relationships below:
- I used SQL functions to query the database. See Results section.
Notes and Observations: Date columns were giving me issues; to resolve the issues upon importation: I changed the datatype from date/time to short text, and then after importing changed it back to date. This resolved the issue. SQL functions were tough to figure out at first, but eventually they all seemed pretty similar to one another. I would love to have more practice making more complex SQL queries.
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: The search function on the FDA Drugs index states that a user can "Search by Drug Name, Active Ingredient, or Application Number." Going through the list of queries that we used SQL to run, none can be run using the search function on the website. The FDA Drugs index does not allow search by form of drug (Query 1). The index does not allow a search to find a singular active ingredient (perhaps the search they are using is closer to
LIKE '*<text>*'
than= '<text>'
) and therefore cannot complete Query 2. Only one result is shown when searching the index for "Benadryl" while Query 3 using SQL retrieved 5 results. Endings and beginnings cannot be searched (Queries 4 and 8). Sponsor name cannot be searched (Query 7). These queries could not have been completed using the search function on the FDA Drugs index website alone, unless combing through and checking each listing for the desired characteristics (which is not a search).
Conclusion
By importing the FDA Drugs database to Microsoft Access, setting relationships between tables, and comparing searching using SQL functions to the search function on the FDA Drugs index website, we have learned the limitations of search functions provided by usual user interfaces, and have an understanding of how much can be done with SQL search functions. SQL allows for more flexibility and specificity in searching the FDA Drugs database than the FDA Drug Index search function provides.
Acknowledgments
I worked on this assignment during class time on 3/7/2024, 3/9/2024, and 3/12/2024 receiving help and guidance from Drs. Dionisio and Dahlquist, as well as collaborating in-person with all five of my classmates.
Except for what is noted above, this individual journal entry was completed by me and not copied from another source.
Hivanson (talk) 22:19, 13 March 2024 (PDT)
References
- Access SQL: basic concepts, vocabulary, and syntax—Microsoft Support. (n.d.). Retrieved March 13, 2024, from https://support.microsoft.com/en-us/office/access-sql-basic-concepts-vocabulary-and-syntax-444d0303-cde1-424e-9a74-e8dc3e460671?ui=en-us&rs=en-us&ad=us
- Drugs@FDA Data Files. (n.d.). FDA; FDA. Retrieved March 13, 2024, from https://www.fda.gov/drugs/drug-approvals-and-databases/drugsfda-data-files
- Drugs@FDA: FDA-Approved Drugs. (n.d.). Retrieved March 13, 2024, from https://www.accessdata.fda.gov/scripts/cder/daf/index.cfm
- Ford, P. (2015, June 11). What Is Code? Bloomberg. https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/
- LMU BioDB 2024. (2024). Week 8. Retrieved March 13, 2024, from https://xmlpipedb.cs.lmu.edu/biodb/spring2024/index.php/Week_8
- Hivanson
- Hivanson Week 1 | Week 1 Assignment
- Hivanson Week 2 | Week 2 Assignment
- IMD3 Hivanson and Nstojan1 Week 3 | Week 3 Assignment
- NeMO Week 4 | Week 4 Assignment
- Hivanson Week 5 | Week 5 Assignment
- Hivanson Week 6 | Week 6 Assignment
- Hivanson Week 8 | Week 8 Assignment
- Hivanson Week 9 | Week 9 Assignment
- Hivanson Week 10 | Week 10 Assignment
- Hivanson Week 12 | Week 12 Assignment
- Hivanson Week 13 | Week 13 Assignment
- Hivanson Week 14 | Week 14 Assignment
- Hivanson Week 15 | Week 15 Assignment
- Main page