Chapter 8 StarOffice Base
This chapter provides a brief overview of the StarOffice 9 Base application. Base provides
a graphical front-end for accessing databases. You can create and edit databases
locally or on a server. You can use the dialogs of StarOffice 9 or enter
SQL statements to work with your databases. Use copy and paste or drag-and-drop
to exchange data with the other programs of StarOffice 9.
Accessing Databases
You can view, edit, add, and delete data that is stored in databases.
The types of databases that you can use range from simple local files up to
a server-based relational database, such as Oracle. You can use the built-in
HSQL or dBASE databases, for example, to manage your CD collection. Many ready-made
tables are provided. Use the graphical user interface of Base, or, as a database
expert, type in your SQL commands.
The following list shows some of the supported database types:
-
HSQL – the native database type for Base
-
dBASE – All .dbf files inside a folder are treated as
one dBASE database
-
MySQL and other server based databases – supported by
native database drivers, or accessed by JDBC or ODBC
-
Your system's address book (Windows address book, Thunderbird,
other) – read-only access
-
Spreadsheet files from Calc and Excel – can be used
as read-only database files
StarOffice Database File
The StarOffice database file format stores the methods and layouts
that you use to access a database. When you open a database file, you see
a window similar to the following illustration:

The StarOffice database file format stores information about
the layout or design of your tables, queries, forms, and reports. For database
files using the HSQL database format, the data records can also be embedded
in the database file. The main database objects are:
- Tables
-
Table fields define what makes up each data record.
- Queries
-
A query is a custom view of a table. You define a query when
you want to see only some fields of your table.
- Forms
-
A form is a data input and output mask that you can use to
manage your data more easy than in a table or query.
- Reports
-
A report defines the printed output of a table or a query.
Creating a StarOffice Database File
The Database Wizard helps you to add a new database file and to register
the database as a data source in theStarOffice software. The wizard
creates a file that contains information about the database, including the
queries, reports, and forms that are linked to the database.
To Add a New Database as a StarOffice Data
Source
-
Choose File->New->Database.
The Database Wizard
appears.
-
Follow the steps and choose your options.
-
(Optional) Create a new table.
-
On the last page of the Database Wizard, choose to start the Table
Wizard.
-
Type your data in the new table.
Working With Databases in StarOffice 9 Base
You can open a database file using the File->Open menu command.
To Create a New Database Table
A database table is a collection of data records that is organized into
rows and columns. A row in the table represents a data record. A column is
one field of the record.
Note –
Base needs a primary key in each table to enable editing the records.
A primary key contains a unique value for each record.
-
Choose File->Open to open the database file where you want
to add a new table.
-
In the StarOffice Base window, choose Tables.
-
In the Tasks pane, select Use Wizard to Create Table.
To Add Data to a Database Table
-
Choose File->Open to open the database file that contains
the table.
-
Click the Tables icon on the left pane.
-
Double-click the name of the table where you want to add data
records.
-
Type the data.
When the cursor leaves the current
data record, the changes are saved automatically.
To Create a Database Report Using the Wizard
A database report is a text document that displays data from a
database in a way that you specify. You can design the report to display the
most current data or the data at the time when you created the report.
-
Choose File->Open to open the database file for which you
want a report.
-
In the StarOffice Base window, click Reports.
-
Select Use Wizard to Create Report.
-
Follow the instructions.
You can create two types
of reports: a static snapshot of the data at the time the report was created,
or a document with live links to the current data.
To Create a Database Report in Design View
You can create your own database reports manually after you download
and install the Sun Report Builder extension. This extension is available
from http://extensions.services.openoffice.org/project/reportdesign.
-
Choose Tools->Extension Manager, then click the Get More Extensions
Here link.
Your web browser displays the extensions web site.
Find the Sun Report Builder.
-
Select the Get It! button to download and install the Sun Report
Builder extension.
-
Restart your StarOffice.
-
Choose File->Open to open the database file for which you
want a report.
-
In the StarOffice Base window, click Reports.
-
Select Create Report in Design View.
The Base Report
window appears. the Help Agent is displayed briefly in the lower right corner.
-
Click the Help Agent and follow the instructions from the application
help.
To Open a Database Report
-
In any StarOffice program, choose File->Open.
-
Locate the database file that contains the report, and click Open.
-
In the StarOffice Base window, click the Reports icon.
A list of the reports for the current database is displayed.
-
Double-click the report you want to see.