You may have heard about the IBM data access tool, but you may not be exactly sure what the data access tool is and how you can use it. This article examines some of the main features and functionality that the data access tool offers. You will learn what the data access tool is, how to access it, what types of design features it offers for designers, and what types of features it offers for users.
The IBM data access tool is one of the new tools available in release 2.5 of the IBM Workplace Client Technology, rich edition. The data access tool lets you create, design, modify, and run database applications whose data is stored in a local IBM Cloudscape database. A database application contains a collection of tables, which are used to define the type of data that will be worked with in the database application, and a collection of design elements, including forms, grids, reports, and images, which are used to access, enter, edit, organize, and store data in the database application.
The data access tool consists of two main parts: data access designer and data access viewer. Data access designer is where you create and design a database application. Data access viewer is where you run and enter data into a database application. Designers can create a database application from scratch or use one of the three templates that ship with the data access tool. The templates are complete with a design framework and sample data. Creating a database application with a template is useful if you want to start with a database application that already contains a design and sample data, so you can learn how the functionality of the template was set up. You can delete the sample data from a database application that was created from a template (as well as from a database application that you created from scratch), so that you can use the template design with your own data.
Both data access designer and data access viewer are accessed through the Application catalog in the Workplace rich client. The Application catalog is a tool that lets you create, edit, and use database applications. Only database applications that you are an owner, designer, or user of are available in the Application catalog.
To access the Application catalog, click the Applications icon in the Switcher bar of the rich client.
Figure 1. Applications catalog
Accessing the data access tool
Access to the data access tool is controlled through your Workplace user policy. Your administrator determines whether you can use both data access designer and data access viewer or just data access viewer. Your user policy has an option called Allow Workplace applications. If your administrator selects Use and Create for this option, you can use data access designer to create and modify database applications. You can also use data access viewer to open and run database applications. If your administrator selects only Use, you can open and run an existing database application that you have access to in data access viewer, but you cannot access data access designer.
Working with database applications in data access designer
Data access designer is what you use to create, design, and modify database applications.
Creating and opening database applications in data access designer
To create a new database application in the data access tool, follow these steps:
- Log in to the IBM Workplace rich client.
- In the Switcher bar, click Applications to open the Application catalog.
- In the Application catalog, click the New button.
- Fill out the necessary fields in the New Application and New Database Application dialog boxes.
When the database application is created, it will automatically open in data access designer. Data access designer opens in its own window, so you can still access other areas of the rich client and work in data access designer at the same time.
To open an existing database application in data access designer, do the following:
- In the Switcher bar, click Applications to open the Application catalog.
- In the Application catalog, right-click the name of the database application, and then click Edit.
The database application opens in data access designer.
A closer look at data access designer
The user interface of data access designer is made up of these main sections:
- Database Applications navigator displays all of the database applications and their design elements.
- Design editor is the area where you do the main design work in your database application.
- Palette contains all of the controls and decorations that you can use in a design element.
- Attributes editor contains all of the attributes that you can set on a database application, design element, control, and decoration.
Figure 2. Data access designer
A design element is what you use to access, enter, edit, organize, and store data. The following design elements make up a database application:
- Data definitions contain one or more related or unrelated tables that define the type of data that you want in your database application. Each database application has one data definition. You cannot design a database application without first creating a data definition.
- Forms allow you to enter data when viewed in data access viewer. Forms are completely customizable so that they can be designed for any purpose.
- Grids allow you to enter data when viewed in data access viewer. Grids have a structured format that is made up of columns and rows. Grids display all of the existing records at the same time.
- Reports organize and present data in data access viewer that is based on specific criteria that was designed for the report.
- Images allow you to import graphical images, such as GIF files, into the database application so that they are available for use in all design elements.
Working with database applications in data access viewer
Data access viewer is what you use to enter and view data in a database application. You enter data into forms and grids to create records. A record is one set of related information in a database application. For example, in an employee database application, the information about each employee (name, address, date of birth, and so on) is a record.
Opening database applications in data access viewer
To open an existing database application in data access viewer, follow these steps:
- In the Switcher bar, click Applications to open the Application catalog.
- In the Application catalog, double-click the name of the database application, or right-click the name of a database application, and then click Open.
The database application opens in data access viewer inside the Application catalog, displaying the default design element of the database application. A database application opens as a new tab in the Application catalog so that you can open multiple database applications at once and switch between them within the Application catalog.
A closer look at data access viewer
The user interface of data access viewer is made up of these main sections:
- Top action bar allows you to navigate among design elements and create, save, delete, duplicate, and refresh records.
- Bottom action bar offers options for switching among records, sorting and filtering data, and showing and hiding certain data.
- Element navigator allows you to open a particular design element. The element navigator is the Show drop-down list located in the top action bar.
Figure 3. Data access viewer
NOTE: Designers can hide the top and bottom action bars and hide the element navigator (Show drop-down list). The options Show action bar and Show element navigator are available in data access designer in the Attributes editor for the database application. A designer may want to hide the action bars or the element navigator if similar actions or navigation have been designed within the design elements themselves.
Designing a database application
Now that you know what the data access tool is, what to use it for, and how to access it, let’s look at some of the main features that the data access tool offers for designing a database application. This is not a complete list of the features and functionality available in data access designer. For more documentation, refer to the "Data access designer" book in the Workplace rich client Help system by choosing Help - Help Contents in the rich client.
Before designing a database application, it is important to plan what you want the database application to be used for. For example, you may want a database application to track how many sick days are used in your company in a given year, or you may want to track which health care plans employees choose and whether or not those employees have dependents. Whatever the need is for creating a database application, it is recommended that you plan how that data will be used when it is collected in the database application and what types of reports should be generated as a result of the collected data.
A closer look at the design elements
Database applications are made up of design elements. Earlier, you learned what each design element was and what they were used for. Now let’s look a little closer at what you can do within each design element to enhance the design of a database application.
Data definitions
A data definition is made up of tables. Each table contains table columns that you create, which define your data. To access the data definition in a database application, under the section heading of the database application listed in the Database Applications navigator, double-click Data Definition. To create a table in the data definition, open the Palette. In it, click Table under Data Definition Components, and then click in an empty space in the design editor to drop the table.
Figure 4. Data definitions
Primary keys
When you create a table, you are required to define a primary key table column. A primary key is a table column whose value must be unique in every created record, for example a social security number. Every table must contain at least one primary key, but you can have multiple primary keys in a table. The first table column that you create in a table must be the primary key; however, you can change the primary key assignment after the table is created.
Relationships
After you create tables in the data definition, you can link tables together through a relationship. A relationship is an association between two or more tables within a data definition. Relationships allow forms, grids, and reports created for one table to use data from another table that it is joined to.
A relationship consists of one or more columns in a source table that links to the primary key of a target table. The columns of the source table that you link to in the target table are known as the foreign keys of the source table. Currently in this release, relationships can go only one way—from the source table to the target table. But if you have a source table that is joined to a target table and that target table is the source table of a different relationship, you can have a chain of tables available to use within your forms, grids, and reports.
Relationships are useful if you are collecting one type of data in one table and a different type of data in another table, but know that you want both types of data available in one form, or you want to display data from multiple tables in one report.
To create a relationship, select a table that you want to use as the source table, click the Relationships tab in the attributes editor, and then click the Add button.
XPath expressions
You can use XPath expressions to perform simple computations within a database application, for example when you create a table, or when you create or edit controls in design elements. The data access tool uses XPath as a declarative scripting language.
Forms
A form is used to collect data in data access viewer. Forms do not have a formal structure, so you can design a form in any way that you like. In data access designer, forms contain design controls and decorations. In data access viewer, each form that is created becomes one record.
Forms are useful if you want to provide a simple and aesthetically pleasing way to collect specific data from multiple users. For example, you can use a form to collect employee name and address information. A user needs to fill out only one form with his or her information and then the user is done. Alternatively, a single data entry person can complete forms for multiple employees.
To access the forms in a database application, under the section heading of the database application listed in the Database Applications navigator, double-click Forms.
To create a form, open Forms, and then click the New Form button.
Figure 5. Form
Design controls
A design control determines how users work with data in forms, grids, and reports. Examples of design controls are buttons, edit boxes, hyperlinks, computed fields, and combination boxes. Design controls in forms become fields when viewed in data access viewer.
When you first create a form, grid, or report in data access designer, you must pick a table to base the design element on. When a new form that you create opens, it is populated with design controls that are based on the types of columns that are in a table. When you create a table column, you must choose a UI control type for that table column. For example, if you choose a combination box as a UI control type, the control on the form that is based on that table column will be a combination box control. You can add new design controls to a form and delete existing ones.
To add a design control to a design element, click a design control in the Palette, and then click in an empty space in the design editor to drop the design control.
Decorations
A decoration is a type of control that is only available for forms that allows you to enhance and customize your forms. Examples of decorations include rectangles, lines, text, and images. For example, you can add an image to a form or add static text to act as a heading for a form.
To add a decoration to a design element, click a decoration in the Palette, and then click in an empty space in the design editor to drop the decoration.
Figure 6. Palette
Layering
Layering gives you some flexibility to organize your design controls and decorations on a form. You can move design controls and decorations one layer forward or one layer back. For example, if you wanted to create a rectangle around a group of design controls to create a visual grouping, the rectangle would cover the group of controls if you placed it directly over the controls. If you move the rectangle back one layer, the rectangle will then appear behind the design controls so that the design controls have the main focus while the rectangle provides the visual grouping.
To layer a control, select a control in a form, right-click the control, and then choose Order - Send to Back or Order - Bring to Front.
Control attributes
Each control in a form, grid, and report has attributes that you can modify. Some common attributes include changing labels for a control, changing the size of a control, changing font, adding borders, creating hover text for a control, and more. There are also control specific attributes that you can set, such as making an edit box control in a form secure so that data entered into the field appears in the default password symbol of your operating system. You can also attach simple actions and events to occur in a design element or control. Each event may execute one or more simple actions in the order that you specify.
To access control attributes, select a control in the design editor, and then refer to the attributes that are available for that control in the Attributes editor.
Figure 7. Attributes editor - control attributes
Grids
Grids are used to collect data in data access viewer. Grids have a formal structure and are displayed as rows and columns. Like forms, you can add controls to a grid, but the set of control choices for grids differ from the control choices offered for forms. Each control is added to a grid as a column, and grid columns appear as columns in data access viewer. In data access viewer, each row in a grid becomes one record. Grids can be used as an alternative to forms for collecting data.
Grids are useful if you want to collect several records that include the same type of data. For example, if a user has a list of several employee names and addresses and needs to create records for all of them, that user can enter all of the data in a grid, which will easily create and display all of the records in one place.
To access the grids in a database application, under the section heading of the database application listed in the Database Applications navigator, double-click Grids. To create a grid, open Grids, and then click the New Grid button.
Figure 8. Grid
Reports
Reports are used to present data that has been collected in records. Reports have a formal structure like grids and are presented as rows and columns. Like forms and grids, you can add controls to a report, but the set of control choices for reports differ from the control choices offered for forms and grids. Each control is added to a report as a column, and report columns appear as columns in data access viewer. Reports are read-only in data access viewer.
Reports are useful if you want to view a specific set of collected data. For example, if you want to see which employees were hired before the year 2000, you can create a report that when run, displays only the names of employees who were hired before the year 2000.
To access the reports in a database application, under the section heading of the database application listed in the Database Applications navigator, double-click Reports. To create a report, open Reports, and then click the New Report button.
Figure 9. Reports
Grouping data by columns
When you create a report, you can group data by a column. Grouping data by a column helps you organize the data by a specific category when the report is viewed in data access viewer. For example, if there are records created that show property for sale in different towns, you can choose to group the town column in a report, so you can see all of the records that have property for sale by town.
To group a report column, select the column, click the Group tab in the Attributes editor, and then select Group column.
Summarizing data in columns
When you create a report, you can choose to calculate data in a column and display the summary at the bottom of the column when the report is viewed in data access viewer. For example, if you have a table that shows salary information for individuals in a department, you can display the total amount of money being given in salary in the department in a report.
To show a summary in a report column, select the column, click the Grand Summary tab in the attributes editor, and then select Show summary.
Database application and design element attributes
Like controls, the database application and design elements themselves have attributes that you can set. For example, in the database application’s attributes, you can choose the design element that you want to act as the default design element that opens first in data access viewer. In a report’s attributes, you can set alternating row colors.
To access database application attributes, click the section heading of the database application listed in the Database Applications navigator, and then refer to the attributes that are available in the Attributes editor.
Figure 10. Attributes editor - database application attributes
To access design element attributes, open a design element, click inside the design element in the design editor, and then refer to the attributes that are available for that design element in the Attributes editor.
Figure 11. Attributes editor - design element attributes
While designing a database application, you can preview your design elements to see how they look in data access viewer without having to leave data access designer. Previewing a design element opens data access viewer inside the design editor and offers the same actions that are available in data access viewer. If there is data in the database application, the data appears in the preview. You can also create and modify records when previewing a design element.
To preview a design element, open the design element, and then choose Design - Preview.
Figure 12. Design element preview
Running a database application
After you have designed a database application in data access designer, you can then run the database application in data access viewer. Data access viewer offers some functionality for a database application that is additional to the functionality that you design for a database application. This is not a complete list of the features and functionality available in data access viewer. For more documentation, refer to the "Data access viewer" book in the Workplace rich client Help system by choosing Help - Help Contents in the rich client.
Sorting data
To help organize data, you can sort records that share common values. Sorting is useful if there are a large number of records that you want to group and organize. You can sort alphabetically, numerically, or by date in either ascending order (A-Z; 1-9; 01-12) or descending order (Z-A; 9-1; 12-01).
To sort data, open a design element that was used to create records, and then click Sort in the bottom action bar.
Filtering data
Filtering data allows you to display only those records that share one or more common values, such as a particular customer or product. Filtering is useful when there are multiple records, but you want to display only those records that meet a certain criteria. Filtering is most effective when using grids because grids display multiple records at one time, but you can filter forms and reports as well.
To filter data, open a design element, and then click Filter in the bottom action bar.
Exporting database applications
Because database applications are local, you can export a database application so that you can take it to another machine or give it to another user. Exporting creates a copy of a database application. When you export a database application, you can choose to export just the design, or both the design and the data. A database application must be exported as a JAR file. After you export a database application, you (or the user you give it to) must then import it to use the database application. Exporting a database application is also a good way to create a backup copy of that database application.
To export a database application, in the Application catalog, select a database application, and then click the Export button.
Importing database applications
Importing a database application simply puts the JAR file that was created when a database application was exported onto the current machine. When you import a database application, you can choose to import just the design or both the design and the data.
To import a database application, in the Application catalog, select a database application, and then click the Import button.
Sharing a database application
Sharing a database application creates a copy of the database application directly on a shared drive on a server for other users to access. Sharing is another way to give users a copy of your database application. By sharing a database application, you and other users can work in the copy of the database application that is directly on a server. Users access the shared database application from the Application catalog. You must be online to share a database application.
To share a database application, in the Application catalog, right-click a database application, and then click Share.
Access control list
Database applications that are shared automatically contain an access control list that pertains to the entire database application, and only applies to that one database application. As soon as you share a database application, the access control list for the database application opens so that you can set access levels for different users. There are two access levels in a database application: Designer and User. If a user is not listed in the access control list, that user cannot see the shared database application in the Application catalog.
The User access level determines the following actions:
- Users can see the database application in the Application catalog, open the database application, and make the database application available offline (local).
- Users can delete the offline (local) version of the database application, but cannot delete the shared version on the server.
- Users cannot view or edit the database application design in data access designer, even if they have Designer access to other database applications.
- Users cannot export the database application, but can import one.
The Designer access level determines the following actions:
- Designers have all User access privileges.
- Designers can open and edit the database application in data access designer, assuming their user policy gives them the ability to create applications.
- Designers can refresh the shared version of the database application that is on the server after making design changes to the database application.
- Designers can delete the shared version of the database application.
Printing
You can print preview and print any form, grid, or report from data access viewer. To print preview a design element, open the design element, and then choose File - Print Preview. To print a design element, open the design element, and then choose File - Print.
Now that you have learned what the data access tool is, how to access it, and the types of features and functionality it offers to designers and users, you can explore the data access tool on your own and create sophisticated database applications. The IBM data access tool is a powerful tool for database application designers, yet easy to learn for novice users who are just learning how to create and design database applications.
Currently, the data that is created in a data access tool database application is stored locally in a Cloudscape database. Storage of data in an enterprise database system, such as DB2, will be supported in a future release.
- Learn how to create a database application in the developerWorks article, "Creating a database application with the IBM data access tool."
- Read the developerWorks article, "Integrating Lotus Notes and IBM Workplace Client Technology," to learn about the Notes Application plug-in for the Workplace rich client.
- Visit the developerWorks IBM Workplace resource center for more information about the IBM Workplace Client Technology and other Workplace products.
- For more information about the IBM Workplace Client Technology, rich edition, visit the product page.
- Get involved in the developerWorks community by participating in
developerWorks blogs.
-
Browse for books on these and other technical topics.
Comments (Undergoing maintenance)





