Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Rajab Davudov - Android Database

on

  • 2,073 views

Rajab Davudov - Android Database

Rajab Davudov - Android Database

Statistics

Views

Total Views
2,073
Views on SlideShare
1,396
Embed Views
677

Actions

Likes
1
Downloads
32
Comments
0

2 Embeds 677

http://www.hackathonazerbaijan.org 576
http://androidage.hackathonazerbaijan.org 101

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Rajab Davudov - Android Database Rajab Davudov - Android Database Presentation Transcript

    • Rajab Davudov
    • What is SQLite?• SQLite is Open Source Database embedded into Mobile Devices.• SQLite supports SQL syntax, transactions and prepared statements.• SQLite consumes low memory approx. 250Kbyte.
    • SQLite Types• TEXT (String in Java)• INTEGER (long in Java)• REAL (double in Java)
    • SQLite in Android• SQLite comes with all Android devices• Application database is stored atDATA/data/APP_NAME/databases/FILENAME
    • SQLite in Android• Two packages – android.database – android.database.sqlite
    • SQLiteOpenHelpler• onCreate()• onUpgrade()• getReadableDatabase()• getWriteableDatabase()
    • SQLiteDatabase• insert()• update()• delete()• query()• rawQuery()
    • insert()ContentValues values = new ContentValues() ;values.put("username", username) ;values.put("fullname", fullname) ;values.put("password", password) ;database.insert("users", null, values) ;
    • query()Cursor cursor = database.query( "users", new String[] {"fullname"}, "username = ? and password = ?", new String[]{username, password}, null, null, null) ;
    • rawQuery()Cursor cursor = database.rawQuery("select fullname from users where username = ?and password = ?",new String[] { username, password }) ;
    • CursorA Cursor represents the result of a query andbasically points to one row of the query result.• getCount()• moveToFirst()• moveToNext()• …
    • Ready, Steady, Code !!!
    • Rajab Davudov Senior Developer at Azerfon radjab@gmail.comhttps://market.android.com/developer?pub=RADJABhttp://gplus.to/radjabhttp://www.fb.me/rajab.davudovhttp://www.linkedin.com/in/radjab Market QR Code