What is a Database Query?
A database query is the exact search you type into a database: the terms, how they are combined, and any field tags or limits. In research, a written query is what makes a search repeatable, so it belongs in the methods of a literature search or review.
How to Create a Database Query
- Split your question into two to four main concepts.
- List synonyms and related terms for each concept, plus the database's subject headings.
- Join the terms for each concept with OR, and join the concepts with AND (see Boolean operators).
- Use quotation marks for phrases and an asterisk for word endings.
- Add field tags and filters once the core query works.
Example Query
Plain version: "renewable energy" AND (policy OR legislation OR regulation)
Scopus version, limited to titles, abstracts and keywords: TITLE-ABS-KEY("renewable energy" AND (policy OR legislation OR regulation))
Each database has its own syntax, so a query is usually translated for each one you search, which is a standard step in a search strategy.
Testing a Query
- Known-item check: make sure two or three key papers you already know appear in the results.
- Too many results: add a concept with AND, search titles and abstracts only, or add filters.
- Too few: add synonyms with OR, remove a concept, or use truncation.
Best Practices
- Build complex queries in the database's advanced search form.
- Save the final query string, the database and the date you ran it.
- Set up an alert on the saved query to catch new papers while you write.