Running a Query

You use a universe to build a query in much the same way that you use nouns and verbs to construct a sentence. The dimension objects form the subject matter for the query. These are the objects that contain the information you want to retrieve, and a measure gives the query its required action, it tells the query what to do with the information represented by the dimensions.

Why build a query?

You build a query to answer a business question that requires data from a database. The query is your means to ask the database for information.

How do you use the universe to build a query?

From the universe, you select the dimensions and details that represent the information that you want to retrieve, and add them to a work space called the Results Objects pane. You add one or two measure objects that represent the calculation, or the action that you want to perform on the information. Once you have constructed your query, you then run the query against the database.

What happens when you run a query?

When you run a query, you tell the universe to send the statement that you have constructed in the Results Objects pane to the database. The statement is processed in the database, and the results are sent back to the HTML panel in the form of a document. The document contains all the information that you have asked for in the query arranged in columns and rows.

Returned data is stored for analysis

The data that is returned in a query is stored in the document. The document that displays the data as a table is a flat projection of the data which is stored as a cube.

Data is stored in a cube

Physically returned data is not stored as a cube, but conceptually it is convenient to refer to this data as being stored as a cube. Each of the columns in a returned document represents an axis in the cube. You can edit the document by swapping and manipulating the data within the cube on any axis. When you swap or change data between different axes, the new result is again projected as a flat table in the resulting document. The data stored in the cube allows you to create a report that corresponds to your business needs without having to send another query to the database. If you want to add information to the document that is not in the cube, then you must add the object to the query and run the query again to get the new information.