Learning SQLite for iOS
eBook - ePub

Learning SQLite for iOS

Gene Da Rocha, MSc, BSc (Hons)

Condividi libro
  1. 154 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Learning SQLite for iOS

Gene Da Rocha, MSc, BSc (Hons)

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul 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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Learning SQLite for iOS è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Learning SQLite for iOS di Gene Da Rocha, MSc, BSc (Hons) in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in SQL. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2016
ISBN
9781785288975
Edizione
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...

Indice dei contenuti