10. Forms

A good DBMS will provide an user-friendly way of interacting with the database. Most users do not need to know anything about the database - they simply want to use it in a straightforward manner without technical knowledge.

This is the role of Forms.

Command Keys

A form may have command keys that have been programmed by the designer to carry out specific tasks.

For example a form could contain a 'Stock Report' button. When pressed, it sets off a complicated SQL query to generate data for the report, once the data is in place behind the scenes, it triggers the relevant commands to generate the report itself. All the user needs is to press the button and save or print the results.

Data Entry & validation

Forms are also used to enter data. The designer provides 'input fields' within the form so data can be entered by the user. Once an 'update' button or command is triggered, the code behind the form should validate the input data. Should there be a problem, then a warning message is presented to the user.

Data Selection methods

One popular way of ensuring correct data selection or entry is to use a 'drop down' box. Also called a 'combo box'. The user clicks a small arrow by the box and a list of items appear. The user can then select the required item.

Dates are notoriously difficult in terms of correct format because there are so many ways of entering time and dates - an elegant solution to this problem is to provide a calendar control that appears on the form so the user can simply click to select the date / time. The calendar control then converts selection into the correct format behind the scenes.

Navigation buttons

Provide buttons to allow users to move easily from record to record

Attractive layout

A well designed interface should make good use of colours, fonts and style. Titles and instructions should be included.

Query-By-Example

Many staff may want to run ad-hoc queries in the database. In this case a pre-defined form can't be used because that particular query is not a standard one. The direct way of producing a query is to write SQL statements. But most people are not expert in SQL.

The way around this is for the DMBS to provide a form that can be filled in by the user to act as an example of the query they want to run.

 

Once set up, the appropriate 'Run' command is clicked. The DBMS then converts the set-up into the correct SQL commands.

This is called 'query-by-example'.

Summary

The image below shows some of the commonest element of input forms.

Typical Input Form

 

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Forms and QBE

 

 

Copyright © www.teach-ict.com