Category: ZIM User Documentation

The Original Internet Language

Methods

Defining a method method mAdd(viSelf)endMethod The keywords METHOD and ENDMETHOD have replaced LOCALPROCEDURE and ENDPROCEDURE. The above method declaration does not contain any behaviour. The class zCustomer below shows the class implementation, including behaviour for the add method. %—————————————————————–method mAdd(viSelf)add Customer from aCustomerendMethod %—————————————————————–method mDelete(viSelf)delete sCustomer where ID = aCustomer.IDendMethod %—————————————————————–method mpCustomer(viMethod, inout vtSelf)change aCustomer…
Read more

Implementation

An ASN is simply defined by letting the Reqd attribute of a field to be “Seq” and having the corresponding Entity-Set or Relationships with fields created (or recreated). To ensure proper handling of the existing data, it’s strongly recommended to use DC to perform this operation. The next step is to set the initial value…
Read more

About Automatic Sequence Numbers

The Automatic Sequence Numbers (ASN) is a ZIM feature that allows a field from Entity-Sets or Relationships with fields objects to get its value automatically incremented by one every time a record is added to this object. Usually, such sequential fields are used in these objects to supply a primary key, wherever one is missing.…
Read more

Operation

Once defined, adding records to objects containing ASN will increment the corresponding field by one, starting from the initialized value. In fact, the first record added in this way will have the initialized value, the second this value plus one, and so on. An ASN field is always required. By default, all ASN are enabled.…
Read more

Uniquely Identifying the Compiled Application

If there is to be more than one Zim application compiled against a given SQL server database, it is best to uniquely identify each application. Conflicts can occur between programs with the same name. An application can be flagged with an ID by including the following entry in the database configuration file (zimconfig.zim): SQL DATABASE…
Read more

Flagging Objects for the SQL Server

If the Zim application already exists, then some modifications to the data dictionary definitions for EntitySets and data relationships must be performed. Specifically, the field “EntType” in the data dictionary EntitySet “EntitySets” and/or the field “RelType” in the data dictionary entity set “Relationships” must be flagged as residing on the SQL server. These fields should…
Read more

SQL Views

EntitySets and data relationships in Zim can also be defined to map to SQL “views”. Again, the Zim field list need not include all columns of the view, nor need the field sequence correspond to that of the columns of the view. However, if the corresponding EntitySet or data relationship must be updated, then the…
Read more

SQL Table Subsets

The mapping between an SQL table and a Zim EntitySet or data relationship need not be complete with respect to the set of columns owned by the table. Zim retrieves only the columns required from an SQL table; it generates the minimal “select-column-list” to satisfy the requirements of the corresponding Zim command. The Zim Definition…
Read more

Naming Differences between Zim and SQL

Database systems, including Zim, have rules as to how objects such as database tables and columns (EntitySets and fields and Zim) are named. In Zim, object names must be 1 to 18 characters in length and start with an alphabetic character, an underscore (“_”), or dollar sign (“$”). If the name of a SQL table…
Read more

SQL Table “Owners”

Most SQL servers support the concept that each table is “owned” by a “user” or a “creator”. This enables multiple tables with the same name, but different owners, to be created. These servers also enable users to access tables owned by other users. When a user has some private information stored in database space owned…
Read more

en_CAEnglish