Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

OpenOffice Writer 3.x Guide
Previous Page Home Next Page

Creating a database

Chapter 8 (Getting Started with Base) in the Getting Started guide covers in more detail how to create a database. We will give a short guide here to creating a very simple database with OOo Base.

  1. Select File > New > Database to start the Database Wizard.
  2. Database Wizard.
  3. Select Create a new database and click Next.
  4. On the next page, select Yes, register the database for me and Open the database for editing. Registering the database just means that it can be accessed from other OOo components such as Writer and Calc. You need to do this if you want to link your forms into it.
  5. Click Finish and save your new database, giving it a name. Unlike creating other documents in OOo, databases must be saved when you first create them.

After saving the database, you should see the main Base window, which contains three panels. The left-hand panel is Database, with icons for Tables, Queries, Forms and Reports.

Main Base window.

The next step is to create a table. Again, this is covered in more detail in Chapter 8 (Getting Started with Base) in the Getting Started guide. Here we are going to create a small table as an example.

  1. Choose Tables in the left-hand column, then choose Create Table in Design View under Tasks.
  2. Use the Table Design window to tell Base which fields to create. We will have just three fields: Name, Address, and Telephone.
  3. On the first line, enter under Field Name ID and set the Field Type to Integer [INTEGER]. In the gray box at the left of the line, right-click and select Primary Key, bringing up a key icon in the box. In the Field Properties at the bottom of the window is an Auto Value option; change this to Yes.
  4. Image:Tip.png Setting up the Primary Key field with Auto Value set to Yes is an important step. If this is not done, the form you create later will be much trickier to use and may generate errors for the user. Make sure you get this step right!
  5. On three lines, enter under Field Name Name, Address and Telephone. Accept the default Field Type of Text [VARCHAR] and leave Description blank.
  6. Save the table (File > Save). You will be prompted to name it (the name can be anything you like).
  7. Finally, save the whole database from the main Base window (File > Save).
Database table design.

OpenOffice Writer 3.x Guide
Previous Page Home Next Page

 
 
  Published under the terms of the Creative Commons License Design by Interspire