SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
Android Camp
  Mohamed Ibrahim
   Mobile Developer
      Core-Member
Of
            R ev iew      al
      ui ck           ent
 A  Q         un  dam
       as e F
Da tab
Type of Database in Android
● Internal Database

       like(Sqlite)

● External Database

       like(Content Provider)
URI

"File://[package]/[res id]"




"File://[package]/[res type]/[res name]"
Internal Database


● Preferences

● Files

● SQLite

● Network
What is SQLite !
                         
●  SQLite is an open source Database
●  Supports standard relational Database
●  Requires only little memory at runtime
   (250KB)
● Support the data types :
   ○ TEXT
   ○ INTEGER
   ○ REAL
● SQLite doesn't validate if the types written in
  in the columns are actually of the defined
type
Why SQLite !!
                                  Si
                                     ng
          rce                          le
    n sou                                   Fil
                                               e
O pe
                less than 250KB


   Faster

                   no setup or administration
SQLite Architecture

● Package
  ○ android.database.sqlite


● SQLiteDatabase
  ○ insert _ delete _ update _query _ execSQL


● SQLiteOpenHelper
  ○   Create
  ○   Upgrade
  ○   open
  ○   close
Let's Code
Now
SQLiteOpenHelper
subclass of SQLiteDatabase used to create ,upgrade,open and close database.
 ● constructor parameters
     ○ Context
     ○ String name //database name
     ○ CursorFactory factory // null
     ○ version //data base version
we delete all constructor parameters except context but we wrote database
name ,factory and version in the super of SQLiteDatabase

●   Have 2 basis methods
    ○   onCreate      //create our database and take one parameter
                       //(SQLiteDatabase)
    ○   onUpgrade //used when we want to add new column or table
                   //it take 3 parameter (SQLiteDatabas,old,new version)
SQLiteDatabase
● Exposes methods to manage a SQLite DataBase:

     ○ insert
     insert(String tableName,String nullColumnHack,ContentValues values)
     ○ delete
     delete(String tableName,String whereClause,String[] whereArgs)
     ○ update
     update(String tableName,ContentValues values,String whereClause,String
[]
     whereArgs )
     ○ execSQL
     execSQL(String sql)
     ○ query
     query(String tableName, String[] columns,String selection,String[ ]
     selectionArg,String groupby,String having,String orderBy)
Cursor




         moveToFirst
Devmix
                               ssion on
                  bout this se
Wait a rticle a
website
                              mix.org
                       www.dev
Thanks



*__^

Más contenido relacionado

La actualidad más candente

Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...Dave Stokes
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseDave Stokes
 
Mule json transformers
Mule json transformersMule json transformers
Mule json transformersveena naresh
 
JSON Processing and mule
JSON Processing and muleJSON Processing and mule
JSON Processing and muleSanthosh Gowd
 
Alternatives to Relational Databases
Alternatives to Relational DatabasesAlternatives to Relational Databases
Alternatives to Relational DatabasesAdam Hutson
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & IntroductionJerwin Roy
 
working with database using mysql
working with database using mysql working with database using mysql
working with database using mysql Subhasis Nayak
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruRavikumar Nandigam
 
Compiling EdgeQL
Compiling EdgeQLCompiling EdgeQL
Compiling EdgeQLEdgeDB
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryAlexandre Morgaut
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 
MySQL Workbench for DFW Unix Users Group
MySQL Workbench for DFW Unix Users GroupMySQL Workbench for DFW Unix Users Group
MySQL Workbench for DFW Unix Users GroupDave Stokes
 
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...South Tyrol Free Software Conference
 
BITS: Introduction to relational databases and MySQL - SQL
BITS: Introduction to relational databases and MySQL - SQLBITS: Introduction to relational databases and MySQL - SQL
BITS: Introduction to relational databases and MySQL - SQLBITS
 

La actualidad más candente (19)

Rails meets no sql
Rails meets no sqlRails meets no sql
Rails meets no sql
 
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational Database
 
Mule json transformers
Mule json transformersMule json transformers
Mule json transformers
 
JSON Processing and mule
JSON Processing and muleJSON Processing and mule
JSON Processing and mule
 
Cassandra
CassandraCassandra
Cassandra
 
Postgres level up
Postgres level upPostgres level up
Postgres level up
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Alternatives to Relational Databases
Alternatives to Relational DatabasesAlternatives to Relational Databases
Alternatives to Relational Databases
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & Introduction
 
