Learning SQLite for iOS
eBook - ePub

Learning SQLite for iOS

Gene Da Rocha, MSc, BSc (Hons)

Compartir libro
  1. 154 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Learning SQLite for iOS

Gene Da Rocha, MSc, BSc (Hons)

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Extend SQLite with mobile development skills to build great apps for iOS devices

About This Book

  • Implement Swift code using SQLite statements
  • Learn the background to SQL and SQLite for mobile development, its statements, and command features through practical examples
  • Extend the standard SQLite functionality and increase your software creation portfolio

Who This Book Is For

This book is intended for those who want to learn about SQLite and how to develop apps in Swift or HTML5 using SQLite. Whether you are an expert Objective-C programmer or new to this platform, you'll learn quickly, grasping the code in real-world apps to use Swift.

What You Will Learn

  • Explore Swift's basic language statements
  • Connect to SQLite and execute SQL statements
  • Extend the SQLite language to create your own software extensions
  • Use HTML5 with Phonegap on iOS
  • Set up a Swift project using XCode with SQLite
  • Administer SQLite databases in an easy and effective way

In Detail

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.

Style and approach

This book is a practical and comprehensive guide to developing applications using SQLite and iOS.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Learning SQLite for iOS un PDF/ePUB en línea?
Sí, puedes acceder a Learning SQLite for iOS de Gene Da Rocha, MSc, BSc (Hons) en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in SQL. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2016
ISBN
9781785288975
Edición
1

Learning SQLite for iOS


Table of Contents

Learning SQLite for iOS
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introduction to SQL and SQLite
About SQL
Where does SQLite stand in today's industry?
iOS with SQLite
Embedded databases
The architecture of the SQLite database
Features
The advantages of using SQLite
Working with SQLite
The examples of using SQLite with iOS
Summary
2. Database Design Concepts
Database essentials
Reasons for using SQLite
Database connections
Preparing queries
Parameterized SQL
Error handling
Queries within the db.exec statement
SQL injection attacks
Creating user-defined functions
Transactions and locks
Transactions – reading/writing
Designing for SQLite
Summary
3. Administering the Database
Creating a database
Creating a table
Inserting data
Selecting data
Creating an index
Exporting data
Viewing database schema data
Index data
Schema data
Backing up the database
Database tools
Database file information
Summary
4. Essentials of SQL
Transactions
Query plan
SQL basics
Insert with a subselect clause
Update with a subselect clause
Select with a subselect clause
Data integrity
Default values
Constraint checking
Foreign keys
Updating Views
Index use
Triggers
Synchronous writes
Database locking and deadlocks
FMDB SQLite wrapper
Database creation and opening
SQL in iOS
Summary
5. Exposing the C API
SQLite C components' functionality
sqlite3_open()
sqlite3_prepare()
sqlite3_step()
sqlite3_column()
sqlite3_finalize()
sqlite3_close()
Using the C API with the open database statement
Using Swift with the open database statement
load_extension()
sqlite3_exec()
sqlite3_config()
The prepare statement
Summary
6. Using Swift with iOS and SQLite
Basic requirements
Starting an Xcode Project with Swift
Using the SQLite 3 Library
Using FMDB
Summary
7. iOS Development with PhoneGap and HTML5
HTML5 and PhoneGap development
An HTML5 framework
Hybrid applications
An Xcode project with PhoneGap, HTML5, and Swift
Summary
8. More Features and Advances in SQLite
PhoneGap plugins
Extensions to the C API
Write Ahead Logging with SQLite
The B-tree usage with SQLite
Creating a simple Swift
Summary
Index

Learning SQLite for iOS

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2016
Production reference: 1180316
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-897-5
www.packtpub.com

Credits

Author
Gene Da Rocha, MSc, BSc (Hons)
Reviewers
Alvaro Franco
Ting Xiao
Acquisition Editors
Larissa Pinto
Subho Gupta
Content Development Editor
Rashmi Suvarna
Technical Editor
Anushree Arun Tendulkar
Copy Editors
Charlotte Carneiro
Yesha Gangani
Ameesha Green
Project Coordinator
Judie Jose
Proofreader
Safis Editing
Indexer
Tejal Daruwale Soni
Graphics
Abhinash Sahu
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat

About the Author

Gene Da Rocha, MSc, BSc (Hons) in mobile and computer science is an experienced IT professional with over 25 years in the IT industry. He has worked for a variety of companies nationally and internationally, in different industries including corporate, start-up, pharmaceutical, finance, banking, and the NHS.
Gene is also the owner and founder of a mobile solutions company, Voxstar (www.voxstar.com), based in London and Buckinghamshire. He comes from a programming and development background, and has worked with database technology, iOS, Android, Windows mobile, and a variety of other technologies.
He has been helping and advising, programming, and recently testing software for a number of companies such as DigitasLBI, Oxfam, News UK, QAWorks, Reuters, and the Association for Project Management, among many others.

About the Reviewer

Alvaro Franco is an iOS engineer and web developer. He has contributed to the iOS and OS X open source community. He has also been a part of Aluana, building Mindrop, and companies such as Mozilla, where he contributed to delivering Firefox for iOS. Alvaro is also a motorsport fan and guitarist.
Ting Xiao, is a frontend developer focusing on how to make things good on the webpage; she is also working on the development of a mobile app simultaneously. She is interested in any brain technology. According to Ting, thanks to the technology, we can know this world much better.

www.PacktPub.com

eBooks, discount offers, and more

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
eBooks, discount offers, and more
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

  • Fully searchab...

Índice