OpenOffice.org/Base: Difference between revisions

From Wikibooks, open books for an open world
Jump to navigation Jump to search
[unreviewed revision][unreviewed revision]
Content deleted Content added
Line 39: Line 39:
*[http://office.microsoft.com/en-us/access/CH011507411033.aspx Database objects - Access - Microsoft Office Online]
*[http://office.microsoft.com/en-us/access/CH011507411033.aspx Database objects - Access - Microsoft Office Online]
*[http://office.microsoft.com/en-us/access/HA011201381033.aspx Sample Access databases that you can download and adapt - Access - Microsoft Office Online]
*[http://office.microsoft.com/en-us/access/HA011201381033.aspx Sample Access databases that you can download and adapt - Access - Microsoft Office Online]
*[http://www.ehow.com/articles_2207-database-software.html Database Software - How To Information | eHow.com]
{{chapter stub}}
{{chapter stub}}

Revision as of 10:17, 22 April 2009

OpenOffice.org Base, is a relational database management system, a competitor to Microsoft Access and even suitable for beginners to databases. Much documentation and books for Microsoft Access will apply similarly (but not necessarily identically) for OpenOffice.org Base. It is a member of the OpenOffice.org suite of applications. OpenOffice.org users can choose to connect to external full-featured SQL database such as MySQL, PostgreSQL and even Oracle through ODBC or JDBC drivers. OpenOffice.org Base can hence act as a GUI frontend for SQL views, table design and query. In addition, OpenOffice.org has its own Form wizard to create dialog windows for form filling and updates.

In some cases Base may not seem to be included in some pre-installed packages (such as on some Linux distros) but it is free software so you should be able to get it relatively easily. You will also need Java installed (and not disabled in OpenOffice.org) in order for Base to run.

Data

A database is a structured collection of records or data that is stored in a computer system. The structure is achieved by organizing the data according to a database model. The model in most common use today is the relational model.

A database management system (DBMS) is computer software that manages databases. DBMSes may use any of a variety of database models, such as the network model or relational model. In large systems, a DBMS allows users and other software to store and retrieve data in a structured way.

Relations

The difference between databases and spreadsheets is that while spreadsheets can contain records (often a row in a spreadsheet) and data fields (which is just a particular type of data - often a column header in a spreadsheet), databases can also contain relationships between records. These can be one-to-many relationships or many-to-many relationships.

Wizards

Wizards are simply a way of describing a step-by-step approach in making software easier for the user, usually choosing an option and clicking Next. On launching Base you are presented with a Database Wizard which offers you the choice of creating a database, opening or connecting to an existing one. Choose Create a Database to begin with and click Next. Choose to register the database, don't worry this is only done locally and can help other modules of OpenOffice.org (such as Calc) work with your database. Don't choose the Table wizard just yet and save (and name) your database in a convenient location. For now, use OpenDocument Database format, though this will probably be already automatically selected as the default. Why save it already? Because data such as records will be saved automatically as it is being entered into a database. You should now be presented with the main interface. On the left is the Database column which contains four options; Tables, Queries, Forms and Reports.

Tables

A table will be the closest aspect of database to resemble an ordinary spreadsheet. Click on tables (it may already be selected) and you will be presented with a choice of Tasks (in the upper part); Create Table in Design View, Use Wizard to Create Table and Create View.... Choose Use Wizard to Create Table. There are four steps Select fields, Set types and formats, Set primary key and Create table. Choose a category Business or Personal then choose a Sample table then click the double arrows >> which will copy all the fields into Selected fields on the right. Click next and you can adjust the field characteristics. Click next and make sure Create a primary key is checked and Automatically add a primary key. Click next and the table name should read whatever Sample table you chose. Ensure Insert data immediately is checked and click Finish. Congratulations, you have created your first table. You should now be able to see it looks rather like a spreadsheet. There is not yet any data in it, it is usually better to add data using Forms so close it for now. You will notice that although you have not yet clicked to save it, the table has now automatically been saved. You can see it when you return to the main window and even if you close and reopen the database.

Design View

Creating a table in design view is a more specific way of creating a table. Click on it and you will see a spreadsheet-like layout but this might be deceptive (don't confuse it with the table view). The left column is for the Field name which you choose (you can choose anything, this will be for your reference). The second column is for Field Type and contains a drop-down menu for the type of data that will be stored in this field. For example a name would be Text [VARCHAR], a date would be Date [DATE] and so on. When the Field type is selected, you will see a window at the bottom which is the Field Properties where can you specify things like whether you require data to be entered into that field type when logging records, the permitted character length of the data and decimal places. Unlike in the Table wizard you will need to save any changes in Design view that you want to keep, before closing it to return to the main window.

Forms

Forms are used to enter data easily and quickly. Click on Forms on the left hand side of the screen (in Database column) and Use Wizard to Create Form... (Writer may briefly pop up but also the Form Wizard should be on top). Click on the double arrow >> to add all fields to the right hand column called Fields in the form, and then, (unless you want to change the layout and colors) just click Finish. To build a query for the data, first close the Form in the Writer window.

Queries

Queries are a way of querying your data according to certain conditions or criteria.

Reports

Reports are like queries but offer more layout options for outputting your query results.

External links

General Database Documentation