Difference between Query and ad hoc query
A query is a specific request for data manipulation issued to the DBMS. Simply put, a query is a question and an ad hoc query is a spur -of-the-moment question. A query language is a nonprocedural language- one that let the user specify what must be done without having to specify how it is to be done. Structured query language is the de facto query language and data access standard supported by the majority of DBMS vendors.
MetaData
It is the data about the data, through which the end user data are integrated and managed. The metadat provide a description of the data characteristics and the set of relationships that link the data found within the database. The DBMS stores definitions of the data elements and their relationships(metadata) in a data dictionary.