v1.5 user manual


 

The Field Concept

prev    TOC    next
 

As in any common database a field in a db2go object consists (at least) of a field name and a field entry (e.g. country Germany). However db2go fields can be one of three different types depending on how they are stored in the databases:

1. the first type is the local field: name and entry of the field are stored as text in the object record of the object database, so the field is local to its object. If you want to use the same field (e.g. country) in another object you have to reenter the name. This field type is indicated by a dashed line below the field name and the field item in the object form:

2. the second type is the global field: this is the field type known from common da­ta­ba­ses. The field is available in all records. In db2go the name of a global field is not stored in the object record itself but in a separate database, the list database. The object does only contain a link to the field.

The field is available in all records via a popup list. A global field is indicated by a non underlined field name in the object form:


3. the third type is a global field with a global entry: the field entry is an item from a list of items assigned to the field. Both, the fields name and its list of items are stored in the list database. The object contains links to both. The list of items is available in all objects via a popup list. This field type has no dashed lines at all in the object form:

Only fields of the third type can be used for linking between objects (see tutorial). The second type should be used if linking is not needed and the field entry is unlikely to be needed in other objects too (like for example phone numbers or last names in an address database). The first field type can be used for any kind of text. It is also possible to use only the field name or the field entry.