Feiler | Introducing SQLite for Mobile Developers | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 156 Seiten

Feiler Introducing SQLite for Mobile Developers


1. ed
ISBN: 978-1-4842-1766-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

E-Book, Englisch, 156 Seiten

ISBN: 978-1-4842-1766-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



This brief book is an introduction to SQLite for both iOS and Android developers.  The book includes an optional introduction to SQL, a discussion of when to use SQLite,  and chapters devoted to using SQLite with the most likely programming languages and then goes through adding a simple database to an Android or iOS app and finally a chapter on managing the app's life cycle.
What You Will Learn:
•The basics of SQLite•The SQL you need to use SQLite effectively•How to integrate a database into your mobile app.•How to maintain the app
Who this book is for:
This book is for Android or iOS developers who wish to use a lightweight but flexible database for their applications. It mobile development experience but does not assume anything but very basic database knowledge.


Jesse Feiler is a developer, consultant, and author specializing in database technologies and location-based apps. He has worked with databases and data management on computers from mainframes to iPhone, iPad, and Apple TV using data management tools from DB2 (IBM) and DMSII (Burroughs) to Enterprise Objects Framework and Core Data, MySQL, Oracle,  and, of course, MySQL. 
In the early days of the web, he built the page caching mechanism for the Prodigy web browser for Mac using a relational database library similar in some ways to SQLite.
He is the creator of Minutes Machine the meeting management app, as well as Saranac River Trail app a guide to the Trail that includes location-based updates as well as social media tools. His apps are available in the App Store and are published by Champlain Arts Corp (champlainarts-dot-com). As a consultant; he has worked with small businesses and nonprofits on projects such as production control, publishing, and project management usually involving FileMaker.
His books include:•Swift for Dummies (Wiley, 2014)•iOS App Development for Dummies (Wiley, 2014)•iWork  for Dummies (Wiley, 2012)
He is heard regularly on WAMC Public Radio for the Northeast's The Roundtable. founder of Friends of Saranac River Trail, Inc. A native of Washington DC, he has lived in New York City and currently lives in Plattsburgh NY.
He can be reached at northcountryconsulting-dot-com (consulting) and champlainarts-dot-com (app development).


