Buy Used
Condition: Used: Good
Comment: Ships direct from Amazon! Qualifies for Prime Shipping and FREE standard shipping for orders over $25. Overnight and 2 day shipping available!
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

SQLite Paperback – November 19, 2004

ISBN-13: 978-0672326851 ISBN-10: 067232685X Edition: 1st

Price: $17.95
8 New from $49.92 12 Used from $13.96
Amazon Price New from Used from
"Please retry"
$49.92 $13.96
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Get Up to 80% Back When You Sell Us Your Books
Available from these sellers.

Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 336 pages
  • Publisher: Sams; 1 edition (November 19, 2004)
  • Language: English
  • ISBN-10: 067232685X
  • ISBN-13: 978-0672326851
  • Product Dimensions: 7 x 0.7 x 8.9 inches
  • Shipping Weight: 1.2 pounds
  • Average Customer Review: 2.0 out of 5 stars  See all reviews (4 customer reviews)
  • Amazon Best Sellers Rank: #2,661,275 in Books (See Top 100 in Books)

Editorial Reviews

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, and Chris can be contacted at

Excerpt. © Reprinted by permission. All rights reserved.

Introduction: SQLite


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

  • Performance—SQLite performs database operations efficiently and is faster than other free databases such as MySQL and PostgreSQL.

  • Size—SQLite has a small memory footprint and only a single library is required to access databases, making it ideal for embedded database applications.

  • Portability—SQLite runs on many platforms and its databases can be ported easily with no client/server setup or ongoing administration required.

  • Stability—SQLite is ACID-compliant, meeting all four criteria—Atomicity, Consistency, Isolation, and Durability.

  • SQL support—SQLite implements a large subset of the ANSI-92 SQL standard, including views, subqueries, and triggers.

  • Interfaces—SQLite has language APIs for C/C++, PHP, Perl, Python, Tcl, and many more beyond those covered in this book.

  • Cost—SQLite 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 book—C/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 I—General SQLite Use

  • Chapter 1: Getting Started—Gives 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 Data—A concise SQLite tutorial introduces working with the SQLite back end. Discusses programming and database design issues related to SQLite.

  • Chapter 3: SQLite Syntax and Use—Examines SQL syntax as supported by SQLite and suggests workarounds for the unsupported features.

  • Chapter 4: Query Optimization—Discusses performance considerations related to SQL queries and gives some techniques that can be used to speed up your database application.

Part II—Using SQLite Programming Interfaces

  • Chapter 5: The PHP Interface—How to use the SQLite library within PHP scripts to create dynamic, database-driven web pages.

  • Chapter 6: The C/C++ Interface—How to write C/C++ programs using the SQLite library.

  • Chapter 7: The Perl Interface—How to write Perl scripts using the Database Interface module and SQLite Database Driver.

  • Chapter 8: The Tcl Interface—How to write Tcl scripts using the supplied SQLite extension.

  • Chapter 9: The Python Interface—How to write Python programs using the PySQLite extension.

Part III—SQLite Administration

  • Chapter 10: General Database Administration—Discusses basic administration of SQLite and examines SQLite's internal architecture and the Virtual Database Engine (VDBE).

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:

  • PHP 5.0.1

  • Perl 5.8.5

  • Perl::DBI 1.4.3

  • DBD::SQLite2 0.32

  • Tcl 8.4.7

  • Python 2.3.4

Additional Resources

The following are the primary web pages for each of the packages used in this book:

  • SQLite—

  • PHP—

  • Perl DBI—

  • Tcl—

  • Python—

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:

  • SQLite—

  • PHP—

  • Perl DBI—

  • Tcl—

  • Python—

© Copyright Pearson Education. All rights reserved.

Customer Reviews

2.0 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

16 of 20 people found the following review helpful By Dan Baker on July 21, 2006
Format: Paperback
This is an old book, and doesn't cover the newer SQLite 3.x information.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
13 of 18 people found the following review helpful By M. Overweg on March 5, 2006
Format: Paperback
As far as I know, this is the first book on SQLite and for that Chris Newman deserves a compliment.

Beyond that, this book is not very useful though:

1) It explains some basic SQL syntax but I didn't buy this book to learn SQL.

2) Very little information about the specifics and pitfalls of SQLite syntax, I rarely find what I'm looking for.

3) Being a PHP developer I don't need the chapters on C++, Perl, TCL and Python (about 25% of the book).
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
Format: Paperback Verified Purchase
Antiquated book, that is nothing more than an echo of the help file, but less organized.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
5 of 9 people found the following review helpful By Galaxy_Stranger on September 2, 2008
Format: Paperback
SQLite is not intended to be a complete replacement to standard Database Management Systems. It IS, however, a good alternative to a full-blown database in some situations. Think of it as a simple database management system with NO RELATIONS - this may or may not be a problem for you and your project.

I would never use SQLite for a web site of any complexity - MySQL and other RDBMS's are simply too plentiful, powerful and easy to use. One great application I've found is to use SQLite in, say, a C++ application such as a game for saving information like player stats and scores. This saves you from having to do file i/o and parsing through text files. In such a situation, talking to an independent database server would cut the player off from the data if he was offline or otherwise not able to communicate with the server.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

More About the Author

Discover books, learn about writers, read author blogs, and more.

What Other Items Do Customers Buy After Viewing This Item?