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

Synchronous writes


Synchronous writes are part of the SQL engine, which will ensure that data changes are written to the disk area, as required, for transaction reasons and the way databases work. In the case of SQLite, these operate under different statuses or settings of NORMAL, FULL, or OFF. For performance reasons, SQLite commits can be switched off by the DBA as required.

The OFF setting carries on its tasks quickly without much slowing down, minimal interruptions, and increased performance. However, in the case of a database crash, the data integrity will remain okay, but in the case of system crash and power loss, there is a good chance that corruption of the database itself may occur. There are performance gains to be made, but there are also risks associated with this move.

The FULL setting has to ensure that data is saved to disk properly and in good time before carrying on. This method is not good for performance, but is the most robust and the safest. If there are data corruptions...