Data Model Editor - Entities page
This page describes entities participating in the data model and their attributes.
Entities are intended to hide data storage details from the end user. Instead of operating with tables, views and fields (such as Orders.CustNo, Customers.Addr1) user see some entities from real world (Order, Customer, Vendor, etc.) and their attributes (Customer Name, Order Ship Date, Vendor Country, etc.).
For large data models entities can be organized in hierarhy for more easy manipulation.
There are two main types of entity attributes:
Data Attribute - it is totally corresponds to particular field in some database table (e.g. attribute Order Ship Date corresponds to database field Orders.ShipDate)
Virtual Attribute - a calculated attribute which is defined by some expression containing several fields, operators (+, -, ||, etc.), constants and even functions or storage procedure calls
Entities tree holds list of all defined entities and their attributes.
Main operations
To add a data attribute - select the entity node you would like to add it to and then choose Add Data Attribute item from “Entities” menu. Select the table, its field in the dialog that appear and click OK button.
To add a virtual (i.e., calculated) attribute, select the entity node you would like to add it to and choose ”Entities | Add Virtual Attribute” menu item.
To delete an attribute or entity - select it and choose ”Entities | Delete selected item” menu item.
To edit an attribute, select it in the tree and change its properties in the editor appearing in the dialog's right part.
To move the attribute from one entity to another (or to change its appearance order within the entity) - just drag it to the appropriate place.
The attribute's property editor has General, Operators and Value Editors tabs described below.
General tab
This tab contains the following input field and checkboxes:
Expression field - contains table and field names for data attributes and full
SQL expression for virtual ones. For data attributes this field is read-only.
Data Type and
Data Size fields - contain type of attribute and its size. These values are taken from corresponding field definition for data attributes and should be set manually by data model developer for virtual attributes. See
Data types for details.
Quote field name in SQL check box means if the field name should be put in quotes in
SQL statements. Useful for field names which includes some reserved words. Field names with spaces will be quoted automatically.
Operators tab
This tab holds list of all operations applicable to the attribute. Add or remove operations by corresponding buttons. Use Clear button to remove all operators from the list.
Use Defaults button to reset the list of operators for selected attribute to default state. The default operator list contains most appropriate operators for attribute's data type.
See Operators page for details about operators used in data models.
Value Editors tab
This tab allows to define how user will edit the parameters which the selected attribute is compared to in query conditions. To learn more about available editors see Value Editors topic. To specify editor parameters click on “Settings…” button.
Discussion