Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SQLite Provider: Database access made easy
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
David González
January 29, 2014
Technology
350
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SQLite Provider: Database access made easy
David González
January 29, 2014
More Decks by David González
See All by David González
A comprehensive guide to tracker protection on Android
malmstein
1
100
Building a Multiplatform library for iOS and Android
malmstein
9
1.3k
Unidirectional Data Flow on Android
malmstein
6
560
Introduction to Kotlin Coroutines
malmstein
0
200
A State Container Architecture for mobile applications
malmstein
0
170
Things I wish I knew before starting to work remote
malmstein
0
120
Remote, lonely and productive
malmstein
0
210
The source of all technical debt
malmstein
6
460
Android Architecture Blueprints
malmstein
0
330
Other Decks in Technology
See All in Technology
今さら理解するウェブフォントver.2026
takanorip
3
520
Essential architectural thinking (revised edition)
ufried
0
110
AI時代のPRレビューにどう向き合うか?
kairim0
1
120
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
320
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
680
AIに攻撃される前に、AIに攻撃させる
tsuchikazu
0
160
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
160
全PRの83%が AIレビューだけでマージできるようになった開発組織は その後どうなったか @2026/10
athug
0
130
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
110
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
110
パッチ更新でterraform initが落ちた日
grimoh
1
100
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
580
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Leo the Paperboy
mayatellez
10
2.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
320
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Believing is Seeing
oripsolob
1
240
Discover your Explorer Soul
emna__ayadi
2
1.3k
Transcript
SQLite Provider: A simplification of database access David Gonzalez
Content Providers Managers of structured data Abstract underlying data storage
Allow external access to data
Manage connection to data source
Easy access to data
Implicit intents
Loader callbacks
Provide data to external apps
PROBLEMS — And we had to fix them
Boilerplate code
DB versioning
JSON to SQL mapping
Create the database public ExampleDatabase(Context context, CursorFactory factory, int version)
{ super(context, DATABASE_NAME, factory, version); } @Override public void onCreate(SQLiteDatabase db) { createDatabase(db); }
protected void createDatabase(SQLiteDatabase db) { final String articleTable = "CREATE
TABLE articles" // + " ('" // + _id + "' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, '" // + title + "' TEXT, '" // + content + "' TEXT, '" // + timestamp + "' TIMESTAMP NOT NULL );"; db.execSQL(articleTable); @Override public void onCreate(SQLiteDatabase db) { createDatabase(db); }
Upgrade it @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion) { if (oldVersion == 0) { db.execSQL("DROP TABLE article"); createDatabase(db); } }
Upgrade it ContentResolver resolver = getContentResolver(); String[] projection = new
String[] {UserDictionary.Words._ID, UserDictionary.Words.WORD}; String selectionClause = UserDictionary.Words.WORD + " = ?"; String[] selectionArgs = new String[] {"Android"}; String sortOrder = UserDictionary.Words.WORD + " ASC”; Cursor cursor = resolver.query(UserDictionary.Words.CONTENT_URI, projection, selectionClause, selectionArgs, sortOrder);
Our solution https://github.com/novoda/SQLiteProvider