About the Author |
|
xi | |
About the Technical Reviewers |
|
xiii | |
Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
|
Chapter 1 Getting Up to Speed with Databases and SQLite |
|
|
1 | (8) |
|
|
1 | (1) |
|
Databases Are Structured and Organized |
|
|
2 | (1) |
|
|
2 | (2) |
|
Relational Databases and SQL to the Rescue |
|
|
4 | (1) |
|
Looking Inside a Relational Table and Query |
|
|
5 | (1) |
|
|
6 | (1) |
|
Looking at Other Query Choices |
|
|
7 | (2) |
|
Chapter 2 Understanding What SQLite Is |
|
|
9 | (6) |
|
Putting a Database in Perspective |
|
|
9 | (1) |
|
|
10 | (1) |
|
SQLite Is Designed for a Single User |
|
|
11 | (1) |
|
|
12 | (1) |
|
SQLite Supports Transactions and Is ACID-Compliant |
|
|
13 | (2) |
|
Chapter 3 Using SQLite Basics: Storing and Retrieving Data |
|
|
15 | (14) |
|
|
16 | (1) |
|
Run sqlite3 and Let It Create a New Database |
|
|
16 | (1) |
|
Create and Name a New sqlite3 Database |
|
|
17 | (1) |
|
|
17 | (1) |
|
Run sqlite3 and Open an Existing Database |
|
|
17 | (1) |
|
Experimenting with SQLite Syntax |
|
|
18 | (1) |
|
Exploring Your sqlite3 Database with a Graphical SQLite Editor |
|
|
19 | (2) |
|
|
21 | (1) |
|
Using a Graphical SQLite Editor |
|
|
21 | (1) |
|
|
22 | (2) |
|
|
24 | (1) |
|
Inserting Data into a Table |
|
|
24 | (1) |
|
Using a Graphical User Interface |
|
|
24 | (2) |
|
|
26 | (1) |
|
|
26 | (1) |
|
Using a Graphical User Interface |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
27 | (2) |
|
Chapter 4 Working with the Relational Model and SQLite |
|
|
29 | (10) |
|
|
30 | (1) |
|
Building the Scores Table |
|
|
31 | (1) |
|
|
32 | (1) |
|
Using Aliases to Identify Multiple Tables in a SELECT Statement |
|
|
32 | (1) |
|
Using the rowid Primary Key |
|
|
33 | (1) |
|
Changing a Name in One Table |
|
|
34 | (1) |
|
|
34 | (3) |
|
|
37 | (1) |
|
|
38 | (1) |
|
Chapter 5 Using SQLite Features---What You Can Do with SELECT Statements |
|
|
39 | (6) |
|
|
40 | (1) |
|
Ordering Data Makes It Easier to Use |
|
|
40 | (1) |
|
Grouping Data Can Consolidate It |
|
|
41 | (1) |
|
Using Variables in Queries |
|
|
42 | (1) |
|
|
43 | (2) |
|
Chapter 6 Using SQLite with PHP |
|
|
45 | (10) |
|
Putting PHP and SQLite Together: The Basics |
|
|
46 | (1) |
|
Verifying PHP in Your Environment |
|
|
46 | (1) |
|
Preparing the SQLite Database |
|
|
47 | (3) |
|
Connecting to Your SQLite Database |
|
|
50 | (4) |
|
1 Create a New PDO Object |
|
|
51 | (1) |
|
2 Create and Prepare the Query |
|
|
52 | (1) |
|
|
52 | (1) |
|
|
52 | (1) |
|
|
52 | (2) |
|
|
54 | (1) |
|
Chapter 7 Using SQLite with Android/Java |
|
|
55 | (6) |
|
Integrating SQLite with Any Operating System, Framework, or Language |
|
|
55 | (2) |
|
|
57 | (1) |
|
|
57 | (1) |
|
Extend SQLite Open Helper |
|
|
58 | (2) |
|
|
60 | (1) |
|
Chapter 8 Using SQLite with Core Data (iOS and OS X) |
|
|
61 | (14) |
|
Introducing the Core Data Framework |
|
|
62 | (1) |
|
Using the Core Data Model Editor |
|
|
63 | (3) |
|
|
66 | (2) |
|
|
68 | (1) |
|
|
69 | (4) |
|
|
73 | (2) |
|
Chapter 9 Using SQLite/Core Data with Swift (iOS and OS X) |
|
|
75 | (22) |
|
Looking at the Core Data Stack |
|
|
75 | (1) |
|
Fetching Data to the Core Data Stack |
|
|
76 | (1) |
|
Structuring a Core Data App |
|
|
76 | (1) |
|
Passing a Managed Object Context to a View Controller in iOS |
|
|
77 | (1) |
|
Setting Up the Core Data Stack in AppDelegate for iOS |
|
|
78 | (3) |
|
Setting Up the Core Data Stack in AppDelegate for OS X |
|
|
81 | (3) |
|
Creating a Fetch Request in iOS |
|
|
84 | (1) |
|
Saving the Managed Object Context |
|
|
85 | (1) |
|
|
85 | (1) |
|
|
86 | (1) |
|
Working with NSManagedObject |
|
|
87 | (1) |
|
Creating a New NSManagedObject Instance |
|
|
88 | (2) |
|
Working with a Subclass of NSManagedObject |
|
|
90 | (5) |
|
|
95 | (2) |
|
Chapter 10 Using SQLite/Core Data with Objective-C (iOS and Mac) |
|
|
97 | (24) |
|
Looking at the Core Data Stack |
|
|
98 | (1) |
|
Fetching Data to the Core Data Stack |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
99 | (1) |
|
Objective-C Is a Messaging Language |
|
|
99 | (1) |
|
Using Brackets in Objective-C |
|
|
99 | (1) |
|
|
100 | (1) |
|
Ending Statements with a Semicolon |
|
|
100 | (1) |
|
Separating Headers and Bodies in Objective-C |
|
|
100 | (1) |
|
Looking at Method Declarations |
|
|
101 | (1) |
|
Handling nil in Objective-C |
|
|
101 | (1) |
|
Structuring a Core Data App with Objective-C |
|
|
102 | (1) |
|
Passing a Managed Object Context to a View Controller in iOS |
|
|
102 | (1) |
|
Setting up the Core Data Stack in AppDelegate for iOS |
|
|
103 | (4) |
|
Setting Up the Core Data Stack in AppDelegate for OS X |
|
|
107 | (3) |
|
Creating a Fetch Request in iOS |
|
|
110 | (1) |
|
Saving the Managed Object Context |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
112 | (8) |
|
|
120 | (1) |
|
Chapter 11 Using the Simple Database with a PHP Web Site |
|
|
121 | (14) |
|
|
121 | (3) |
|
|
124 | (3) |
|
Implementing the PHP Web Site |
|
|
127 | (1) |
|
Looking at the Basic PHP/SQLite Structure |
|
|
128 | (2) |
|
Building the Drop-Down Selection List (phpsq |
|
|
|
|
130 | (1) |
|
Showing the Selected Data (phpsql2. php) |
|
|
131 | (2) |
|
Adding New Data (phpsql3.php) |
|
|
133 | (1) |
|
Using Try/Catch Blocks with PHP and PDO |
|
|
134 | (1) |
|
|
134 | (1) |
|
Chapter 12 Using the Simple Database with a Core Data/iOS App |
|
|
135 | (10) |
|
|
135 | (1) |
|
Adjusting the Data Model and Template for Core Data |
|
|
136 | (1) |
|
Getting Rid of Keys and Revising the Data Model |
|
|
137 | (1) |
|
Changing timeStamp to name |
|
|
137 | (1) |
|
Create a New Database on Your Device or Simulator |
|
|
138 | (1) |
|
Add the Score Table and Interface to the App |
|
|
138 | (1) |
|
Making Sure You Can Add New Users with + in the Master View Controller |
|
|
138 | (1) |
|
Working with the Detail View |
|
|
139 | (1) |
|
Working with the Detail View for Score |
|
|
139 | (2) |
|
Use NSManagedObject Subclasses |
|
|
141 | (1) |
|
Use a Table View Controller for DetailViewController |
|
|
141 | (1) |
|
Modify DetailViewController Code for DetailViewController |
|
|
142 | (1) |
|
Modify MasterViewController to Pass the User to DetailViewController |
|
|
143 | (1) |
|
|
144 | (1) |
Index |
|
145 | |