19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Creating <strong>and</strong> Designing Databases 343<br />

FIGURE 11-2 <strong>Visual</strong> Data Manager’s File Menu<br />

Let’s focus on creating a new database. After you select New, you are presented with a<br />

drop-down menu used to choose the type of database as shown in Figure 11-2. Choose<br />

Microsoft Access <strong>and</strong> then specify a version. (Version 7.0 is the latest version of Access, the<br />

one that comes with the Professional Edition of Office 97.) Then a st<strong>and</strong>ard file-naming dialog<br />

box titled “Select Microsoft Access Database to Create” appears. See Figure 11-3.<br />

FIGURE 11-3 Dialog Box Used to Name the Database<br />

After you name the database, say as MEGACITY.MDB, <strong>and</strong> click Save, the Database<br />

window <strong>and</strong> SQL Statement box appear. We will work solely with the Database window.<br />

FIGURE 11-4 Database Window. (Appears After the Database is Named. Initially the Window<br />

Will Contain Only the Properties Line. Additional Lines Will Appear as<br />

Tables are Created. )<br />

Suppose you want to create a database with two tables. Starting from the Database window,<br />

the basic steps are as follows:<br />

1. Create the database <strong>and</strong> the two tables.<br />

(a) Click on the right mouse button within the Database window. Click on New<br />

Table <strong>and</strong> use the Table Structure window (Figure 11-5) to name the first<br />

table <strong>and</strong> to specify the fields <strong>and</strong> their data types. The steps listed after<br />

Figure 11-5 show how to carry out these tasks.<br />

(b) Repeat Step 1 for the second table.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!