SQL Maestro for MySQL online help
Prev | Return to chapter overview | Next |
Editing view properties
View Editor provides you with an ability to edit view properties. The Properties tab allows you to change the view name, view definition, the view owner and the comment for the view.
Subitems
Every tab is intended for managing some view subitems (e.g. MySQL provides only the one view subitem type - fields). Each object can be opened in its editor. Use grid’s popup menu to create new, edit or drop the selected view subitems. Using the popup menu you can also copy the selected objects to clipboard or paste previously copied objects.
You can operate on several objects at a time. For this you have to select view objects with the Shift or the Ctrl key pressed. After a group of objects is selected you can operate on it, e.g. delete several objects at once, as if it were a single object.
See also: Fields
Body
You can edit the view definition in this box.
Use the Name field to specify the view name.
Note: the name of the object must be unique among all the object names in its container. Moreover, all the objects that are source of data need unique names among themselves. You can use any identifier that is allowed by MySQL server.
Owner
Represents the view owner. By default, only the owner of an object can perform various operations with the object. In order to allow other users to operate it, privileges must be granted. (However, users that have the superuser attribute can always access any object.)
Comment
This field stores a comment to the view.
SQL Security (Definer, Invoker)
The field allows you to change the view security (It will be executable by the user who defined it or invoked it respectively). Only for MySQL versions since 5.1.2.
Algorithm (Undefined, Merge, Temporary Table)
Edit here the view algorithm affecting how MySQL processes the view.
Merge |
The text of a statement that refers to the view and the view definition are merged such that parts of the view definition replace corresponding parts of the statement. |
Temporary Table |
The results from the view are retrieved into a temporary table, which then is used to execute the statement. |
Undefined |
MySQL chooses which algorithm to use. It prefers MERGE over TEMPTABLE if possible, because MERGE is usually more efficient and because a view cannot be updatable if a temporary table is used. |
A reason to choose Temporary Table explicitly is that locks can be released on underlying tables after the temporary table has been created and before it is used to finish processing the statement. This might result in quicker lock release than the Merge algorithm so that other clients that use the view are not blocked as long.
With Check Option
Check the option for an updatable view to prevent inserts or updates to rows except those for which the WHERE clause in the select statement is true.
Check option kind (Cascaded, Local)
The clause is available if With Check Option is 'on'. It allows to determine the scope of check testing when the view is defined in terms of another view. The Local restricts the Check option only to the view being defined. Cascaded causes the checks for underlying views to be evaluated as well. When neither keyword is given, the default is Cascaded.
To apply the changes, select the Apply Changes item in the Navigation bar or use Ctrl+F9 or Ctrl+F7 shortcut keys.
It is also possible to modify object properties without opening the object editor: use the Object Properties item of the popup menu of the selected object from the explorer tree.
Prev | Return to chapter overview | Next |