Automatic Relationships

Aware IM takes the complexity out of management of related data - a significant part of any business application - which makes applications much easier to create, especially for non-technical people. Here is how.

Easy definition

Relationships in Aware IM are defined in the same way as ordinary attributes. When you select a type for an attribute, Aware IM offers you a single selection list with all basic types (text, number, date, etc.) as well as the names of all business objects you have defined. For example, you can add an attribute Customer of type Client to object Order in much the same way as you would add an attribute Shipment Address of type text.

In other systems you would need to add some special ID columns to both tables, separately define a relationship, specify the ID columns as relationship keys and decide which key is primary and which is foreign. Aware IM does this all automatically for you.

Automatic user interface

Aware IM automatically generates the user interface to display, link, unlink and navigate to related data. You do not need to add any special buttons or write scripts to let the users see or manipulate related data. This user interface includes the following elements displayed for each relationship attribute on a data form of an object:

  • Relationship table (called "portal" in some systems). You can specify which attributes of the related object are shown in the table, the sort order and the number of records to be displayed. If there are more related records than the number you specified for the table, Aware IM will add navigation buttons to let the users scroll up and down the related record list without leaving the form.
  • Hyperlinks to navigate to related records. The users can go directly to the full data form for a related record simply by clicking a record in the relationship table. The other data form may have its own relationship tables. Therefore, with a few mouse clicks the users can very effectively traverse the system to find desired data by moving from one related record to another.
  • A button to create new related record. Once the record is created (using its own data form) it will be automatically added to the relationship table.
  • A button to add existing records to the related record list. Aware IM shows a list of existing records where the the user can specify filter criteria to narrow down the list. Once the user selects a record (or records), Aware IM shows the initial data form with the selected records added to the relationship table.
  • Buttons to remove one or all related records from the list.
  • Buttons to sort the related record list by any column displayed in the relationship table
  • A button to filter records displayed in the relationship table. The users can specify their own filter criteria.

When the user adds or removes a related record in the relationship table on a form, Aware IM automatically manages the related record IDs and registers the relationship in the database.

Two-way relationships

Usually, relationships between two records should be visible from both ends. If Order is aware of its client, it is only logical that Client be aware of its orders. To make a two-way relationship in Aware IM you simply specify attribute Orders in object Client as a matching attribute for Customer in Order, and Aware IM will automatically create it for you.

In some other systems you may have to define a second relationship just for the sake of visibility, with primary and foreign keys being in reverse to those in the original relationship. In Aware IM it is all done automatically.

Many-to-many relationships

In addition to one-to-one and one-to-many relationships, in Aware IM you can also define many-to-many relationships. For example, you may want to set up client groups where clients can be members of several groups. In Aware IM this is done simply by having a multi-value attribute Clients in object Group and a matching multi-value attribute Groups in object Client.

In systems that do not support many-to-many relationships there is no easy workaround. You would have to define an in-between table to indirectly link Client and Group via two one-to-one relationships and manage the resulting complexity. With Aware IM there is no need for any of this.

Relationship owners

In a relationship defined between two objects, one of them may depend on the other. For example, if a client was deleted from the system, it may not make much sense to keep the orders of the client. In Aware IM you can indicate ownership for a relationship attribute. Aware IM will automatically delete dependent records when the owner record is deleted. For example, if a client was deleted, Aware IM would delete all the orders, and their dependent line items, of the client.

Relationship path

In Aware IM you can chain several relationships together into a relationship path to get access to a related record via other related records. Relationship paths can be used in many parts of the system, including business rules , queries and document templates.

For example, you may have a validation rule to restrict the age of people who can place an order. The rule applies to an order, however it checks some details of a client placing the order. In Aware IM such a rule could look like this:

If AGE (Order.Customer.DateOfBirth) <18 Then REPORT ERROR 'Orders cannot be placed by customers under 18 years old'

To find all goods ordered from a particular manufacturer you could prepare the following query:

FIND LineItem WHERE LineItem.Product.Manufacturer.Name = 'Sony'

If you wanted to direct an invoice to the client's organization, you could include the following line into the invoice template:

Bill To: <<Order.Customer.Company.Name>>