A database query is a request to retrieve, add, change, or delete information in a database. Applications use queries to perform routine tasks, such as looking up an account or displaying customer records. Logs may record which account or application made a query and when.
In cyber security, an unusual query can indicate that an attacker has reached a database through a compromised application or stolen credentials. It is evidence of access activity, but not proof that data was copied, removed, or altered. Defenders should correlate database logs with application and server activity, and investigate unexpected query patterns, accounts, or access times.


