You are previewing The Definitive Guide to SQLite.
O'Reilly logo
The Definitive Guide to SQLite

Book Description

Traditional relational databases and embedded databases both have shortcomings that can leave a developer perplexed. So for many people, the solution resides in an open source embeddable database with an amazingly small footprint (less than 250 kilobytes). SQLite packs a powerful array of features and can handle databases as large as 2 terabytes. It offers a flexible set of datatypes and the ability to perform transactions, and it is supported by languages like C, PHP, Perl, and Python. And because SQLite's databases are completely file based, privileges are granted at the operating system level, allowing for easy and fast user management.

The Definitive Guide to SQLite is the first book to devote complete coverage to this powerful database. It offers you a thorough overview of SQLite capabilities and APIs, while remaining cognizant of newcomers who may be making their first foray into a database environment with SQLite. This book serves as both a first-time tutorial and future reference guide.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. Foreword
  6. About the Author
  7. About the Technical Reviewer
  8. Acknowledgments
  9. CHAPTER 1: Introducing SQLite
    1. An Embedded Database
    2. A Developer's Database
    3. An Administrator's Database
    4. SQLite History
    5. Who Uses SQLite
    6. Architecture
    7. SQLite's Features and Philosophy
    8. Performance and Limitations
    9. Who Should Read This Book
    10. How This Book Is Organized
    11. Additional Information
    12. Summary
  10. CHAPTER 2: Getting Started
    1. Where to Get SQLite
    2. SQLite on Windows
    3. SQLite on POSIX Systems
    4. Working with SQLite Databases
    5. Database Administration
    6. Other SQLite Tools
    7. Summary
  11. CHAPTER 3: The Relational Model
    1. Background
    2. The Structural Component
    3. The Integrity Component
    4. Normalization
    5. The Manipulative Component
    6. The Meaning of Relational
    7. Summary
    8. References
  12. CHAPTER 4: SQL
    1. The Relational Model
    2. The Example Database
    3. Syntax
    4. Creating a Database
    5. Querying the Database
    6. Modifying Data
    7. Data Integrity
    8. Transactions
    9. Database Administration
    10. Summary
  13. CHAPTER 5: Design and Concepts
    1. The API
    2. Transactions
    3. Code
    4. Summary
  14. CHAPTER 6: The Core C API
    1. Wrapped Queries
    2. Prepared Queries
    3. Errors and the Unexpected
    4. Operational Control
    5. Threads
    6. Summary
  15. CHAPTER 7: The Extension C API
    1. The API
    2. Functions
    3. Aggregates
    4. Collations
    5. Summary
  16. CHAPTER 8: Language Extensions
    1. Selecting an Extension
    2. Perl
    3. Python
    4. Ruby
    5. Java
    6. Tcl
    7. PHP
    8. Summary
  17. CHAPTER 9: SQLite Internals
    1. The Virtual Database Engine
    2. The B-Tree and Pager Modules
    3. The Compiler
    4. Summary
  18. APPENDIX A: SQL Reference
    1. ALTER TABLE
    2. ANALYZE
    3. ATTACH DATABASE
    4. BEGIN TRANSACTION
    5. comment
    6. COMMIT TRANSACTION
    7. COPY
    8. CREATE INDEX
    9. CREATE TABLE
    10. CREATE TRIGGER
    11. CREATE VIEW
    12. DELETE
    13. DETACH DATABASE
    14. DROP INDEX
    15. DROP TABLE
    16. DROP TRIGGER
    17. DROP VIEW
    18. END TRANSACTION
    19. EXPLAIN
    20. expression
    21. INSERT
    22. ON CONFLICT
    23. PRAGMA
    24. REINDEX
    25. REPLACE
    26. ROLLBACK TRANSACTION
    27. SELECT
    28. UPDATE
    29. VACUUM
  19. APPENDIX B: C API Reference
    1. Return Codes
    2. Glossary of Functions
  20. APPENDIX C: Codd's 12 Rules
  21. Index