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

Database file information


The sqlite_master view outlines the details of all the database objects within SQLite. In SQLite, the maximum size for a database would be 2,147,483,646 pages at 65,536 bytes per page or 140,737,488,224,256 bytes (about 140 terabytes), While the minimum size for an SQLite database is a single 512-byte page. The best way to see which tables exist is by performing an SQL statement on the master table, as shown in the following set of commands:

Effectively, download the sqlite3_analyzer program from the SQLite website. The program performs many functions, such as interrogating the database file and outputs a summary in text format showing the database structure, its environment, tables, indexes, the page sizes, entries, storage in bytes consumed, pages used, overflow pages, and unused bytes on primary pages.

The amount of detail available is impressive and useful when it comes to analyzing resources, components, and structure of a database.

The sqlite3_analyzer program...