Contents
Chapter 1: Getting Up to Speed with Databases and SQLite
Databases Are Structured and Organized
Relational Databases and SQL to the Rescue
Looking Inside a Relational Table and Query
Looking at Other Query Choices
Chapter 2: Understanding What SQLite Is
Putting a Database in Perspective
SQLite Is Designed for a Single User
SQLite Supports Transactions and Is ACID-Compliant
Chapter 3: Using SQLite Basics: Storing and Retrieving Data
Run sqlite3 and Let It Create a New Database
Create and Name a New sqlite3 Database
Run sqlite3 and Open an Existing Database
Experimenting with SQLite Syntax
Exploring Your sqlite3 Database with a Graphical SQLite Editor
Using a Graphical SQLite Editor
Using a Graphical User Interface
Using a Graphical User Interface
Chapter 4: Working with the Relational Model and SQLite
Using Aliases to Identify Multiple Tables in a SELECT Statement
Chapter 5: Using SQLite Features—What You Can Do with SELECT Statements
Ordering Data Makes It Easier to Use
Grouping Data Can Consolidate It
Chapter 6: Using SQLite with PHP
Putting PHP and SQLite Together: The Basics
Verifying PHP in Your Environment
Connecting to Your SQLite Database
2. Create and Prepare the Query
Chapter 7: Using SQLite with Android/Java
Integrating SQLite with Any Operating System, Framework, or Language
Chapter 8: Using SQLite with Core Data (iOS and OS X)
Introducing the Core Data Framework
Using the Core Data Model Editor
Chapter 9: Using SQLite/Core Data with Swift (iOS and OS X)
Looking at the Core Data Stack
Fetching Data to the Core Data Stack
Passing a Managed Object Context to a View Controller in iOS
Setting Up the Core Data Stack in AppDelegate for iOS
Setting Up the Core Data Stack in AppDelegate for OS X
Creating a Fetch Request in iOS
Saving the Managed Object Context
Creating a New NSManagedObject Instance
Working with a Subclass of NSManagedObject
Chapter 10: Using SQLite/Core Data with Objective-C (iOS and Mac)
Looking at the Core Data Stack
Fetching Data to the Core Data Stack
Objective-C Is a Messaging Language
Ending Statements with a Semicolon
Separating Headers and Bodies in Objective-C
Looking at Method Declarations
Structuring a Core Data App with Objective-C
Passing a Managed Object Context to a View Controller in iOS
Setting up the Core Data Stack in AppDelegate for iOS
Setting Up the Core Data Stack in AppDelegate for OS X
Creating a Fetch Request in iOS
Saving the Managed Object Context
Chapter 11: Using the Simple Database with a PHP Web Site
Looking at the Basic PHP/SQLite Structure
Building the Drop-Down Selection List (phpsql1.php )
Showing the Selected Data (phpsql2.php )
Adding New Data (phpsql3.php )
Using Try/Catch Blocks with PHP and PDO
Chapter 12: Using the Simple Database with a Core Data/iOS App
Adjusting the Data Model and Template for Core Data
Getting Rid of Keys and Revising the Data Model
Create a New Database on Your Device or Simulator
Add the Score Table and Interface to the App
Making Sure You Can Add New Users with + in the Master View Controller
Working with the Detail View for Score
Use NSManagedObject Subclasses
Use a Table View Controller for DetailViewController
Modify DetailViewController Code for DetailViewController
Modify MasterViewController to Pass the User to DetailViewController
18.116.60.62