Slide 10.1: Programming Exercise IV: A simple online bookstore
Slide 10.3: A database processing example (cont.)
Home

A Database Processing Example


Exercises III and IV include database processing, of which an example is given here. The example uses an authors table and sample values of the relational table are given below. The authorID is the primary key and its type is AutoNumber, whose value is not needed when insertion.

authors
authorID authorName email
1 Poke Mon pokemon@cs.und.edu
2 Digi Mon digimon@aero.und.edu
3 Spider Man spiderman@gmail.com
4 Iron Man ironman@hotmail.com
5 Super Man superman@gamil.com
6 Super Mario supermario@cs.und.edu
7 Poke Mon poke@my.und.edu
... ... ...


The following two user interfaces are used in this example:
Default.aspx (home page)
It includes the following three functions:

  • Insert: Insert an author by supplying a name and an email address. The authorID value is not needed because of its AutoNumber type.

  • Delete: Delete an author by supplying a name.

  • Search: Search for authors by matching the name.

NextPage.aspx (the other page)
It includes the following two functions:

  • Home: Return to the home page, Default.aspx.

  • List: List the author’s detailed information by using a dynamic dropdown list populated by the authors table.
Insert