Databases
Work in progress..
Introduction
This page is about creating databases applications with Lazarus using the DB-unit. In the DB unit all the basic functionality for working with databases is implemented, but to be usefull they need components which are dependent on the database you want to use.
The first part gives a short introduction on the several database-dependent components and how to install them, the second part is a short course in working with the DB-unit and the last part gives specific information about several supported databases.
First Part: General information about supported databases
Introduction
The databases you can use with Lazarus, (actually with FPC, but that's not so important for the rest of the story) can be divided into two categories: The databases which are completely 'internal' and are written in Freepascal, and the 'external' databases to which connections are made with client-libraries. To use these client-libraries the appropiate bindings must be available. Most client-libraries come only with bindings for C, but FPC provides several packages with the pascal-bindings for database-clients. The supported databases are listed in table 1. (fpc 1.9.7 and above)
Table 1
Database | Package name | Need Client Lib? | Supported versions | Supported platforms |
---|---|---|---|---|
DBase | tDbf | No | All | |
In memory | memds | No | All | |
Textfiles | sdf | No | All | |
Interbase | IBase | Yes | 4-6 | i386: Linux, Win32 |
Firebird | IBase | Yes | 1-1.5 | i386: Linux, Win32 |
SQLite | SQLite | Yes | ||
PostgreSQL | postgres | Yes | 6.6-8 | i386: Linux, Win32 |
Oracle | Oracle | Yes | ||
ODBC | ODBC | Yes | i386: Win32 | |
MySQL | MySQL | Yes | 3, 4.0 | i386: Linux, Win32 |