Contents

About the Author

About the Technical Reviewers

Acknowledgments

Introduction

image Chapter 1: Getting Up to Speed with Databases and SQLite

Moving Beyond Big

Databases Are Structured and Organized

Databases Are Smart

Relational Databases and SQL to the Rescue

Looking Inside a Relational Table and Query

Basic Query Structure

Looking at Other Query Choices

image Chapter 2: Understanding What SQLite Is

Putting a Database in Perspective

Defining SQLite

SQLite Is Designed for a Single User

SQLite Is Self-Contained

SQLite Supports Transactions and Is ACID-Compliant

image Chapter 3: Using SQLite Basics: Storing and Retrieving Data

Using sqlite3

Run sqlite3 and Let It Create a New Database

Create and Name a New sqlite3 Database

Delete the Database

Run sqlite3 and Open an Existing Database

Experimenting with SQLite Syntax

Exploring Your sqlite3 Database with a Graphical SQLite Editor

Creating a Table

Using a Graphical SQLite Editor

Creating Table Columns

Using SQLite3

Inserting Data into a Table

Using a Graphical User Interface

Using SQLite3

Retrieving Data

Using a Graphical User Interface

Using sqlite3

Deleting Data

Summary

image Chapter 4: Working with the Relational Model and SQLite

Building the Users Table

Building the Scores Table

Relating the Tables

Using Aliases to Identify Multiple Tables in a SELECT Statement

Using the rowid Primary Key

Changing a Name in One Table

Using a Foreign Key

Joining the Tables

Summary

image Chapter 5: Using SQLite Features—What You Can Do with SELECT Statements

Looking at the Test Data

Ordering Data Makes It Easier to Use

Grouping Data Can Consolidate It

Using Variables in Queries

Summary

image Chapter 6: Using SQLite with PHP

Putting PHP and SQLite Together: The Basics

Verifying PHP in Your Environment

Preparing the SQLite Database

Connecting to Your SQLite Database

1. Create a New PDO Object

2. Create and Prepare the Query

3. Execute the Query

4. Fetch the Results

5. Use the Results

Summary

image Chapter 7: Using SQLite with Android/Java

Integrating SQLite with Any Operating System, Framework, or Language

Using Android and SQLite

Using the Static Values

Extend SQliteOpenHelper

Summary

image Chapter 8: Using SQLite with Core Data (iOS and OS X)

Introducing the Core Data Framework

Using the Core Data Model Editor

Using Entities

Working with Attributes

Managing Relationships

Summary

image 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

Structuring a Core Data App

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

Saving in iOS

Saving in OS X

Working with NSManagedObject

Creating a New NSManagedObject Instance

Working with a Subclass of NSManagedObject

Summary

image 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 Highlights

Using Quoted Strings

Objective-C Is a Messaging Language

Using Brackets in Objective-C

Chaining Messages

Ending Statements with a Semicolon

Separating Headers and Bodies in Objective-C

Looking at Method Declarations

Handling nil in Objective-C

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

Saving in iOS

Saving in OS X

Summary

image Chapter 11: Using the Simple Database with a PHP Web Site

Reviewing the Database

Previewing the Web Site

Implementing the 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

Summary

image Chapter 12: Using the Simple Database with a Core Data/iOS App

The Story Continues…

Adjusting the Data Model and Template for Core Data

Getting Rid of Keys and Revising the Data Model

Changing timeStamp to name

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

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

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.60.62