working with database using mysql
working with database using mysql working with database using mysql
working with database using mysql
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
Compiling EdgeQL
Compiling EdgeQLCompiling EdgeQL
Compiling EdgeQL
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
MySQL Workbench for DFW Unix Users Group
MySQL Workbench for DFW Unix Users GroupMySQL Workbench for DFW Unix Users Group
MySQL Workbench for DFW Unix Users Group
 
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
 
BITS: Introduction to relational databases and MySQL - SQL
BITS: Introduction to relational databases and MySQL - SQLBITS: Introduction to relational databases and MySQL - SQL
BITS: Introduction to relational databases and MySQL - SQL
 

Destacado

cloud for entrepreneur
cloud for entrepreneurcloud for entrepreneur
cloud for entrepreneurDevMix
 
Connected Bikes: Connecting riders to their communities
Connected Bikes: Connecting riders to their communitiesConnected Bikes: Connecting riders to their communities
Connected Bikes: Connecting riders to their communitiesLouis P. Huard
 
In Search of the Perfect Post
In Search of the Perfect PostIn Search of the Perfect Post
In Search of the Perfect PostMeera Jadeja
 
DonorPro WebSolutions Portfolio Tour
DonorPro WebSolutions Portfolio TourDonorPro WebSolutions Portfolio Tour
DonorPro WebSolutions Portfolio TourSalsa Labs, Inc.
 
წალენჯიხის ტურისტული რესურსები
წალენჯიხის ტურისტული რესურსებიწალენჯიხის ტურისტული რესურსები
წალენჯიხის ტურისტული რესურსებიGocha Sharvashidze
 
ანი ოქროჭელიძე მე 10 კლასი პომპეი
ანი ოქროჭელიძე მე 10 კლასი პომპეიანი ოქროჭელიძე მე 10 კლასი პომპეი
ანი ოქროჭელიძე მე 10 კლასი პომპეიTamta Gachechiladze
 

Destacado (20)

Tech computer
Tech computerTech computer
Tech computer
 
Shelter of Hope ministries
Shelter of Hope ministriesShelter of Hope ministries
Shelter of Hope ministries
 
cloud for entrepreneur
cloud for entrepreneurcloud for entrepreneur
cloud for entrepreneur
 
CLIF Notes July 2012
CLIF Notes July 2012CLIF Notes July 2012
CLIF Notes July 2012
 
Media evaluation
Media evaluationMedia evaluation
Media evaluation
 
Community Leaders Information Forum: Dec 2012 Notes
Community Leaders Information Forum: Dec 2012 NotesCommunity Leaders Information Forum: Dec 2012 Notes
Community Leaders Information Forum: Dec 2012 Notes
 
Connected Bikes: Connecting riders to their communities
Connected Bikes: Connecting riders to their communitiesConnected Bikes: Connecting riders to their communities
Connected Bikes: Connecting riders to their communities
 
Dj
DjDj
Dj
 
April 18, 2013 Mountaineer
April 18, 2013 MountaineerApril 18, 2013 Mountaineer
April 18, 2013 Mountaineer
 
Ensayo
EnsayoEnsayo
Ensayo
 
Presentación1
Presentación1Presentación1
Presentación1
 
Medicion
MedicionMedicion
Medicion
 
In Search of the Perfect Post
In Search of the Perfect PostIn Search of the Perfect Post
In Search of the Perfect Post
 
October 2014 CLIF Briefing
October 2014 CLIF BriefingOctober 2014 CLIF Briefing
October 2014 CLIF Briefing
 
1a part
1a part1a part
1a part
 
DonorPro WebSolutions Portfolio Tour
DonorPro WebSolutions Portfolio TourDonorPro WebSolutions Portfolio Tour
DonorPro WebSolutions Portfolio Tour
 
წალენჯიხის ტურისტული რესურსები
წალენჯიხის ტურისტული რესურსებიწალენჯიხის ტურისტული რესურსები
წალენჯიხის ტურისტული რესურსები
 
Excel v1.0
Excel v1.0Excel v1.0
Excel v1.0
 
ანი ოქროჭელიძე მე 10 კლასი პომპეი
ანი ოქროჭელიძე მე 10 კლასი პომპეიანი ოქროჭელიძე მე 10 კლასი პომპეი
ანი ოქროჭელიძე მე 10 კლასი პომპეი
 
Seo
SeoSeo
Seo
 

Similar a SQLite Database in Android

android sqlite
android sqliteandroid sqlite
android sqliteDeepa Rani
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptxLadduAnanu
 
