To clarify the discussion of page types and their capabilities, we
develop the pages of a web-based address book as a sample application. The
ER diagram for this address book is shown in the following figure.
ER diagram for the address book application
In this address book, information on name, last name, phone number
and address are stored for every contact. Also it is possible to assign a
number of email addresses and the associated comments to every contact.
The following SQL statements will create the necessary tables in a PostgreSQL
database. The two serial fields have been added to the required attributes for
providing uniqueness among the rows.
CREATE TABLE "contact" (
"id" SERIAL,
"name" varchar (20) NOT NULL,
"lastname" varchar (30) NOT NULL,
"phone" varchar (15) NOT NULL,
"address" text,
PRIMARY KEY ("id"));
CREATE TABLE "email" (
"id" SERIAL,
"email" varchar (50) NOT NULL,
"comment" varchar (60),
"contactid" integer REFERENCES "contact"("id") NOT NULL ,
PRIMARY KEY ("id"));
The application that we are going to develop should allow its users
to browse the address book, insert new contacts and email addresses, modify the
information on contacts, search for contacts based on different attributes and
finally it should allow for removal of unwanted contacts or email addresses.
As the designer, we decide to develop the following pages. For every page,
the appropriate page type is specified within the parentheses.
-
Browse the address book, contactlist.xml (view)
-
Display contact information together with the email addresses,
contactdetail.xml (view)
-
Insert new contact together with the email addresses,
contactinsert.xml (insert)
-
Append new email addresses to contact information, emailadd.xml
(insert)
-
Modify contact information, contactedit.xml (edit)
-
Modify email address, emailedit.xml (edit)
-
Search address book, contactsearch.xml (search)
-
Remove contact information together with the email addresses,
contactdelete.xml (delete)
-
Remove an email address, emaildelete.xml (delete)
The following figure outlines the relationship between these pages,
aka the navigation structure of the applicaton:
|