Feiler Introducing SQLite for Mobile Developers jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Contents at a Glance;4
2;Contents;5
3;About the Author;11
4;About the Technical Reviewers;12
5;Acknowledgments;13
6;Introduction;14
7;Chapter 1: Getting Up to Speed with Databases and SQLite;15
7.1; Moving Beyond Big;15
7.1.1; Databases Are Structured and Organized;16
7.1.2; Databases Are Smart;16
7.1.2.1;Writing Code Is Just the Beginning;17
7.1.2.2;Parlez-vous Python? Sprechen Sie Scala?;17
7.2; Relational Databases and SQL to the Rescue;18
7.3; Looking Inside a Relational Table and Query;19
7.3.1; Basic Query Structure;20
7.3.1.1;SQL Action: SELECT;20
7.3.1.2;SQL Data to Select: List of Column Names;20
7.3.1.3;SQL Data Source: Table Name;20
7.3.1.4;SQL Condition: WHERE;21
7.3.2; Looking at Other Query Choices;21
8;Chapter 2: Understanding What SQLite Is;22
8.1; Putting a Database in Perspective;22
8.2; Defining SQLite;23
8.2.1; SQLite Is Designed for a Single User;24
8.2.1.1;Single User Doesn’t Mean Single-Thread;24
8.2.1.2;Using SQLite with Multiple Users;24
8.2.2; SQLite Is Self-Contained;25
8.2.2.1;Self-Contained Code;25
8.2.2.2;Self-Contained Data;26
8.2.3; SQLite Supports Transactions and Is ACID-Compliant;26
9;Chapter 3: Using SQLite Basics: Storing and Retrieving Data;28
9.1; Using sqlite3;29
9.1.1; Run sqlite3 and Let It Create a New Database;29
9.1.2; Create and Name a New sqlite3 Database;30
9.1.3; Delete the Database;30
9.1.4; Run sqlite3 and Open an Existing Database;30
9.2; Experimenting with SQLite Syntax;31
9.3; Exploring Your sqlite3 Database with a Graphical SQLite Editor;32
9.4; Creating a Table;34
9.4.1; Using a Graphical SQLite Editor;34
9.4.2; Creating Table Columns;35
9.4.3; Using SQLite3;37
9.5; Inserting Data into a Table;37
9.5.1; Using a Graphical User Interface;37
9.5.2; Using SQLite3;39
9.6; Retrieving Data;39
9.6.1; Using a Graphical User Interface;39
9.6.2; Using sqlite3;40
9.7; Deleting Data;40
9.8; Summary;40
10;Chapter 4: Working with the Relational Model and SQLite;41
10.1; Building the Users Table;42
10.2; Building the Scores Table;43
10.3; Relating the Tables;44
10.3.1; Using Aliases to Identify Multiple Tables in a SELECT Statement;44
10.3.2; Using the rowid Primary Key;45
10.3.3; Changing a Name in One Table;46
10.3.4; Using a Foreign Key;46
10.4; Joining the Tables;49
10.5; Summary;50
11;Chapter 5: Using SQLite Features—What You Can Do with SELECT Statements;51
11.1; Looking at the Test Data;52
11.1.1; Ordering Data Makes It Easier to Use;52
11.1.2; Grouping Data Can Consolidate It;53
11.2; Using Variables in Queries;54
11.3; Summary;55
12;Chapter 6: Using SQLite with PHP;56
12.1; Putting PHP and SQLite Together: The Basics;57
12.1.1; Verifying PHP in Your Environment;57
12.1.2; Preparing the SQLite Database;58
12.2; Connecting to Your SQLite Database;61
12.2.1; 1. Create a New PDO Object;62
12.2.2; 2. Create and Prepare the Query;63
12.2.3; 3. Execute the Query;63
12.2.4; 4. Fetch the Results;63
12.2.5; 5. Use the Results;63
12.3; Summary;65
13;Chapter 7: Using SQLite with Android/Java;66
13.1; Integrating SQLite with Any Operating System, Framework, or Language;66
13.2; Using Android and SQLite;68
13.2.1; Using the Static Values;68
13.2.1.1;Static Values May Be in the APIs;68
13.2.1.2;Static Values May Be in Imported Files.;68
13.2.1.3;Static Values May Be in the Main File;68
13.2.2; Extend SQliteOpenHelper;69
13.3; Summary;71
14;Chapter 8: Using SQLite with Core Data (iOS and OS X);72
14.1; Introducing the Core Data Framework;73
14.2; Using the Core Data Model Editor;74
14.2.1; Using Entities;77
14.2.2; Working with Attributes;79
14.2.3; Managing Relationships;80
14.3; Summary;84
15;Chapter 9: Using SQLite/Core Data with Swift (iOS and OS X);85
15.1; Looking at the Core Data Stack;85
15.2; Fetching Data to the Core Data Stack;86
15.3; Structuring a Core Data App;86
15.3.1; Passing a Managed Object Context to a View Controller in iOS;87
15.3.2; Setting Up the Core Data Stack in AppDelegate for iOS;88
15.3.2.1;Creating applicationDocumentsDirectory in iOS;88
15.3.2.2;Creating managedObjectModel in iOS;88
15.3.2.3;Creating persistentStoreCoordinator in iOS;89
15.3.2.4;Creating managedObjectContext in iOS;90
15.3.3; Setting Up the Core Data Stack in AppDelegate for OS X;91
15.3.3.1;Creating application DocumentsDirectory in OS X;91
15.3.3.2;Creating managedObjectModel in OS X;92
15.3.3.3;Creating persistentStoreCoordinator in OS X;92
15.3.3.4;Creating managedObjectContext in OS X;94
15.4; Creating a Fetch Request in iOS;94
15.5; Saving the Managed Object Context;95
15.5.1; Saving in iOS;95
15.5.2; Saving in OS X;96
15.6; Working with NSManagedObject;97
15.6.1; Creating a New NSManagedObject Instance;98
15.7; Working with a Subclass of NSManagedObject;100
15.8; Summary;105
16;Chapter 10: Using SQLite/Core Data with Objective-C (iOS and Mac);106
16.1; Looking at the Core Data Stack;107
16.2; Fetching Data to the Core Data Stack;108
16.3; Objective-C Highlights;108
16.3.1; Using Quoted Strings;108
16.3.2; Objective-C Is a Messaging Language;108
16.3.3; Using Brackets in Objective-C;108
16.3.4; Chaining Messages;109
16.3.5; Ending Statements with a Semicolon;109
16.3.6; Separating Headers and Bodies in Objective-C;109
16.3.7; Looking at Method Declarations;110
16.4; Handling nil in Objective- C;110
16.5; Structuring a Core Data App with Objective-C;111
16.5.1; Passing a Managed Object Context to a View Controller in iOS;111
16.5.2; Setting up the Core Data Stack in AppDelegate for iOS;112
16.5.2.1;Creating the App Delegate Header;113
16.5.2.2;Synthesizing Properties in AppDelegate. m;113
16.5.2.3;Creating applicationDocumentsDirectory in iOS;113
16.5.2.4;Creating managedObjectModel in iOS and OS X;114
16.5.2.5;Creating persistentStoreCoordinator in iOS;114
16.5.2.6;Creating managedObjectContext in iOS;115
16.5.3; Setting Up the Core Data Stack in AppDelegate for OS X;116
16.5.3.1;Creating applicationDocumentsDirectory in OS X;116
16.5.3.2;Creating managedObjectModel in OS X;117
16.5.3.3;Creating persistentStoreCoordinator in OS X;117
16.5.3.4;Creating managedObjectContext in OS X;118
16.6; Creating a Fetch Request in iOS;119
16.7; Saving the Managed Object Context;120
16.7.1; Saving in iOS;120
16.7.2; Saving in OS X;121
16.8; Working with NSManagedObject;121
16.8.1; Creating a New NSManagedObject Instance;122
16.9; Working with a Subclass of NSManagedObject;124
16.10; Summary;129
17;Chapter 11: Using the Simple Database with a PHP Web Site;130
17.1; Reviewing the Database;130
17.2; Previewing the Web Site;133
17.3; Implementing the PHP Web Site;136
17.3.1; Looking at the Basic PHP/SQLite Structure;137
17.3.2; Building the Drop-Down Selection List ( phpsql1.php);139
17.3.3; Showing the Selected Data ( phpsql2.php);140
17.3.4; Adding New Data ( phpsql3.php);142
17.4; Using Try/Catch Blocks with PHP and PDO;143
17.5; Summary;143
18;Chapter 12: Using the Simple Database with a Core Data/iOS App;144
18.1; The Story Continues…;144
18.2; Adjusting the Data Model and Template for Core Data;145
18.2.1; Getting Rid of Keys and Revising the Data Model;146
18.2.2; Changing timeStamp to name;146
18.2.3; Create a New Database on Your Device or Simulator;147
18.3; Add the Score Table and Interface to the App;147
18.3.1; Making Sure You Can Add New Users with + in the Master View Controller;147
18.3.2; Working with the Detail View;148
18.4; Working with the Detail View for Score;148
18.4.1; Use NSManagedObject Subclasses;150
18.4.2; Use a Table View Controller for DetailViewController;150
18.4.3; Modify DetailViewController Code for DetailViewController;151
18.4.3.1;Using the Subclasses;151
18.4.3.2;Change detail to detailUser;152
18.4.3.3;Change configureCell to Use the Subclass;152
18.4.4; Modify MasterViewController to Pass the User to DetailViewController;152
18.5; Summary;153
19;Index;154



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.