The Beginning: Creating a New Database


Because I mentioned mailing lists, let's use that as the basis for our exploration of OpenOffice.org Base. When we are through creating the database, I'll show you how to use it in another OpenOffice.org program, the Writer word processor. We'll take the information from our mailing list and create mailing labels.

To start OpenOffice.org Base, click Applications in the top panel and select OpenOffice.org Base from the Office submenu (command name: oobase).

When you start OpenOffice.org Base, you are presented with the Database Wizard (see Figure 16-1). This is a simple wizard with only two screens, the first of which is to select or identify a database. Your options are to Create a New Database, Open an Existing Database File, or Connect to an Existing Database. Let's just go ahead and create a new database by making sure that radio button is selected. Click Next.

Figure 16-1. The OpenOffice.org Base Database Wizard.


The second step is where you must decide how to proceed after saving your database. There are only a few options on the second and final screen, but they are important and worth explaining (see Figure 16-2).

Figure 16-2. The final step in the wizard registers the database so it is easily accessible by other OpenOffice.org applications.


The first option has to do with registering a database. To quickly answer this question, ask yourself whether you want to use this database from inside other OpenOffice.org applications. If the answer is yes, click the radio button Yes, Register the Database for Me. Nothing stops you from creating a nonregistered database and then registering it later, but in this example at least, we want to use the database in OpenOffice.org Writer.

The next section gives you two options. The first, Open the Database for Editing, should be checked (you can create a database and get back to it later). You could, at this point, jump right in and Create Tables Using the Table Wizard but leave that unchecked for now.

When the Save As dialog makes its appearance, select a name and location for the database (see Figure 16-3). For this example, I'm going to create a simple mailing list database, which I'm going to call (wait for it) Mailing List.

Figure 16-3. You created a database and now you need a name for it.


That's really all you need to do to create the database. Click Save and OpenOffice.org Base's main window appears (see Figure 16-4). By default, the Forms view is selected but that's only so useful if you haven't set up your tables yet. Nevertheless, let's take a look at the interface.

Figure 16-4. The OpenOffice.org Base window immediately upon creating a new database.


Along the top, directly below the menu bar is the Standard bar, looking less standard in OpenOffice.org Base than in any of the other components you have worked with. Running down the left side is an icon bar providing quick access to needed database functions, including Tables, Queries, Forms, and Reports. The main area to the right is divided horizontally into main areas. In the top part, we have Tasks. These tasks are all in some way related to the four database functions in the left sidebar. The bottom part of the window is for Forms.

Tip

Pause your mouse cursor over any of the tasks and a description appears to the right of it.


Before we get too deep into all of this, we need to prepare the database to accept data. We do that by creating tables. Simply stated, tables define what our data looks like. You can even define multiple tables that further define bits of data in a master table. For instance, you can have a table that basically is an address list with first and last names, addresses, and so on. A second table might tie in to the person's name, but the information may have to do with the number of hours he worked. The person's name, in this case, might be the key you use to access both tables. A third table, using the same key, might be a list of movie rentals in the last year.

Let's go ahead and create a table.




Moving to Ubuntu Linux
Moving to Ubuntu Linux
ISBN: 032142722X
EAN: 2147483647
Year: 2004
Pages: 201

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net