Book Image

Learning SQLite for iOS

By : Gene Da Rocha
Book Image

Learning SQLite for iOS

By: Gene Da Rocha

Overview of this book

The ability to use SQLite with iOS provides a great opportunity to build amazing apps. Apple's iOS SDK provides native support for SQLite databases. This combination offers the potential to create powerful, data-persistent applications. This book starts with the architecture of SQLite database and introduces you to concepts in SQL . You will find yourself equipped to design your own database system, administer it, and maintain it. Further, you will learn how to operate your SQLite databases smoothly using SQL commands. You will be able to extend the functionality of SQLite by using its vast arsenal of C API calls to build some interesting, exciting, new, and intelligent data-driven applications. Understand how Xcode, HTML5, and Phonegap can be used to build a cross-platform modern app which can benefit from all these technologies - all through creating a complete, customizable application skeleton that you can build on for your own apps.
Table of Contents (15 chapters)
Learning SQLite for iOS
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

SQLite C components' functionality


SQLite has been written using C language, and its creator has enabled it to be exposed and has enhanced its functionality by having an API, the C API. In general, SQLite has many different API calls, for example, about 200 APIs for different functionalities. As a programmer, you may find it hard to accept, but the APIs are designed for specific tasks, for example, the sqlite3_reset() function clears the object connected with the SQLite prepared statement and resets it to its original state and value.

To start with, the two core objects are the database connection and the prepared statement objects. The order and the types of functions give you an idea of how to write an SQL transaction to connect to a database, create a table and an index, and populate it with an insert statement. These functions form the main elements of the SQL-C interface functions, allowing data to be connected and passed from code to SQLite.

sqlite3_open()

The sqlite3_open(const char...