StarOffice 9 Getting Started Guide
この本のみを検索
PDF 文書ファイルをダウンロードする (2072 KB)

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:

Database file window

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

  1. Choose File->New->Database.

    The Database Wizard appears.

  2. Follow the steps and choose your options.

  3. (Optional) Create a new table.

    1. On the last page of the Database Wizard, choose to start the Table Wizard.

    2. 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.


  1. Choose File->Open to open the database file where you want to add a new table.

  2. In the StarOffice Base window, choose Tables.

  3. In the Tasks pane, select Use Wizard to Create Table.

手順To Add Data to a Database Table

  1. Choose File->Open to open the database file that contains the table.

  2. Click the Tables icon on the left pane.

  3. Double-click the name of the table where you want to add data records.

  4. 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.

  1. Choose File->Open to open the database file for which you want a report.

  2. In the StarOffice Base window, click Reports.

  3. Select Use Wizard to Create Report.

  4. 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.

  1. 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.

  2. Select the Get It! button to download and install the Sun Report Builder extension.

  3. Restart your StarOffice.

  4. Choose File->Open to open the database file for which you want a report.

  5. In the StarOffice Base window, click Reports.

  6. Select Create Report in Design View.

    The Base Report window appears. the Help Agent is displayed briefly in the lower right corner.

  7. Click the Help Agent and follow the instructions from the application help.

手順To Open a Database Report

  1. In any StarOffice program, choose File->Open.

  2. Locate the database file that contains the report, and click Open.

  3. In the StarOffice Base window, click the Reports icon.

    A list of the reports for the current database is displayed.

  4. Double-click the report you want to see.