Today we are going to learn about SQLite Database, How to perform operations insert, update, search , delete and list all details in android. The android framework provides some classes by the name SQLiteDatabase, SQLiteOpenHelper and ContentValues.
SQLite is an embedded relational database which provides all the functionalities which are provided by a normal relational external database like inserting new record in table, deleting record from t able, updating existing record in table, fetching records from table managing transactions, creating procedures and functions etc.
Due to an embedded database it doesn't require any third party proprieted database drivers as well as it doesn't consume large amount of memory.
SQLite3 => This tool resides in android sdk/tools with sqlite database whatever the operation we want to perform on database like insert delete, update, search etc...
adb(Android Debug Bridge) => This tool resides in android sdk/platform_tools direcotry. This tool provides facility to interact with an emulator.
sqlite3 <database_name.db> => This command is used to create or open sqlite database. This command opens database if it is already created.
tables =>This command is used to see list of tables.
.header on => This command is used to enable header of table.
.mode tabs => It is used to see data in tabular format.
.mode line => It is used to data line by line.
.exit => It is used to exit from sqlite3 database.
Do not forget to share with your friends!
Subscribe to:
Post Comments (Atom)
0 Comments:
Post a Comment