3.6 Viewing the data
Reverting to the relational database we constructed in Section 3.3, you might wonder what, from the user's point of view, has been gained by creating separate tables for the students and courses. With Table 1 you could see at a glance who was studying what. In the relational database it was hard to see the same information. However, with databases (relational and flat) the user does not normally view tables directly. Generally data is viewed in a 'form', which is a specially designed interface between the user and the database. Figure 1 is an example.
The rectangular boxes in Figure 1 show the field values of a particular record or set of records. The user can scroll or jump forwards and backwards though the records, or search on any field for a particular piece of data.
Not all the fields of a database need be shown in the form; and some of the displayed data might be extracted from the database through the use of a query language, such as SQL, though generally the user is insulated from the complexities of the query language. The fields in Figure 1 are labelled for ease of identification, for example 'Course centre postcode', 'Start date', and so on. These labels are design features of the form; they need not be the same as the entity names or attribute names. The arrangement of the fields in the form can easily be redesigned for ease of use without affecting the underlying data in the tables. In fact, there are few limits to the way data can be viewed in a form view.
Another way to view data is for it to be 'rendered' for viewing on a web browser. This is a bit like a form view, except that the form is created by HTML code. For example, when you look at your Open University personal web page, you are viewing data that is taken from large relational databases, but rendered for viewing on a web browser. The same goes for some of the interactive facilities you would have seen on some of the government websites.