|
|
Recent News
|
Hotel Software DocumentationRelational Fields
It is recommended that you read the Form Editor section first. The program provides three types of relational elements to define records relations, combine records in groups and work with these recordsets: Many-to-Many Relational Field
IntroductionWith the help of Many-to-Many Relational Fields you can create relations between recordsets. What does it mean? For example, you want to create a database of books. To do this, you would need to create two types of records, i.e. "Book" and "Author". Since each book may be written by several authors, and each writer may be the author of several books, you would need to set a conformity between the recordsets of the "Author" type and of the "Book" type. Below is a graphical illustration of this process:
According to these relations, a user can affirm that:
Or, in a different way:
Establishing such relations allows you to get the answers to the following questions:
In exactly the same way, you can connect more than two types of records, such as "Products", "Customers", and "Orders". Step-By-Step Relational Database CreationThis section contains a detailed instruction of how to create a "Books and Authors" database described above. 1. Switch to the "Form Editor" mode. 2. Create a "Book" form and then place the following elements on it (see the "Form Editor" section):
It is also recommended to give some space for the many-to-many relational field "Authors" 3. Create an "Author" form and place the following elements on it:
When creating the "Books" field, the program will ask you:
Use the following formulas to extract data from a relational field when creating mathematical fields:
4. After that, return to editing the "Book" form, and add the "Authors" field, specifying the "Book" form as a source:
Nothing depends on order, in which the relational fields are created. Moreover, information about connections between records is stored in the record itself, not in the relational field. This means the following:
Working with the "Many-to-Many" FieldAfter the forms are created, close the Form Editor, and switch back to the database mode. There are two ways to connect two records (add a record to a relational field):
Accordingly, to delete a connection between 2 records, you should right-click the record in the relational field, and then select the "Remove selected Item" menu item:
As stated above, relations between the records are equivalent, which means that it does not matter either you add authors to a book description, or you add books to an author description, the result will be exactly the same. The same way is also appropriate for deleting relations. The contents of the many-to-many fields can be changed by using scripts. View example. One-way connections can be created by using a simple Relational Field. What is Relational Set?For example, you want to distinguish between two types of authors for a book: the major authors and minor authors. For this purpose you will need two many-to-many fields in the book form. One of the fields will store the major authors, while the other field will store minor authors. To make each of these fields independent of each other, you have to define
different Relational Sets for them.
This can be done in the Individual Properties tab of the field: By default Relation Sets have standard names Primary, Secondary, etc, but for convenience we will rename them into Major Authors and Minor Authors. Now the relations structure will look as follows: Now when you work with the many-to-many field you will have an additional
option at your disposal: Move selected to - this actopns moves records from one mmr field into another. In our case using this action you can move an author from the Major Authors field into Minor Authors, and vice versa. Simple Relational FieldSimple Relational Field allows to use in the record the data taken from other records. For example, you have such records as the Client type, and such ones as the Order type. In the Order record it will be convenient to create a Relational Field which will contain the link to the record about the client. Thus, the list of clients will be the source for the Order record. The field has the following parameters:
Relational Lookup Field
This field is used only together with the Relational Field or Many-to-Many Field, and is
used to display the source record(s) fields. In the case mentioned above, we can use the Relational Lookup Fields to display the client's age and address: The field has the following parameters:
|
Today"s Poll What software do use for your inn/b&b/hotel/etc? |
Home Page | Contacs | Terms and Conditions | Copyright (C) 2001-2010 Binary Brilliant Inc | |