Understanding Queries and Universes

You access data in a database by running queries using objects in a universe.  This section describes a query, and how you use a universe to build and run queries to get the data you need to answer your business questions.  This function also is used to create reports using the HTML panel.

What is a query?

A query is one or more statements that request data from a database. If the data is available, then the requested data is returned in the form of a table which contains rows and columns.

When you build a query, you are creating a request for information from a database. A request can be very simple, for example; give me total sales in California for the first quarter of last year, or more complicated, for example; give me an average age of customers who bought sweaters during the spring television promotion in Paris.

Queries are sent to the databases in a language called SQL. However, when you use the HTML Report Panel you do not have to know any SQL. The HTML Report Panel presents the information available in the database as objects that have names and meanings familiar to you. These objects are organized in a structure called a universe.

You build queries by combining objects in a universe. The universe translates the objects presented in your business language to SQL and then sends the request for information to the database. When the data is returned to the HTML panel, it is presented in a table form, with columns that have the same names as the objects that you used in the query. The data is arranged in rows.