Entities and Objects: View Creation Wizard

By creating views, pgDesigner provides a wizard that allows you to create an object view to a process driven. From the main menu or from the panel of instruments on the left of this window, you can access and start the wizard that, through a window containing a number of folders, to allow the integration of data necessary for creation the view.

As with all objects in a project, the area has a window where you must enter the name of the object that will be created, which must be unique within the same project. The window is made up of five folders, corresponding to commands that normally make a SQL SELECT.

In the first folder "Select" You can insert fields of tables and other views, which will form part of the query sight. As you can see from the figure, the folder contains four buttons with which you can add or delete fields, or move to a compliance order. At the center is a list that lists all fields belonging to the query, including references to the tables or views from which they were derived, the inclusion of a new field is carried out by selecting the table (or view) of origin in combo "Table" at the top tab, and one of the fields contained in it, acting on the second combo. Each change made in the first combo, the second will be upgraded automatically loading in its list all fields relating to the new selection.

In the second tab "Where" is possible to define the conditions of the query filter. Based on the selected references in the previous card, you can set the conditions by which the view perform the extraction of data. Through the present controls tab you can also insert calculated fields (eg SUM), acting appropriately on controls. The listed below tab presents a list of conditions included in the query, and as for the previous card, you can insert or delete rows or order conditions in a different way.

The third tab "Group by" lets you enter the grouping necessary if, for example, the inclusion of a calculated field running the sum of value of a given field (SUM). As in previous, even here there are the usual buttons: insert a new grouping, erase an existing order, the sequence different sort of elements in the list.

The fourth tab "Having" can be used for placing conditions, other than those managed by WHERE. For a detailed description of the standard SQL syntax, please refer to other documentation.

The last card "by Order" allows you to define the order that will be provided from queries on the data before making them available. Like the other cards, this presents the usual buttons management list.