Asp .Net Database Connectivity Presentation.pptx
Asp .Net Database Connectivity Presentation.pptxAsp .Net Database Connectivity Presentation.pptx
Asp .Net Database Connectivity Presentation.pptxsridharu1981
 
Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Zohar Elkayam
 
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytxjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytWrushabhShirsat3
 
Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Michael Rys
 
Sqlite
SqliteSqlite
SqliteKumar
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sqlŁukasz Grala
 
Online Oracle Training For Beginners
Online Oracle Training For BeginnersOnline Oracle Training For Beginners
Online Oracle Training For Beginnersvibrantuser
 
Homework help on oracle
Homework help on oracleHomework help on oracle
Homework help on oracleSteve Nash
 
Sql data base
Sql data baseSql data base
Sql data baseAli Jafar
 
SQLcl the next generation of SQLPlus?
SQLcl the next generation of SQLPlus?SQLcl the next generation of SQLPlus?
SQLcl the next generation of SQLPlus?Zohar Elkayam
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 

Similar a SQLite Database in Android (20)

Sq lite database
Sq lite databaseSq lite database
Sq lite database
 
android sqlite
android sqliteandroid sqlite
android sqlite
 
Sq lite
Sq liteSq lite
Sq lite
 
Obevo Javasig.pptx
Obevo Javasig.pptxObevo Javasig.pptx
Obevo Javasig.pptx
 
Asp .Net Database Connectivity Presentation.pptx
Asp .Net Database Connectivity Presentation.pptxAsp .Net Database Connectivity Presentation.pptx
Asp .Net Database Connectivity Presentation.pptx
 
Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?
 
unit-ii.pptx
unit-ii.pptxunit-ii.pptx
unit-ii.pptx
 
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfytxjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
 
Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)
 
Sqlite
SqliteSqlite
Sqlite
 
3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql3 CityNetConf - sql+c#=u-sql
3 CityNetConf - sql+c#=u-sql
 
Online Oracle Training For Beginners
Online Oracle Training For BeginnersOnline Oracle Training For Beginners
Online Oracle Training For Beginners
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Homework help on oracle
Homework help on oracleHomework help on oracle
Homework help on oracle
 
Sql data base
Sql data baseSql data base
Sql data base
 
SQLcl the next generation of SQLPlus?
SQLcl the next generation of SQLPlus?SQLcl the next generation of SQLPlus?
SQLcl the next generation of SQLPlus?
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Android sq lite-chapter 22
Android sq lite-chapter 22Android sq lite-chapter 22
Android sq lite-chapter 22
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

SQLite Database in Android

  • 1. Android Camp Mohamed Ibrahim Mobile Developer Core-Member
  • 2. Of R ev iew al ui ck ent A Q un dam as e F Da tab
  • 3.
  • 4. Type of Database in Android ● Internal Database like(Sqlite) ● External Database like(Content Provider)
  • 6. Internal Database ● Preferences ● Files ● SQLite ● Network
  • 7. What is SQLite !   ● SQLite is an open source Database ● Supports standard relational Database ● Requires only little memory at runtime (250KB) ● Support the data types : ○ TEXT ○ INTEGER ○ REAL ● SQLite doesn't validate if the types written in in the columns are actually of the defined type
  • 8. Why SQLite !! Si ng rce le n sou Fil e O pe less than 250KB Faster no setup or administration
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. SQLite Architecture ● Package ○ android.database.sqlite ● SQLiteDatabase ○ insert _ delete _ update _query _ execSQL ● SQLiteOpenHelper ○ Create ○ Upgrade ○ open ○ close
  • 15. SQLiteOpenHelper subclass of SQLiteDatabase used to create ,upgrade,open and close database. ● constructor parameters ○ Context ○ String name //database name ○ CursorFactory factory // null ○ version //data base version we delete all constructor parameters except context but we wrote database name ,factory and version in the super of SQLiteDatabase ● Have 2 basis methods ○ onCreate //create our database and take one parameter //(SQLiteDatabase) ○ onUpgrade //used when we want to add new column or table //it take 3 parameter (SQLiteDatabas,old,new version)
  • 16. SQLiteDatabase ● Exposes methods to manage a SQLite DataBase: ○ insert insert(String tableName,String nullColumnHack,ContentValues values) ○ delete delete(String tableName,String whereClause,String[] whereArgs) ○ update update(String tableName,ContentValues values,String whereClause,String [] whereArgs ) ○ execSQL execSQL(String sql) ○ query query(String tableName, String[] columns,String selection,String[ ] selectionArg,String groupby,String having,String orderBy)
  • 17. Cursor moveToFirst
  • 18. Devmix ssion on bout this se Wait a rticle a website mix.org www.dev