Presentation is loading. Please wait.

Presentation is loading. Please wait.

Persistance Android. Adding Persistance SQL Refresher Understand how to create and migrate SQLLite database with android APIs. – Get all tasks – Add a.

Similar presentations


Presentation on theme: "Persistance Android. Adding Persistance SQL Refresher Understand how to create and migrate SQLLite database with android APIs. – Get all tasks – Add a."— Presentation transcript:

1 Persistance Android

2 Adding Persistance SQL Refresher Understand how to create and migrate SQLLite database with android APIs. – Get all tasks – Add a task – Update a task – Delete a task

3 Task Manager

4 Cast of Characters SQLLiteDatabase- an API to a local SQLIte database file. SQLLiteOpenHelper – a utility class that make it easy to create and maintain a local SQLite database.

5 Refactoring Code refactoring is a "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior“. http://en.wikipedia.org/wiki/Code_refactoring

6 SQLite in Android SQLite is available on every Android device. Using an SQLite database in Android does not require any database setup or administration. You only have to define the SQL statements for creating and updating the database. Afterwards the database is automatically managed for you by the Android platform. More help http://answers.oreilly.com/topic/1914-what-is- sqlite/ http://answers.oreilly.com/topic/1914-what-is- sqlite/

7 What is SQLite SQLite is an Open Source Database which is embedded into Android. SQLite supports standard relational database features like SQL syntax, transactions and prepared statements. In addition it requires only little memory at runtime (approx. 250 KByte). Unlike client–server database management systems, the SQLite engine has no standalone processes with which the application program communicatesclient–server processes

8 Loading Task Step one

9 Step One –Loading Tasks

10 How a SQLLite OpenHelper works

11 Creating a Database Table

12 Getting a data from Database

13 Loading Tasks Steps

14 Step 2 Adding a task

15 Adding Tasks

16 Adding Data to a Database

17 Step 3 Updating a task

18 Step 3-Completing a task

19 Saving Data to Database

20 Completing a task

21 Step 4 Deleting Task

22 Step 4-Remove Completed Task

23 Removing Data from Database

24 Remove Completed Tasks Steps

25 DB desing and implementation. SQLITE DATABASE APPLICATION 1)Open DB 2)Close DB 3)Insert and Remove objects In a type safe way DBAdatper Class That enbales you to talk to Sqlite database DBHelper Class Create Tables Upgrade tables DBHELPER Class tasks


Download ppt "Persistance Android. Adding Persistance SQL Refresher Understand how to create and migrate SQLLite database with android APIs. – Get all tasks – Add a."

Similar presentations


Ads by Google