Clipcode Usability Guide For Database Applications
Clipcode Usability Guide For Database Applications
Chapter 1
Usability for Database Applications
Objectives
The objectives of this chapter are to examine:
• Special needs of users when handling data via a GUI
• Requirements for database front-ends
• Dialog box layout and use of certain controls
• Keyboard usage for heavy data entry scenarios
• Special issues regarding handling large data sets
• Different ways of naming database records
• The use of domains and string-to-id mappings
Introduction
In this chapter, we will look at the usability requirements for graphical user
interfaces for database applications. We will observe from the user’s
perspective.
The amount of attention that has been applied to usability in word processing or
spreadsheet applications unfortunately has not been applied to usability in
database applications. Certain database-specific issues need to be carefully
considered at the design stage. These can substantially increase the ease of use
of database applications when handled correctly.
Usability should not be considered in isolation - issues such as performance,
transactions, network connections and middleware (i.e. non-GUI) have to be
considered together and a coherent solution for all their requirements developed.
Types of Users
During the requirements analysis stage of any database project (indeed, any
project), one critical issue to be specified is the expected type of user and usage.
Questions that should be asked include:
• How much training will they receive?
• Are they computer-literate or not?
User Interaction Design
• How many hours per day/week/month are they expected to use the
system?
• In addition to the core users, is it expected that others might use it on a
temporary, infrequent basis? The answer is almost invariable yes, even if
not originally planned!
• What are they going to use the system for - data entry, information
tracking, supervision, reporting or administration? Are there any special
requirements attached to these?
Let’s examine two examples. Firstly, consider data-entry people who are
constantly using the same application (e.g. entering magazine subscription
information) and need to key in thousands of text entries each day. The
“typeability” of the application is paramount - the “graphical” in GUI is not that
important as they will seldom use the mouse. These users will enter the data
using the keyboard only.
Secondly, consider supervisors in a financial institution, who must, among
many other tasks, carry our supervisory tasks in a database application (e.g.
approve overdrawn account for special reasons). The graphical nature and ease
of use of the database front-end is extremely important. These users will tend to
use the mouse and might need much more assistance and guidance from the
application, in the form of wizards, help text, tutorials, and examples.
Performance
There is a substantial difference in an application’s performance when it is
connected to a small database compared to when it is connected to a large one.
During the design stages of an application, it is important that some estimate of
the data volume is produced (possibly integrated into the E-R/CASE tools being
used).
For example, a listbox in a dialog filled with seven items might function
satisfactory. However, when it is filled with 2,000 items it will be very slow and
be practically useless, as it is not possible to effectively scroll through that many
items.
When retrieving large volumes of data from the database for display it is
important that the user has the option of, or is forced to, filter it in some way.
For example, imagine a user asks an application to display the contents of a
table containing 10,000 entries. The application could first display a filter dialog
automatically requesting the user to select some filtering criteria and only fill
the list once some filter has been entered. If no filtering criteria is entered then
maybe the application should only fill the first 200 entries - so the user get a feel
for the data in the database and might help her make a subsequent filter.
It is important to test an application with the maximum data volume - this will
show up any weaknesses and allow them to be fixed before delivery to the
customer. Indeed, if the max database is available early on in the design and
development, different options may be considered while it is still simple to
change.
2
User Interaction Design
3
User Interaction Design
It is vital that the context of the error is communicated to the user. For text input
fields the context is the actual text box containing the error? The sooner the user
is alerted to the error the easier it is to decide on the context. You must ask
yourself when does the application know an error exists – it could be that the
user has partially entered some value and has not completed the task.
Another issue to be considered is the saving of invalid/in-complete data in the
database, which may be corrected/completed later. For example, most bank
branches are identified on a check using a bank sorting code (identification
number). There is usually a simple numerical algorithm (e.g. based on a
modulus) used to ensure these are correct. One may not run the algorithm until
all characters have been entered. Assume the sort code is six characters long.
Assume the user entered four characters and clicks on “OK” to exit the dialog
box. What should we do? One option would be to display an error message box,
explaining the problem to the user and once the message box is dismissed, the
user must correct the problem. However users do not like being “trapped” in a
dialog – the developer must offer a way out. Therefore, it might be better to
display the error message box – and give the user the option of knowingly
saving in-complete information to the database and exiting the dialog. One
assumes that the user would later complete the information, when available.
Pick-Lists
Pick-lists are when we use a combo-box or list-box control to enable the user to
select a textual value that they understand and which is associated with a
numerical value that the database understands.
For example, imagine a database with an ORDER table and a CUSTOMER
table. The CUSTOMER table has a CustomerID field and a CustomerName
field. The ORDER table has a foreign key CustomerID that maps into the
CUSTOMER table. When a user is entering a new order on-screen in an Order
dialog, they could have shown to them the list of customer names, and select
one, and behind the scenes the CustomerID is actually written to the database.
With the exception of data-entry staff, most people find it much easier to select
a name rather than entering a code. The best of both worlds could be combining
them. One could display a code and a user-friendly name (“13 – Order
Processed”) and the user may enter the code (13) or select the item from the list.
When doing a SELECT on the database one can specify a sorting order. When
adding items to a list control in a dialog one can specify that it sorts the items
alphabetically. It is usually must better to get the database engine to perform
the sorting because it will be quicker. A common method when associating an
integer ID with a string name is to display the name in the list control and set its
item data to match the string item. However, if the list control sorts the entries
this will not work. In this situation, you must get the database to do the sorting.
It is strongly not recommended to display more than one or two hundred items
in a list control. The user will have great difficulty scrolling through that many
entries.
4
User Interaction Design
One interesting idea from Microsoft Access is the use of auto-expanding list-
boxes/combo-boxes. As the user enters each character in the list is filled with
matching entries. The user will never see the entire list. As the user types more
and more, the selection narrows, until one is finally chosen. This is good for
performance reasons.
Certain fields may only hold one of a pre-defined range of values. A common
example is in an order processing system, the orders table might have a state
field, which could have one of the values from the domain list {New, Processed,
Shipped, Paid}. Domain lists are fixed and will not change (except from one
release of the software to the next). Hence, they are ideal for pick-list filling.
For performance reasons one could have it as a local database - but maybe it is
not necessary - another option is to put it in with in the resources section of the
application’s executable, but then it is not available to reports etc. running in
different executables.
Could use the server database and a local database for pick-list info etc. (Using
Access, can have results of Server stored procedures output to a local
database!). You can fill pick-lists quickly and repeatedly from the local
database.
It is not just pick lists we’re interested in - it is also list of entries in database
(e.g. tracking messages). Let user enter filters and then execute retrieval
function.
Layout
Should the length of text boxes reflect the size of the fields (which may be
different, and hence un-aesthetic) or should they be aligned (thus conveying less
information). I would recommend the first option, because conveying
information is more important.
You have four GUI/database options when letting the user enter a multiple line
text string, such as an address. In the user interface, you could let the user enter
it in a single large text box, or you could use multiple text boxes. In the
database, you could store the data either as a single field or as multiple fields.
If they are separate in the database then a reporting tool could let the user
organize them in a variety of ways in the report, whereas if they are a
contiguous block of text (with line-feeds) this is not possible.
5
User Interaction Design
Address: Address:
Fonts
Fonts serve two basic purposes in a GUI - to communicate from the user to the
application, and from the application to the user - hence at least two fonts are
needed, a system font and a user font. There should be a clear difference
between the two fonts. The fonts should be consistent throughout an application.
6
User Interaction Design
Employee ID:
Employee Name:
Department:
OK Cancel Report
Handling Complexity
The user interface in a database application may be the front-end to a very
complex arrangement of relational database tables. The design goal is to hide
complexity where possible but shows it where necessary. You should not limit
functionality at the expense of “appearing” easy. This can end up making
something much, much more complex as the user try to find away around the
limitations of the user interface to complete some task.
7
User Interaction Design
Navigation
An essential point is handling complexity is to simplify navigation. Tasks
should flow naturally from one to the other. It should be simple to navigate a
hierarchy of data tables. The use may navigate using the keyboard, Windows,
mouse or a component. The next logical step should be obvious (e.g. could dis-
able buttons depending on data which has been entered).
If the user’s hands are on the keyboard and task after next is also keyboard
based, then it can be useful if next task is activated from the keyboard.
Usability Issues
Here follows a collection of ideas for handling database user interfaces.
Depending on the application they might or might not be applicable.
8
User Interaction Design
user, and possible edit two tables in one dialog box, or a single table may be
spread across multiple dialogs (or multiple property pages).
Shortnames
Most tables use an integer as a primary key. Typically, these integers mean
nothing to the application user. If they have to select it from a list or enter it via
a keyboard, there is no connection in the user’s mind between the record that is
being selected and how it is selected.
One solution to this problem is to use shortnames. These are additional fields
within a table that contain a short character string (say 10 CHAR) and
shortnames uniquely identify the record also.
Shortnames are aimed at end-users - and could be displayed in list-boxes, etc.
and if used could avoid the need for applications to display primary keys at all.
Add-On Editors
Most fields in database tables are edited on screen using simple user interface
controls such as an edit-box, list-box or radio buttons. For more complex fields,
such as a date, the application developer has a number of options. The easiest is
to use a simple edit-box and try and get to user to use a specific format (mm-yy-
dd, or dd-mm-yy or dd-mm-yyyy, or dd-mm-yy:hh:mm etc.). Another option is
to add a simple calendar to the dialog. The problem with this approach is that it
clutters a dialog with a numbers of controls (or for each day of the month) that
have nothing to do with the table itself.
The third and best option is to use an add-on editor, which is a name associated
with a secondary dialog (displayed after a user might click an edit button) and
the add-on editor provides the necessary user interface to enter in a date and
possibly time.
This concept could be used wherever users need to select complex data - such as
a shortname from a particular table; or a registered user on a particular server, or
a region of the world (based on a map).
9
User Interaction Design
Information Inheritance
Information may be defined at multiple levels in a database. The user interface
for handling this scenario must display to the user whether the information is
defined at a certain level, or “inherited” from a different level. In addition, the
user interface for editing this information should be shared among all levels.
Regular Expressions
Using regular expressions to find entry quickly is strongly recommended. This
can very easily be implemented by letting the user pass in wild-characters in
searching dialogs. The application must pass these strings to the database using
the SQL “LIKE” clause.
1
The easiest way of doing this is to dis-connect the mouse from the developers’ machines for a few days and
force them to use the keyboard.
10
User Interaction Design
Error Handling
An important issue in usability of database applications is error handling – are
errors avoided where possible, is an alternative route to a solution quietly
attempted and how elegantly are errors managed when they do occur.
Issues to be considered include:
11
User Interaction Design
development when a developer starts using a new state without updating the
domains in the database first. If one does change the list of valid domains, one
needs to decide what to do with existing rows that might use a domain value that
was deleted or changed.
• Database Connections Errors
Sometimes the user will not be able to connect to the database. Other times during
processing the database link will fail. Need to robustly handle these situations. For
testing purposes need to stop database and start application, and alternatively have
database functioning correctly and start app, and later stop the database (or simply
disconnect from network) and ensure that application detects the problem - and
rolls back etc.).
• Silent Error Handling
Would ensure that error reporting would be delayed temporarily and that a few retries
would be made. Could be integrated into the database exception handler. (E.g.
display “Please wait while accessing database” message if retry needed, and only
if this fails then report error).
• Error Tracing
Need to find the cause of the problem at a programming level. The application could
write detailed information to a trace file. The user could turn on ODBC tracing. It
is sometimes beneficial to encourage the user to send this information to help-desk
staff (via mail, print to printer, print to fax machine, save to disk).
12
User Interaction Design
Middleware components
these are usually the “meat” of a platform, and quite often are what really
needs to speed up. They have no user interface and usually should deal with
numbers solely. No use for shortnames. The use of numeric primary keys will
speed these up.
DB administrator
Database administrators need to carry out backups, archival, emergency
operations. They usually need not know about the contents of the database
fields.
File System
Is the identifier going to be used for other purposes as well - for example, if
files are to be associated with the entry (e.g. EDI files) these could be stored in
a directory of the same name. (Note that an operating system numbers and
characters are EXACTLY the same - no speed difference!). If middleware has
the primary key, one might need an additional database lookup to get the
shortname, to construct the path). If an ordinary user were to look at twenty
10-digit numbers that might be used as file names, the user has no idea which
number is associated with which entry. If shortnames are used, then the user
might be able to guess.
Mail Messages
Quite often mail messages are generated by/from the database and sent
automatically to users and administrators or increasingly to remote
(asynchronous) applications. This needs a user-friendly method of identifying
records.
Reports
Often a report generator needs to create reports. These are normally to be read
by people, so user-friendly names are required.
Types of Database access required by the different entities:
None Read Update Insert Delete
GUI Operator • • • •
External People •
Middleware • • • •
components
DB administrator • •
File System •
Mail Messages •
Reports •
13
User Interaction Design
• Name may be mis-spelt, for example when inquiring about a purchase order in a
different country - much better have an invoice/customer number. Can be
information rich - e.g. Our Ref = FR143 (143rd. purchase order from France) or
Your Ref = BC-970343 (43rd purchase order from Bill Clinton, in March 1997).
14
User Interaction Design
15
User Interaction Design
Domains
The permissible value that a column in a database table may hold is called its
domain.
Types of Domains
For many columns of type CHAR or VARCHAR such as name or address there
is no limited to the variety of values. Whatever the user types in is put in the
column. Binary data (e.g. bitmap) certainly have no limited domain. Some
numeric values (price, quantity and distance) also have no fixed domain (no
fixed maximum).
Another type of domain (not really a domain at all) is when a column holds a
foreign key into another table. This are fixed to the range of values in this other
column in the other table.
Other columns do have a fixed minimum and maximum and the representation
in the user interface, processing code and database is naturally the same. Age
could be between 0 and 130 (is this the real max?), order date would be between
the time customer account was set up and now, gender could be ‘M’ or ‘F’,
percentage could be between 0 and 100. All these domains have a fixed
minimum and maximum, and your software, during validation of inputs, can
check that the values entered by users do fall within the required domain. All
parts of your code can deal with this information in the same way.
Finally there is a type of domain has a fixed minimum and maximum, but the
representation in the user interface, middleware objects and database itself are
not naturally the same. They can be integer or char. It is this type of domain that
requires special processing in your applications. We will see how in the rest of
this chapter.
16
User Interaction Design
LangID char[3] The identifier of the language used - taken from [Intl]
section of win.ini (sLanguage)
StrValue Var Char The text string displayed on screen, in reports, mail
messages etc.
BinValue Var Binary object, such as (small) bitmap/ WMF/ OLE object,
17
User Interaction Design
• Items can be dropped, thus affecting the list index of all other items
If the items are sorted alphabetically, then two users using different localized
versions will have the list order different - using domains they will both be able
to operate correctly simultaneously!
Handling complexity
Certain applications perform complex tasks. Do the user interfaces for such
application have to be complex? Sometimes yes, and sometimes no. It is the role
of the UI designer to make tasks seem as simple and as intuitive as possible, but
in certain cases (some of) the true complexity must be evident.
By trying to simplify complex tasks for total beginners, UI designers can make
an application completely un-usable for experienced people. This is a significant
reason why different applications exist from the same software vendor covering
the same area – to cater for different knowledge-levels of its users. For example,
software for weather forecasting aimed at users with degrees in meteorology
would be quite different from that aimed at enthusiasts.
18
User Interaction Design
When one talks about user interfaces for server applications it is in the sense of
tools to help administrators. Server applications tend to be big, complex, and
mission critical systems. It is a very serious problem within most organizations
if server applications malfunction for any length of time. It is the role of
administrators to keeping server them running correctly. These have the job of
controlling the server application - starting / stopping it, performing
customization, ensuring ongoing configuration, monitoring its behavior and
tracking information as it flows through.
The administrator could be using the same machine that is running the server
application, or the administrator could be using a different machine distributed
somewhere on the Internet, or the administrator might not be a person at all – it
could be another software application, such as a network management system,
which wishes to manage many server applications, the network and the
hardware in use.
On Windows, the Windows Management Instrumentation (WMI) APIs and run-
time are provided to expose management information using COM.
Administration front-ends, be they based on web interfaces or the Microsoft
Management Console, can communicate with the WMI COM Objects to get and
set management data.
The administrator will wish to start and stop the server application. Server
applications are often implemented as Windows Services. Unlike a desktop
application, these cannot be started simply by selecting an icon on the desktop.
A service's running state can be changed using the OS-supplied Service Control
Manager’s MMC Snap-In (which can be accessed by selecting Manage from
the context menu for the My Computer icon on the desktop in Windows 2000)
or via the administrator’s front-end for the particular server application, if
available.
Usually starting and stopping a server is not instantaneous – during the interval
between the command being issued from the administrator's front-end and the
server completing its response to the command, the administrator's front-end
should display suitable information to keep the administrator up to date with
progress. Potential problem scenarios need to be expected and handled – for
example, imagine multiple administrators are trying to change the state of the
server application – some trying to stop it and some trying to start it. One
solution here would be to "lock" the start/stop fucntionality, so that only one
administrator at a time can be starting/stopping the same server application.
Or imagine an administrator trying to start a server application when the
machine on which it is running is shutting down. (What happens if you start a
desktop application and then quickly shut-down the machine?). The
administrator should be informed and the machine should shut down.
Often server applications are dependent on crucial middleware components,
such as a database engine. When these are not running, the server application
can refuse to start, or start in a limited functionality mode, or itself start the
middleware components. Which ever of these is decided upon, the user interface
for the server application should keep the administrator informed.
19
User Interaction Design
20
User Interaction Design
21
User Interaction Design
22