About the Authors |
|
xvi | |
About the Technical Reviewer |
|
xvii | |
Acknowledgments |
|
xviii | |
Introduction |
|
xix | |
|
Chapter 1 Introducing SQLite |
|
|
1 | (16) |
|
|
1 | (1) |
|
|
2 | (1) |
|
An Administrator's Database |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
5 | (3) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
8 | (1) |
|
SQLite's Features and Philosophy |
|
|
8 | (3) |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
Performance and Limitations |
|
|
11 | (2) |
|
Who Should Read This Book |
|
|
13 | (1) |
|
How This Book Is Organized |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
15 | (2) |
|
Chapter 2 Getting Started |
|
|
17 | (30) |
|
|
17 | (1) |
|
|
18 | (12) |
|
Getting the Command-Line Program |
|
|
18 | (3) |
|
|
21 | (1) |
|
Compiling the SQLite Source Code on Windows |
|
|
22 | (3) |
|
Building the SQLite DLL with Microsoft Visual C++ |
|
|
25 | (2) |
|
Building a Dynamically Linked SQLite Client with Visual C++ |
|
|
27 | (1) |
|
Building SQLite with MinGW |
|
|
28 | (2) |
|
SQLite on Linux, Mac OS X, and Other POSIX Systems |
|
|
30 | (2) |
|
|
30 | (1) |
|
Compiling SQLite from Source |
|
|
31 | (1) |
|
|
32 | (3) |
|
|
33 | (1) |
|
The CLP in Command-Line Mode |
|
|
34 | (1) |
|
|
35 | (10) |
|
|
35 | (2) |
|
Getting Database Schema Information |
|
|
37 | (2) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
Performing Unattended Maintenance |
|
|
41 | (1) |
|
|
42 | (2) |
|
Getting Database File Information |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (40) |
|
|
47 | (3) |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (3) |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
53 | (1) |
|
|
53 | (1) |
|
|
53 | (2) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (32) |
|
|
55 | (2) |
|
Select and the Operational Pipeline |
|
|
57 | (2) |
|
|
59 | (5) |
|
|
64 | (2) |
|
|
66 | (1) |
|
|
67 | (5) |
|
|
72 | (1) |
|
|
72 | (5) |
|
|
77 | (2) |
|
|
79 | (2) |
|
|
81 | (2) |
|
|
83 | (1) |
|
|
84 | (2) |
|
|
86 | (1) |
|
Chapter 4 Advanced SQL for SQLite |
|
|
87 | (38) |
|
|
87 | (5) |
|
|
87 | (4) |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (19) |
|
|
93 | (4) |
|
|
97 | (4) |
|
|
101 | (3) |
|
|
104 | (2) |
|
|
106 | (2) |
|
|
108 | (3) |
|
|
111 | (7) |
|
|
111 | (1) |
|
|
112 | (3) |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
118 | (6) |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
120 | (3) |
|
|
123 | (1) |
|
|
123 | (1) |
|
|
124 | (1) |
|
Chapter 5 SQLite Design and Concepts |
|
|
125 | (28) |
|
|
125 | (11) |
|
The Principal Data Structures |
|
|
126 | (1) |
|
|
127 | (8) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
136 | (2) |
|
Creating User-Defined Functions |
|
|
136 | (1) |
|
Creating User-Defined Aggregates |
|
|
137 | (1) |
|
Creating User-Defined Collations |
|
|
138 | (1) |
|
|
138 | (7) |
|
|
138 | (1) |
|
|
139 | (2) |
|
|
141 | (1) |
|
|
141 | (4) |
|
|
145 | (1) |
|
Transitioning to Exclusive |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
146 | (3) |
|
|
146 | (1) |
|
Using the Right Transaction |
|
|
147 | (2) |
|
|
149 | (2) |
|
Using Multiple Connections |
|
|
149 | (1) |
|
The Importance of Finalizing |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
151 | (2) |
|
|
153 | (42) |
|
|
153 | (8) |
|
Connecting and Disconnecting |
|
|
153 | (2) |
|
|
155 | (4) |
|
|
159 | (2) |
|
|
161 | (3) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
164 | (5) |
|
Getting Column Information |
|
|
165 | (1) |
|
|
166 | (2) |
|
|
168 | (1) |
|
|
169 | (5) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
173 | (1) |
|
Errors and the Unexpected |
|
|
174 | (4) |
|
|
174 | (2) |
|
|
176 | (1) |
|
|
177 | (1) |
|
|
178 | (12) |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
180 | (10) |
|
|
190 | (3) |
|
|
190 | (3) |
|
Threads and Memory Management |
|
|
193 | (1) |
|
|
193 | (2) |
|
Chapter 7 The Extension C API |
|
|
195 | (24) |
|
|
196 | (4) |
|
|
196 | (2) |
|
|
198 | (1) |
|
|
198 | (2) |
|
|
200 | (4) |
|
|
202 | (1) |
|
Arrays and Cleanup Handlers |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
203 | (1) |
|
|
204 | (5) |
|
|
205 | (1) |
|
|
206 | (3) |
|
|
209 | (8) |
|
|
210 | (2) |
|
|
212 | (4) |
|
|
216 | (1) |
|
|
217 | (2) |
|
Chapter 8 Language Extensions |
|
|
219 | (34) |
|
|
220 | (1) |
|
|
221 | (5) |
|
|
221 | (1) |
|
|
222 | (1) |
|
|
222 | (2) |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
225 | (1) |
|
|
226 | (6) |
|
|
226 | (1) |
|
|
227 | (1) |
|
|
227 | (2) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
231 | (1) |
|
APSW as an Alternative Python Interface |
|
|
232 | (1) |
|
|
232 | (4) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (1) |
|
|
234 | (2) |
|
|
236 | (1) |
|
|
236 | (7) |
|
|
237 | (1) |
|
|
238 | (1) |
|
|
238 | (2) |
|
User-Defined Functions and Aggregates |
|
|
240 | (1) |
|
|
241 | (2) |
|
|
243 | (4) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (3) |
|
|
247 | (1) |
|
|
247 | (5) |
|
|
248 | (1) |
|
|
248 | (1) |
|
|
248 | (3) |
|
User-Defined Functions and Aggregates |
|
|
251 | (1) |
|
|
252 | (1) |
|
Chapter 9 iOS Development with SQLite |
|
|
253 | (26) |
|
Prerequisites for SQLite iOS Development |
|
|
253 | (6) |
|
Signing Up for Apple Developer |
|
|
254 | (1) |
|
Downloading and Installing Xcode and the iOS SDK |
|
|
254 | (4) |
|
|
258 | (1) |
|
Building the iSeinfeld iOS SQLite Application |
|
|
259 | (13) |
|
Step 1 Creating a New Xcode Project |
|
|
259 | (2) |
|
Step 2 Adding the SQLite Framework to Your Project |
|
|
261 | (2) |
|
Step 3 Preparing the Foods Database |
|
|
263 | (1) |
|
Step 4 Creating Classes for the Food Data |
|
|
264 | (5) |
|
Step 5 Accessing and Querying the SQLite DB |
|
|
269 | (3) |
|
Step 6 Final Polish and Wiring for iSeinfeld |
|
|
272 | (1) |
|
|
272 | (4) |
|
Working with Large SQLite Databases Under iOS |
|
|
276 | (1) |
|
|
277 | (2) |
|
Chapter 10 Android Development with SQLite |
|
|
279 | (24) |
|
Prerequisites for SQLite Android Development |
|
|
279 | (6) |
|
Check Prerequisites and the JDK |
|
|
280 | (1) |
|
Downloading and Installing the Android SDK Starter Package |
|
|
280 | (1) |
|
Downloading and Installing the Android Developer Tools |
|
|
280 | (1) |
|
Adding Android Platforms and Components |
|
|
281 | (4) |
|
The Android SQLite Classes and Interfaces |
|
|
285 | (9) |
|
Using the Basic Helper Class, SQLiteOpenHelper |
|
|
285 | (1) |
|
Working with the SQLiteDatabase Class |
|
|
286 | (4) |
|
Applying SQLiteOpenHelper and SQLiteDatabase in Practice |
|
|
290 | (3) |
|
Querying SQLite with SQLiteQueryBuilder |
|
|
293 | (1) |
|
Building the Seinfeld Android SQLite Application |
|
|
294 | (6) |
|
Creating a New Android Project |
|
|
295 | (1) |
|
Adding the Seinfeld SQLite Database to Your Project |
|
|
296 | (1) |
|
|
296 | (1) |
|
Defining the User Interface |
|
|
297 | (1) |
|
Linking the Data and User Interface |
|
|
298 | (1) |
|
Viewing the Finished Seinfeld Application |
|
|
299 | (1) |
|
Care and Feeding for SQLite Android Applications |
|
|
300 | (1) |
|
Database Backup for Android |
|
|
300 | (1) |
|
Working with Large SQLite Databases Under Android |
|
|
300 | (1) |
|
|
301 | (2) |
|
Chapter 11 SQLite Internals and New Features |
|
|
303 | (20) |
|
The B-Tree and Pager Modules |
|
|
303 | (8) |
|
|
303 | (5) |
|
|
308 | (3) |
|
Manifest Typing, Storage Classes, and Affinity |
|
|
311 | (7) |
|
|
311 | (2) |
|
|
313 | (1) |
|
|
314 | (4) |
|
|
318 | (4) |
|
|
318 | (1) |
|
Activation and Configuration WAL |
|
|
319 | (1) |
|
WAL Advantages and Disadvantages |
|
|
320 | (1) |
|
Operational Issues with WAL-Enabled SQLite Databases |
|
|
321 | (1) |
|
|
322 | (1) |
Index |
|
323 | |