define a query in database
A database query is a piece of code (a query) that is sent to a database in order to get information back from the database. It is used as the way of retriving the information from database. A database query is basically a question that you ask the database.