| Foreword | p. xv |
| About the Author | p. xvii |
| About the Technical Reviewer | p. xix |
| Acknowledgements | p. xxi |
| Introducing SQLite | p. 1 |
| An Embedded Database | p. 1 |
| A Developer's Database | p. 2 |
| An Administrator's Database | p. 3 |
| SQLite History | p. 3 |
| Who Uses SQLite | p. 4 |
| Architecture | p. 5 |
| The Interface | p. 6 |
| The Compiler | p. 6 |
| The Virtual Machine | p. 6 |
| The Back-end | p. 7 |
| Utilities and Test Code | p. 8 |
| SQLite's Features and Philosophy | p. 8 |
| Zero Configuration | p. 8 |
| Portability | p. 8 |
| Compactness | p. 8 |
| Simplicity | p. 9 |
| Flexibility | p. 9 |
| Liberal Licensing | p. 9 |
| Reliability | p. 10 |
| Convenience | p. 10 |
| Performance and Limitations | p. 11 |
| Who Should Read This Book | p. 14 |
| How This Book Is Organized | p. 14 |
| Additional Information | p. 16 |
| Summary | p. 16 |
| Getting Started | p. 17 |
| Where to Get SQLite | p. 17 |
| SQLite on Windows | p. 18 |
| Getting the Command-Line Program | p. 18 |
| Getting the SQLite DLL | p. 20 |
| Compiling the SQLite Source Code on Windows | p. 21 |
| Building the SQLite DLL with Microsoft Visual C++ | p. 25 |
| Building a Dynamically Linked SQLite Client with Visual C++ | p. 28 |
| Building SQLite with MinGW | p. 29 |
| SQLite on POSIX Systems | p. 31 |
| Binaries and Packages | p. 31 |
| Compiling SQLite from Source | p. 33 |
| Working with SQLite Databases | p. 34 |
| The CLP in Shell Mode | p. 34 |
| The CLP in Command-Line Mode | p. 41 |
| Database Administration | p. 42 |
| Creating, Backing Up, and Dropping Databases | p. 42 |
| Getting Database File Information | p. 43 |
| Other SQLite Tools | p. 45 |
| Summary | p. 45 |
| The Relational Model | p. 47 |
| Background | p. 47 |
| The Three Components | p. 48 |
| SQL and the Relational Model | p. 48 |
| The Structural Component | p. 49 |
| The Information Principle | p. 49 |
| The Sanctity of the Logical Level | p. 50 |
| The Anatomy of the Logical Level | p. 51 |
| Tuples | p. 52 |
| Relations | p. 52 |
| Tables: Relation Variables | p. 56 |
| Views: Virtual Tables | p. 58 |
| The System Catalog | p. 59 |
| The Integrity Component | p. 60 |
| Primary Keys | p. 60 |
| Foreign Keys | p. 61 |
| Constraints | p. 62 |
| Null Values | p. 63 |
| Normalization | p. 63 |
| Normal Forms | p. 64 |
| First Normal Form | p. 64 |
| Functional Dependencies | p. 64 |
| Second Normal Form | p. 65 |
| Third Normal Form | p. 67 |
| The Manipulative Component | p. 68 |
| Relational Algebra and Calculus | p. 68 |
| Relational Query Language | p. 69 |
| The Advent of SQL | p. 70 |
| The Meaning of Relational | p. 71 |
| Summary | p. 71 |
| References | p. 72 |
| SQL | p. 73 |
| The Relational Model | p. 73 |
| Query Languages | p. 74 |
| The Growth of SQL | p. 74 |
| The Example Database | p. 75 |
| Installation | p. 76 |
| Running the Examples | p. 76 |
| Syntax | p. 77 |
| Commands | p. 79 |
| Literals | p. 79 |
| Keywords and Identifiers | p. 80 |
| Comments | p. 80 |
| Creating a Database | p. 80 |
| Creating Tables | p. 80 |
| Altering Tables | p. 82 |
| Querying the Database | p. 82 |
| Relational Operations | p. 82 |
| The Operational Pipeline | p. 84 |
| Filtering | p. 87 |
| Limiting and Ordering | p. 93 |
| Functions and Aggregates | p. 94 |
| Grouping | p. 97 |
| Removing Duplicates | p. 101 |
| Joining Tables | p. 101 |
| Names and Aliases | p. 109 |
| Subqueries | p. 111 |
| Compound Queries | p. 114 |
| Conditional Results | p. 117 |
| The Thing Called Null | p. 119 |
| Set Operations | p. 122 |
| Modifying Data | p. 123 |
| Inserting Records | p. 123 |
| Updating Records | p. 127 |
| Deleting Records | p. 128 |
| Data Integrity | p. 128 |
| Entity Integrity | p. 128 |
| Domain Integrity | p. 133 |
| Storage Classes | p. 136 |
| Manifest Typing | p. 139 |
| Type Affinity | p. 141 |
| Transactions | p. 147 |
| Transaction Scopes | p. 147 |
| Conflict Resolution | p. 148 |
| Database Locks | p. 151 |
| Deadlocks | p. 151 |
| Transaction Types | p. 152 |
| Database Administration | p. 153 |
| Views | p. 153 |
| Indexes | p. 155 |
| Triggers | p. 158 |
| Attaching Databases | p. 163 |
| Cleaning Databases | p. 164 |
| Database Configuration | p. 165 |
| The System Catalog | p. 168 |
| Viewing Query Plans | p. 168 |
| Summary | p. 169 |
| Design and Concepts | p. 171 |
| The API | p. 171 |
| What's New in SQLite Version 3 | p. 172 |
| The Principal Data Structures | p. 172 |
| The Core API | p. 174 |
| Operational Control | p. 182 |
| The Extension API | p. 183 |
| Transactions | p. 186 |
| Transaction Lifecycles | p. 186 |
| Lock States | p. 187 |
| Read Transactions | p. 188 |
| Write Transactions | p. 189 |
| Tuning the Page Cache | p. 192 |
| Waiting for Locks | p. 194 |
| Code | p. 197 |
| Using Multiple Connections | p. 197 |
| Table Locks | p. 198 |
| Fun with Temporary Tables | p. 199 |
| The Importance of Finalizing | p. 201 |
| Shared Cache Mode | p. 202 |
| Summary | p. 203 |
| The Core C API | p. 205 |
| Wrapped Queries | p. 205 |
| Connecting and Disconnecting | p. 206 |
| The exec Query | p. 207 |
| String Handling | p. 211 |
| The Get Table Query | p. 213 |
| Prepared Queries | p. 214 |
| Compilation | p. 216 |
| Execution | p. 216 |
| Finalization and Reset | p. 217 |
| Fetching Records | p. 219 |
| Parameterized Queries | p. 224 |
| Errors and the Unexpected | p. 229 |
| Handling Errors | p. 229 |
| Handling Busy Conditions | p. 232 |
| Handling Schema Changes | p. 233 |
| Operational Control | p. 235 |
| Commit Hooks | p. 235 |
| Rollback Hooks | p. 236 |
| Update Hooks | p. 236 |
| Authorizer Functions | p. 237 |
| Threads | p. 246 |
| Shared Cache Mode | p. 247 |
| Threads and Memory Management | p. 252 |
| Summary | p. 253 |
| The Extension C API | p. 255 |
| The API | p. 256 |
| Registering Functions | p. 256 |
| The Step Function | p. 258 |
| Return Values | p. 258 |
| Functions | p. 259 |
| Return Values | p. 262 |
| A Complete Example | p. 264 |
| A Practical Application | p. 267 |
| Aggregates | p. 278 |
| A Practical Example | p. 280 |
| Collating Sequences | p. 283 |
| Collation Defined | p. 284 |
| A Simple Example | p. 286 |
| Collation on Demand | p. 291 |
| A Practical Application | p. 292 |
| Summary | p. 299 |
| Language Extensions | p. 301 |
| Selecting an Extension | p. 302 |
| Perl | p. 303 |
| Installation | p. 303 |
| Connecting | p. 304 |
| Query Processing | p. 304 |
| Parameter Binding | p. 306 |
| User-Defined Functions and Aggregates | p. 307 |
| Python | p. 310 |
| PySQLite | p. 310 |
| APSW | p. 316 |
| Ruby | p. 319 |
| Installation | p. 319 |
| Connecting | p. 319 |
| Query Processing | p. 320 |
| User-Defined Functions and Aggregates | p. 322 |
| Java | p. 324 |
| Installation | p. 325 |
| Connecting | p. 325 |
| Query Processing | p. 326 |
| User-Defined Functions and Aggregates | p. 328 |
| JDBC | p. 329 |
| Tcl | p. 331 |
| Installation | p. 331 |
| Connecting | p. 331 |
| Query Processing | p. 332 |
| User-Defined Functions | p. 334 |
| PHP | p. 335 |
| Installation | p. 336 |
| Connections | p. 336 |
| Queries | p. 336 |
| User-Defined Functions and Aggregates | p. 339 |
| Summary | p. 340 |
| SQLite Internals | p. 341 |
| The Virtual Database Engine | p. 341 |
| The Stack | p. 343 |
| Program Body | p. 343 |
| Program Startup and Shutdown | p. 345 |
| Instruction Types | p. 347 |
| The B-Tree and Pager Modules | p. 349 |
| Database File Format | p. 349 |
| The B-Tree API | p. 353 |
| The Compiler | p. 355 |
| The Tokenizer | p. 355 |
| The Parser | p. 357 |
| The Code Generator | p. 358 |
| The Optimizer | p. 360 |
| Summary | p. 362 |
| SQL Reference | p. 365 |
| C API Reference | p. 395 |
| Codd's 12 Rules | p. 423 |
| Index | p. 425 |
| Table of Contents provided by Ingram. All Rights Reserved. |