| |
| |
| The object
definitions with methods and attributes for business
entities are stored in the data definition model
as relationships, constraints and conditions among
data items from the database. While creating a custom
UDM, you can notice that SQL statements are built
as a part of UDM. An important feature that can
affect SQL statement are the Filters and the
database conditions that gives more meaning to an
SQL statement. Adding a child to a node implements
the master-detail relationship. |
| |
|
| The
syntax of normal SQL select statement is "select
* from ". This is a case where
all the field and their values will be displayed.
The same sort of SQL statement is built at the time
of creation of Custom UDM at the point of adding
a child to a node. |
|
|
| Choosing
the propagation of the node like display only, insert
only, update only is where the first part of SQL
is being constructed. If you select display only,
the SQL statement is the select statement. Specify
the data type (selecting the table from combo upon
which the propagation takes place), that will be
the table on which the select statement acts. Unless
the fields of a table are selected as none, all
the field values are selected and listed by the
custom UDM in the browser at the runtime. In a similar
way insert and update statements are also constructed. |
| |
|
|
1
|
Selecting
the node propagation option |
|
|
The
no. of rows returned by a query can be limited by
applying a where condition to the SQL statement.
The syntax for the above condition will look like
"select * from where
= ". While adding a child
to a node applying Filters and specifying the
database parameters (including session variables)
in the where condition for retrieval of data constructs
the rest part of SQL statement in this case. |
|
|
|
2
|
Selecting
the data type name (table name) |
|
|
|
|
3
|
Specifying
Database parameters (Filters will automatically
appear wherever applicable if created by the user) |
| |
If the data
items in a database have one to many relationship,
add relator to implement the relationship in the
custom UDM if proper relationship exists between
the objects in the nodes. The relationship concepts
in the database can well be understood by observing
the creation of custom UDMs and keeping track of
the same. SQL is built in this way automatically
by zeroCode, by specifying the required parameters
which constructs the SQL statement. |
| |
|