Difference between revisions of "Documentation/DevGuide/Database/Database Access"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Database Access)
m (FINAL VERSION FOR L10N)
(4 intermediate revisions by 4 users not shown)
Line 5: Line 5:
 
|NextPage=Documentation/DevGuide/Database/Architecture
 
|NextPage=Documentation/DevGuide/Database/Architecture
 
}}
 
}}
 +
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Database/{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:Database Access}}
 
{{DISPLAYTITLE:Database Access}}
 +
{{Download Collection|MediaWiki:Collections/Developer's Guide - Database Access}}
 
=== Platform Independence ===
 
=== Platform Independence ===
  
The goal of the {{PRODUCTNAME}} API database integration is to provide platform independent database connectivity for {{PRODUCTNAME}} API. Well it is necessary to access database abstraction layers, such as JDBC and ODBC, it is also desirable to have direct access to arbitrary data sources, if required.
+
The goal of the {{PRODUCTNAME}} API database integration is to provide platform independent database connectivity for {{PRODUCTNAME}} API. While it is necessary to access database abstraction layers, such as JDBC and ODBC, it is also desirable to have direct access to arbitrary data sources, if required.
  
 
The {{PRODUCTNAME}} API database integration reaches this goal through an abstraction above the abstractions with the Star Database Connectivity (SDBC). SDBC accesses data through SDBC drivers. Each SDBC driver knows how to get data from a particular source. Some drivers handle files themselves, others use a standard driver model, or existing drivers to retrieve data. The concept makes it possible to integrate database connectivity for MAPI address books, LDAP directories and {{PRODUCTNAME}} Calc into the current version of {{PRODUCTNAME}} API.
 
The {{PRODUCTNAME}} API database integration reaches this goal through an abstraction above the abstractions with the Star Database Connectivity (SDBC). SDBC accesses data through SDBC drivers. Each SDBC driver knows how to get data from a particular source. Some drivers handle files themselves, others use a standard driver model, or existing drivers to retrieve data. The concept makes it possible to integrate database connectivity for MAPI address books, LDAP directories and {{PRODUCTNAME}} Calc into the current version of {{PRODUCTNAME}} API.
Line 34: Line 36:
 
{{PDL1}}
 
{{PDL1}}
  
[[Category:Documentation/Developers Guide/Database Access]]
+
[[Category:Documentation/Developer's Guide/Database Access]]

Revision as of 12:41, 15 May 2009



PDF Icon.gif Download as a PDF or ODT


Platform Independence

The goal of the OpenOffice.org API database integration is to provide platform independent database connectivity for OpenOffice.org API. While it is necessary to access database abstraction layers, such as JDBC and ODBC, it is also desirable to have direct access to arbitrary data sources, if required.

The OpenOffice.org API database integration reaches this goal through an abstraction above the abstractions with the Star Database Connectivity (SDBC). SDBC accesses data through SDBC drivers. Each SDBC driver knows how to get data from a particular source. Some drivers handle files themselves, others use a standard driver model, or existing drivers to retrieve data. The concept makes it possible to integrate database connectivity for MAPI address books, LDAP directories and OpenOffice.org Calc into the current version of OpenOffice.org API.

Since SDBC drivers are UNO components, it is possible to write drivers for data sources and thus extend the database connectivity of OpenOffice.org API.

Functioning of the OpenOffice.org API Database Integration

The OpenOffice.org API database integration is based on SQL. This section discusses how the OpenOffice.org API handles various SQL dialects and how it integrates with data sources that do not understand SQL.

OpenOffice.org API has a built-in parser that tests and adjusts the syntax to be standard SQL. With the parser, differences between SQL dialects, such as case sensitivity, can be handled if the query composer is used. Data sources that do not understand SQL can be treated by an SDBC driver that is a database engine of its own, which translates from standard SQL to the mechanisms needed to read and write data using a non-SQL data source.

Integration with OpenOffice.org API

OpenOffice.org API employs SDBC data sources in Writer, Calc and Database Forms. In Writer, use form letter fields to access database tables, create email form letters, and drag tables and queries into a document to create tables or lists.

If a table is dragged into a Calc spreadsheet, the database range that can be updated from the database, and data pilots can be created from database connections. Conversely, drag a spreadsheet range onto a database to import the spreadsheet data into a database.

Another area of database connectivity are database forms. Form controls can be inserted into Writer or Calc documents, or just created in the database file with Base, to connect them to database tables to get data aware forms.

While there is no API coverage for direct database integration in Writer, the database connectivity in Calc and Database Forms can be controlled through the API. Refer to the corresponding chapters Database operations and Forms for more information. In Writer, database connectivity can be implemented by application programmers, for example, by accessing text field context. No API exists for merging complete selections into text.

Using the OpenOffice.org API database integration enhances or automates the out-of-box database integration, creates customized office documents from databases, or provides simple, platform-independent database clients in the OpenOffice.org API environment.

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