SQLite in Android Notes
SQLite in Android Notes
1. Introduction
It is bundled with Android OS, so developers can use it without installing any additional libraries.
Suitable for storing structured data, such as user details, app settings, history, or any relational data.
- Lightweight: Minimal setup and consumes little memory and disk space.
b. SQLiteDatabase: Performs CRUD operations such as insert(), update(), delete(), and query().
@Override
db.execSQL("CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, email
TEXT)");
@Override
onCreate(db);
Usage:
SQLiteDatabase db = dbHelper.getWritableDatabase();
7. Limitations of SQLite
- No built-in encryption.
- Single-user environment.
What is SQLite Database in Android?
8. Alternatives to SQLite
9. Conclusion