Databases - Page 3
July 29,2002
The Databases tab on the Application panel shows all the database connections
you have created for a particular site. You can easily view the names of your
database tables and columns too, as we can see here:
In order to create a database-driven web site we first need
a database. Feel free to review Chapter 6 if you need to before proceeding.
We will be using a sample database for our examples called webprodmx_data.mdb, which can be found in the code download for this book on http://www.glasshaus.com. This database has
three tables, which are as follows:
Table 1: categories
| category_id |
Autonumber
(primary key) |
| category |
Text |
Table 2: books
| book_id |
Autonumber
(primary key) |
| book_title |
Text |
| book_author_fname |
Text |
| book_author_lname |
Text |
| book_price |
Currency |
| book_isbn |
Text |
| page_count |
Number |
| book_image_path |
Text |
| category_id |
Number
(foreign key) |
The book_image_path column will contain the path to the book image. To save time for the
moment, we will use a default image for each record. Let's put this image
in the directory images/book_images/book_image.gif
– create this path in the root of your site
now.
You may create your own image, save it as book_image.gif and put it in the book_images folder, or download the book image provided in the code download for
this book, on glasshaus.com.
Table 3: users
| user_id |
Autonumber
(primary key) |
| username |
Text |
| user_pwd |
Text |
| first_name |
Text |
| last_name |
Text |
| email |
Text |
| access_group |
Text |
| dtstamp |
Date/Time |
Defining Your Site - Page 2
Dynamic Dreamweaver MX
Connections - Page 4
|