About the Author
Chris Newman is a consultant programmer specializing in the development of custom web-based database applications to a loyal international client base.
A graduate of Keele University, Chris lives in Stoke-on-Trent, England, where he runs Lightwood Consultancy Ltd, the company he founded in 1999 to further his interest in Internet technology. Lightwood operates web hosting services under the DataSnake brand and is proud to be one of the first hosting companies to offer and support SQLite as a standard feature on all accounts.
More information on Lightwood Consultancy Ltd can be found at http://www.lightwood.net, and Chris can be contacted at firstname.lastname@example.org.
Excerpt. © Reprinted by permission. All rights reserved.
Welcome to SQLite
SQLite is one of the fastest-growing database engines around, but that's growth in terms of popularity, not anything to do with its size. In fact one of SQLite's greatest strengths is that it is extremely lightweight indeed yet still manages to retain a large number of features.
Why Use SQLite?
There are many reasons for choosing SQLite, including
PerformanceSQLite performs database operations efficiently and is faster than other free databases such as MySQL and PostgreSQL.
SizeSQLite has a small memory footprint and only a single library is required to access databases, making it ideal for embedded database applications.
PortabilitySQLite runs on many platforms and its databases can be ported easily with no client/server setup or ongoing administration required.
StabilitySQLite is ACID-compliant, meeting all four criteriaAtomicity, Consistency, Isolation, and Durability.
SQL supportSQLite implements a large subset of the ANSI-92 SQL standard, including views, subqueries, and triggers.
InterfacesSQLite has language APIs for C/C++, PHP, Perl, Python, Tcl, and many more beyond those covered in this book.
CostSQLite is in the public domain and therefore is free to use for any purpose without cost and can be freely redistributed.
Who This Book Is For
This book is aimed at intermediate- to advanced-level programmers looking to include database functionality within their applications. You should have at least a basic working knowledge of one of the languages covered by this bookC/C++, PHP, Perl, Python, or Tcl. The underlying library is written in C/C++; however, it is not necessary to understand that language in order to use the full capabilities of SQLite in your applications.
If you are a new programmer you should still be able to pick up SQLite fairly quickly, but this book does not cover programming basics in any of the languages for which there is a SQLite interface. The benefits of SQLite are only realized through using a programming API as it does not include the tools required to operate as a standalone database system.
It is not a prerequisite to have used a relational database in the past. If SQLite will be the first SQL-based database you have encountered, the book gives a thorough SQL tutorial covering the syntax as understood by SQLite. SQL veterans will still benefit from reviewing the sections that cover features included and omitted by SQLite.
How the Book Is Organized
This book is organized into three parts.
Part IGeneral SQLite Use
Chapter 1: Getting StartedGives some background on SQLite and discusses its strengths and weaknesses. Covers a few basic SQL commands to get things going and looks at the interactive interfaces to SQLite.
Chapter 2: Working with DataA concise SQLite tutorial introduces working with the SQLite back end. Discusses programming and database design issues related to SQLite.
Chapter 3: SQLite Syntax and UseExamines SQL syntax as supported by SQLite and suggests workarounds for the unsupported features.
Chapter 4: Query OptimizationDiscusses performance considerations related to SQL queries and gives some techniques that can be used to speed up your database application.
Part IIUsing SQLite Programming Interfaces
Chapter 5: The PHP InterfaceHow to use the SQLite library within PHP scripts to create dynamic, database-driven web pages.
Chapter 6: The C/C++ InterfaceHow to write C/C++ programs using the SQLite library.
Chapter 7: The Perl InterfaceHow to write Perl scripts using the Database Interface module and SQLite Database Driver.
Chapter 8: The Tcl InterfaceHow to write Tcl scripts using the supplied SQLite extension.
Chapter 9: The Python InterfaceHow to write Python programs using the PySQLite extension.
Part IIISQLite Administration
Versions of Software Covered
At the time of writing, the most recent stable version of SQLite is 2.8.15; however, SQLite 3 is already available as a beta and includes some changes and enhancements over the version 2 series. This book was written with the established, stable, and well-supported version 2 series in mind.
For the other software discussed in this book, the current versions are as follows:
The following are the primary web pages for each of the packages used in this book:
For support with any of these technologies the relevant mailing list is a good place to start. Instructions on joining them can be found in the following locations:
© Copyright Pearson Education. All rights reserved.