1
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
3
<!ENTITY libdbi-reference SYSTEM "libdbi-reference.sgml">
4
<!ENTITY libdbi-quickstart SYSTEM "libdbi-quickstart.sgml">
5
<!ENTITY example-program SYSTEM "example-program.sgml">
6
<!ENTITY freedoc-license SYSTEM "include/copying-fdl.sgml">
7
<!ENTITY www '<ULink url="http://libdbi.sourceforge.net">http://libdbi.sourceforge.net</ULink>'>
11
<Book id="programmers-guide">
14
<Title>Database Independent Abstraction Layer for C</Title>
15
<SubTitle>libdbi Programmer's Guide</SubTitle>
17
<Firstname>David</Firstname>
18
<Othername>A.</Othername>
19
<Surname>Parker</Surname>
21
<OrgName>Neon Goat Productions</OrgName>
22
<Address><EMail>david@neongoat.com</EMail></Address>
26
<firstname>Markus</firstname>
27
<surname>Hoenicka</surname>
29
<address format="linespecific"><email>markus@mhoenicka.de</email></address>
32
<Edition>Document revision: $Id: programmers-guide.sgml,v 1.12 2006/05/19 21:44:46 mhoenicka Exp $</Edition>
33
<PubDate>$Date: 2006/05/19 21:44:46 $</PubDate>
35
<Year>2001-2006</Year>
36
<Holder>David Parker, Neon Goat Productions</Holder>
40
Permission is granted to copy, distribute and/or modify this
41
document under the terms of the <Link linkend="copying-FDL">
42
<CiteTitle>GNU Free Documentation License</CiteTitle></Link>,
43
Version 1.1 or any later version published by the Free Software
44
Foundation; with no Invariant Sections, with no Front-Cover Texts,
45
and with no Back-Cover Texts. A copy of the license is included in
46
<XRef linkend="copying-FDL">.
51
libdbi implements a database-independent abstraction layer in C,
52
similar to the DBI/DBD layer in Perl. Writing one generic set of code,
53
programmers can leverage the power of multiple databases and multiple
54
simultaneous database connections by using this framework.
59
<Chapter id="intro"><Title>Introduction</Title>
60
<Section id="description"><Title>Description</Title>
62
libdbi provides application developers with a database independent abstraction
63
layer for C. It handles the database-specific implementations for each type of
64
database, so that you can use the same exact code with any type of database server
65
that libdbi supports. You can initiate and use multiple database connections
66
simultaneously, regardless of the types of database servers you are connecting to.
67
The driver architecture allows for new database drivers to be easily added
71
<Section id="terminology"><Title>libdbi Concepts and Terminology</Title>
73
In this guide, the terms <Quote>user</Quote> and <Quote>programmer</Quote> are used
74
interchangably, since the target audience is the software developer using libdbi in
75
his program. The libdbi architecture provides serveral <Quote>drivers</Quote>, one
76
for each type of database server. All drivers are loaded into memory upon libdbi
77
initiallization and are made available to the programmer. Once a driver is
78
<Emphasis>instantiated</Emphasis>, it represents a distinct database session and is
79
called a <Quote>connection</Quote>. Multiple connections may exist for a single driver, and
80
all will function independently of each other. A star character (*) represents a
81
wildcard matching any letters. For example, <Quote>dbi_conn_*</Quote> would
82
represent all functions beginning with <Quote>dbi_conn_</Quote>.
85
<Section id="gnugpl"><Title>Modifications and redistribution of libdbi</Title>
87
libdbi is Copyright © 2001-2005, David Parker and Mark Tobenkin.
90
libdbi is free software; you can redistribute it and/or
91
modify it under the terms of the GNU Lesser General Public
92
License as published by the Free Software Foundation; either
93
version 2.1 of the License, or (at your option) any later version.
96
This library is distributed in the hope that it will be useful,
97
but WITHOUT ANY WARRANTY; without even the implied warranty of
98
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
99
Lesser General Public License for more details.
102
You should have received a copy of the GNU Lesser General Public
103
License along with this library; if not, write to the Free Software
104
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
107
<Section id="contact"><Title>Contact Info</Title>
109
Please email us with any bugs, ideas, feature requests, or questions. The libdbi
110
website has the latest version of this documentation and the libdbi software, as
111
well as a central database of third-party drivers.
114
<ListItem><Para>&www;</Para></ListItem>
115
<ListItem><Para>David Parker <EMail>david@neongoat.com</EMail></Para></ListItem>
116
<ListItem><Para>Mark Tobenkin <EMail>mark@brentwoodradio.com</EMail></Para></ListItem>
117
<ListItem><Para>Markus Hoenicka <EMail>markus@mhoenicka.de</EMail></Para></ListItem>
122
<Chapter id="quickstart"><Title>libdbi in a Nutshell (Quickstart Guide)</Title>
123
<!-- this is a section -->
125
<!-- this is another section -->