SlideShare a Scribd company logo
1 of 15
SQLite Database in
Android
Topics
• What is SQLite?
• How to install SQLite forAndroidStudio?
• How to implement SQLite in Android App?
• How to store data in SQLite database?
• Login and Registration App using SQLite Database.
What is SQLite?
•SQLite is a Open Source Database.
•SQLite supports standard relation database feature.
•It is a Serverless and Zero-configuration database
engine.
How to install SQLite for AndroidStudio?
• NO need to install SQLite externally .Android Studio has in built SQLite
database.
How to use SQLite in Android App?
• We can use SQLite database in yourAndroid App using some Pre-Define
classes.
• SQLiteOpenHelper is most commonly use class to connect your
Application with database.
• We have to extends this class in our Database class.
• This class is help to CRUD (Create Retrieve Update Delete).
Create ATable in Database
// SQL Statement to create a new database.
static final String DATABASE_CREATE = "create table "+"LOGIN"+
"( " +"ID"+" integer primary key autoincrement,"+ "USERNAME text,PASSWORD text); ";
How to store data in SQLite database?
In your database class:
public void insertEntry(String userName,String password)
{
ContentValues newValues = new ContentValues();
// Assign values for each row.
newValues.put("USERNAME", userName);
newValues.put("PASSWORD",password);
// Insert the row into your table
db.insert("LOGIN", null, newValues);
///Toast.makeText(context, “Reminder Is Successfully Saved”, Toast.LENGTH_LONG).show();
}
In DataInsert Class
loginDataBaseAdapter.insertEntry(userName, password);
How to check store data in SQLite?
• TO check store data you need to download SQL Browser .
THANKYOU

More Related Content

What's hot (20)

Layouts in android
Layouts in androidLayouts in android
Layouts in android
 
Android User Interface
Android User InterfaceAndroid User Interface
Android User Interface
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Android Data Persistence
Android Data PersistenceAndroid Data Persistence
Android Data Persistence
 
Android Networking
Android NetworkingAndroid Networking
Android Networking
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Sq lite database
Sq lite databaseSq lite database
Sq lite database
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
MYSQL - PHP Database Connectivity
MYSQL - PHP Database ConnectivityMYSQL - PHP Database Connectivity
MYSQL - PHP Database Connectivity
 
AndroidManifest
AndroidManifestAndroidManifest
AndroidManifest
 
Event handling
Event handlingEvent handling
Event handling
 
Java swing
Java swingJava swing
Java swing
 
sql function(ppt)
sql function(ppt)sql function(ppt)
sql function(ppt)
 
SQL Functions
SQL FunctionsSQL Functions
SQL Functions
 

Similar to SQLite database in android

Android App Development 05 : Saving Data
Android App Development 05 : Saving DataAndroid App Development 05 : Saving Data
Android App Development 05 : Saving DataAnuchit Chalothorn
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptxvishal choudhary
 
Sql data base
Sql data baseSql data base
Sql data baseAli Jafar
 
Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Khaled Anaqwa
 
Rajab Davudov - Android Database
Rajab Davudov - Android DatabaseRajab Davudov - Android Database
Rajab Davudov - Android DatabaseRashad Aliyev
 
SQLite in Flutter.pptx
SQLite in Flutter.pptxSQLite in Flutter.pptx
SQLite in Flutter.pptxNabin Dhakal
 
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenSony Suci
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Android webinar class_6
Android webinar class_6Android webinar class_6
Android webinar class_6Edureka!
 
How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?Paul Cook
 

Similar to SQLite database in android (20)

Android App Development 05 : Saving Data
Android App Development 05 : Saving DataAndroid App Development 05 : Saving Data
Android App Development 05 : Saving Data
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptx
 
Sql data base
Sql data baseSql data base
Sql data base
 
Fastest offline with SQLite
Fastest offline with SQLiteFastest offline with SQLite
Fastest offline with SQLite
 
SSDT unleashed
SSDT unleashedSSDT unleashed
SSDT unleashed
 
9 content-providers
9 content-providers9 content-providers
9 content-providers
 
Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)
 
Rajab Davudov - Android Database
Rajab Davudov - Android DatabaseRajab Davudov - Android Database
Rajab Davudov - Android Database
 
Android development beyond the basics
Android development   beyond the basicsAndroid development   beyond the basics
Android development beyond the basics
 
SQLite in Flutter.pptx
SQLite in Flutter.pptxSQLite in Flutter.pptx
SQLite in Flutter.pptx
 
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
Android webinar class_6
Android webinar class_6Android webinar class_6
Android webinar class_6
 
Apache DeltaSpike: The CDI Toolbox
Apache DeltaSpike: The CDI ToolboxApache DeltaSpike: The CDI Toolbox
Apache DeltaSpike: The CDI Toolbox
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
Notepad tutorial
Notepad tutorialNotepad tutorial
Notepad tutorial
 
Sqlite Multiple Table
Sqlite Multiple TableSqlite Multiple Table
Sqlite Multiple Table
 
How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?
 
android ch5.pptx
android ch5.pptxandroid ch5.pptx
android ch5.pptx
 

SQLite database in android

  • 2. Topics • What is SQLite? • How to install SQLite forAndroidStudio? • How to implement SQLite in Android App? • How to store data in SQLite database? • Login and Registration App using SQLite Database.
  • 3. What is SQLite? •SQLite is a Open Source Database. •SQLite supports standard relation database feature. •It is a Serverless and Zero-configuration database engine.
  • 4. How to install SQLite for AndroidStudio? • NO need to install SQLite externally .Android Studio has in built SQLite database.
  • 5. How to use SQLite in Android App? • We can use SQLite database in yourAndroid App using some Pre-Define classes. • SQLiteOpenHelper is most commonly use class to connect your Application with database. • We have to extends this class in our Database class. • This class is help to CRUD (Create Retrieve Update Delete).
  • 6. Create ATable in Database // SQL Statement to create a new database. static final String DATABASE_CREATE = "create table "+"LOGIN"+ "( " +"ID"+" integer primary key autoincrement,"+ "USERNAME text,PASSWORD text); ";
  • 7. How to store data in SQLite database? In your database class: public void insertEntry(String userName,String password) { ContentValues newValues = new ContentValues(); // Assign values for each row. newValues.put("USERNAME", userName); newValues.put("PASSWORD",password); // Insert the row into your table db.insert("LOGIN", null, newValues); ///Toast.makeText(context, “Reminder Is Successfully Saved”, Toast.LENGTH_LONG).show(); }
  • 9. How to check store data in SQLite? • TO check store data you need to download SQL Browser .
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.