Difference between revisions of "Documentation/How Tos/Using SQLite With OpenOffice.org"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Imported from website, original author: yves.chaufour@wanadoo.fr, contributors Gerry Singleton)
Line 22: Line 22:
 
This guide addresses ODBC which OpenOffice.org uses to attach to databases and SQLite, in particular.
 
This guide addresses ODBC which OpenOffice.org uses to attach to databases and SQLite, in particular.
  
 +
==Why use SQLite with OpenOffice.org?==
 +
 +
The use of SQLite has many advantages: 
 +
 +
* The data base is in only one file, in contrast to dBASE which creates a file per table, making it easy to exchange databases  between various users.
 +
* Java JRE or SDK is not required to support SQLite.
 +
* No server is needed (local or remote) to access a database. 
 +
* ODBC drivers exist for *NIX and for Windows, thus enabling users of both environments to access data and exchange them. 
 +
* A [http://dba.openoffice.org/drivers/sqlite/index.html new SDBC driver] (native to OpenOffice.org) is available for experimentation.
 +
* Sophisticated graphic interfaces, such as those of msaccess, can be easily developed using the forms, queries, states and macros of OpenOffice.org. These interfaces are stored separately in OpenOffice separate and can also be exchanged between users under UNIX or Windows.
 +
 +
and some disadvantages:
 +
 +
* Modifying the structure of a SQLite table after its creation is not directly possible. This means that you cannot easily add fields nor to modify their properties once that the table is created.  Therefore you must prepare the structure of your tables before creating them.
 +
* OpenOffice.org requires the use of the ODBC driver for accessing a SQLite database thus making this operation somewhat complicated. First it must be declared in ODBC and then in OpenOffice.org. The native SDBC driver should correct this situation when it is production ready.
 +
* The initial database file cannot be created with OpenOffice.org but by using other tools. 
 +
 +
In short, the principal advantages of the use of SQLite with OpenOffice.org are the format of data storage and the portability from one environment to another.  In the list of disadvantages, the two last are not specific to SQLite, but are requirements of using ODBC.  However, these are not as awkward as they do not take place during the initial creation of the database. 
 +
 +
{{Documentation/Note|SQLite appeals to anyone frustrated with using MDB files under Linux, or who has had difficulty installing MySQL or other RDBMS server on their workstation.}}
  
{{Documentation/Imported|author=[mailto:yves.chaufour@wanadoo.fr Yves Chaufour]|contributors=Gerry Singleton}}
 
 
{{PDL1}}
 
{{PDL1}}

Revision as of 15:48, 16 August 2007

Template:Documentation/BeingEdited

Introduction

The aim of this guide is to help OpenOffice.org users to take advantage of the SQLite database engine as a data source.

What is SQLite?

SQLite is a basic database engine that implements most of the features of SQL92. Unlike PostgreSQL and MySQL, SQLite stores a whole data base with all its tables a single file. Other benefits are: database access requires no database server, database files can be freely shared between machines with different byte orders and databases can be up to 2 terabytes (241 bytes) in size. Plus it is fast (twice as much as PostgreSQL and MySQL for most operations) and has a small memory footprint.

Data management can be achieved in the following ways:

  1. Via a C/C++ Linux library or Windows DLL.
  2. Via an in-line program (sqlite: available under Linux and Windows) that makes it possible to create and to manage the files of data bases.
  3. Via the SQLite PHP module or, if you have, PHP version 5 internally to a SQLite database.
  4. Via ODBC (Linux and Windows) which allows any application supporting this standard to reach a SQLite database.
  5. Using the experimental SDBC SQLite driver

This guide addresses ODBC which OpenOffice.org uses to attach to databases and SQLite, in particular.

Why use SQLite with OpenOffice.org?

The use of SQLite has many advantages:

  • The data base is in only one file, in contrast to dBASE which creates a file per table, making it easy to exchange databases between various users.
  • Java JRE or SDK is not required to support SQLite.
  • No server is needed (local or remote) to access a database.
  • ODBC drivers exist for *NIX and for Windows, thus enabling users of both environments to access data and exchange them.
  • A new SDBC driver (native to OpenOffice.org) is available for experimentation.
  • Sophisticated graphic interfaces, such as those of msaccess, can be easily developed using the forms, queries, states and macros of OpenOffice.org. These interfaces are stored separately in OpenOffice separate and can also be exchanged between users under UNIX or Windows.

and some disadvantages:

  • Modifying the structure of a SQLite table after its creation is not directly possible. This means that you cannot easily add fields nor to modify their properties once that the table is created. Therefore you must prepare the structure of your tables before creating them.
  • OpenOffice.org requires the use of the ODBC driver for accessing a SQLite database thus making this operation somewhat complicated. First it must be declared in ODBC and then in OpenOffice.org. The native SDBC driver should correct this situation when it is production ready.
  • The initial database file cannot be created with OpenOffice.org but by using other tools.

In short, the principal advantages of the use of SQLite with OpenOffice.org are the format of data storage and the portability from one environment to another. In the list of disadvantages, the two last are not specific to SQLite, but are requirements of using ODBC. However, these are not as awkward as they do not take place during the initial creation of the database.

Template:Documentation/Note

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools