Setting up a Database

509 Words2 Pages

Setting up a Database

[IMAGE]To start creating the DVDVG Database, open the application

Microsoft Access 2003. Once the program has loaded create a new

database by clicking on the “Create new file…’ link, on the “Getting

Started” Panel.

Alternatively, if you cannot see the Getting Started Panel, you can

go to File> New…

Then Select “Blank Database” from the panel.

Microsoft Access will then open a file dialog, in which you should

select a location on your local hard disk to store the database.

Once you select a valid location, Access will automatically create the

database for you, and then it will open up the database main window as

shown in Figure 1.2.

[IMAGE]

Creating the Tables

===================

Next will we create four tables to store information about the

customers, products and rentals. The three tables will be called:

Ø tblCustDetails: Information about the customers

Ø tblDVDDetails: Information on the products which are DVDs

Ø tblVGDetails: Information on the products which are Video Games

Ø tblRentals: Information on the products which have been rented out

to customers

Notice that all the tables have been prefixed with “tbl”. This is so

that when we refer to “tblCustDetails” for example, we know that it is

a table, as opposed to just “CustDetails” which could be a form, query

or report. There are also no spaces in table names, or field names,

this is to save space.

Creating tblCustDetails

-----------------------

1.) To start creating the tables select the Create table in Design

View option ([IMAGE]) from the tables tab in the database main window

(Figure 1.2).

2.) Access will now load up a new window in which you will input the

fields and fields’ type of the table.

[IMAGE]3.) In the Field Name Column enter in the name of each field as

shown below, for each field select the related field type (Figure

2.1.1):

Once you have done this, set the field CustomerID as the primary key.

Open Document