{"id":85004,"date":"2021-09-27T09:00:39","date_gmt":"2021-09-27T03:30:39","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=85004"},"modified":"2024-08-15T21:24:10","modified_gmt":"2024-08-15T15:54:10","slug":"android-sqlite-database","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/","title":{"rendered":"Android SQLite Database"},"content":{"rendered":"<p>I hope you are enjoying your Android journey with us and are learning quite a few new things. Previously you saw several ways to store data in Android. Some of them were internal storage, external storage, and preferences.<\/p>\n<p>Preferences, as you know, can be used for small amounts of data, and it stores data in the form of key-value pairs. Now, suppose you want to hold a large amount of data and run some queries on them. Then this is not possible using preferences because using preference, and you can get all values at once or a specific value belonging to the key provided.<\/p>\n<p>SQLite being a scrapped-out version of SQL, provides you with features to run queries and get data based on those queries. Through this article, we will try to understand SQLite in detail and focus on the implementation part.<\/p>\n<h3>What is SQLite?<\/h3>\n<p>SQLite is a scrapped open-source version of SQL that is available in most android devices. It provides features similar to a standard SQL database and stores data in the form of relation. It is available offline for any android device and doesn\u2019t require any internet connection to access it.<\/p>\n<p>SQLite provides features to create, read, update and delete records in the database. It stores the records in the form of text files locally on your device. It allows you to run several queries and enable you to access multiple records at a time. Searching for a record in an SQLite database is relatively fast and efficient.<\/p>\n<h3>Features of SQLite<\/h3>\n<p>SQLite Database provides you with many features in Android. Let\u2019s see a few of the features below:<\/p>\n<p>1. SQLite allows all the CRUD operations: SQLite supports all essential database operations, including Create, Read, Update, and Delete (CRUD). This means you can add new records, retrieve existing ones, modify them, and delete them as needed, making it a full-featured relational database management system for local data storage.<\/p>\n<p>2. SQLite allows partial indexing and advanced compatibility like exporting JSON. SQLite supports partial indexing, which allows you to create indexes on only a subset of data, improving query performance for specific queries. Additionally, it has advanced compatibility features such as exporting data in JSON format, which is useful for integration with web services and other applications.<\/p>\n<p>3. It is a lightweight, scraped-out, open-source version of the SQL database. SQLite is designed to be a lightweight and minimalistic SQL database engine, offering essential SQL features without the overhead of larger, more complex database systems. As an open-source project, it is freely available and widely used in various applications.<\/p>\n<p>4. This stores data locally in the form of encrypted text files. SQLite stores data in a local file on the device, which can be encrypted to protect sensitive information. The entire database, including its schema and data, is contained within a single file, simplifying management and backup.<\/p>\n<p>5. SQLite doesn\u2019t require an internet connection to access the database, and all the operations work offline. Since SQLite is embedded within applications and operates locally, it does not require an internet connection to perform database operations. This makes it ideal for offline applications where consistent access to data is needed without network dependency.<\/p>\n<p>6. SQLite maintains ACID(Atomicity, Consistency, Isolation, and Durability) properties throughout the entire database. SQLite ensures that all database transactions are handled with ACID properties, guaranteeing that operations are completed fully or not at all (Atomicity), data remains consistent (Consistency), transactions are isolated from each other (Isolation), and changes are preserved even in the case of a system crash (Durability).<\/p>\n<p>7. It comes up with very easy-to-use APIs. SQLite provides straightforward and easy-to-use Application Programming Interfaces (APIs) for interacting with the database. These APIs facilitate operations such as querying, updating, and managing the database, making it accessible for developers of all skill levels.<\/p>\n<p>8. SQLite is standalone and doesn\u2019t have any external dependencies. SQLite operates as a self-contained, serverless database engine. It does not require any external database server or additional software, making it simple to integrate and deploy within applications.<\/p>\n<p>9. SQLite provides a command-line interface to execute complex queries and fetch data. SQLite includes a command-line interface (CLI) that allows developers to execute SQL queries directly, perform database management tasks, and retrieve data. This tool is useful for debugging, testing, and performing advanced database operations.<\/p>\n<p>10. It provides a faster and efficient search experience. Due to its lightweight nature and efficient indexing mechanisms, SQLite offers fast search and retrieval operations. This speed is particularly advantageous for applications that require quick access to data without the overhead of larger database systems.<\/p>\n<h3>SQLite in Android<\/h3>\n<p>SQLite, as we know, is highly used in Android because of its lightweight and efficient features. It allows us to maintain consistency, concurrency, durability, and atomicity among the databases we manage. SQLite in android is compatible to work with large amounts of data and provides scalability options.<\/p>\n<p>Let\u2019s see some crucial points about SQLite in Android:<\/p>\n<p>1. SQLite allows you to store the following types of data in the database:<\/p>\n<ul>\n<li><strong>Strings or Characters<\/strong><\/li>\n<li><strong>Integers<\/strong><\/li>\n<li><strong>Floating point numbers<\/strong><\/li>\n<\/ul>\n<p>2. To use SQLite in your android projects, you need to import the <strong>\u2018android.database.sqlite\u2019<\/strong> package. The SQLite package contains several APIs and classes that help us to implement SQLite Database.<\/p>\n<p>3. We have a class known as <strong>SQLiteOpenHelper,<\/strong> which is quite helpful to create and manage databases.<\/p>\n<p>4. <strong>SQLiteDatabase<\/strong> is another class that provides us with several methods which are helpful to create, read, update, and delete records from the database.<\/p>\n<h3>Methods in SQLite Database<\/h3>\n<table>\n<tbody>\n<tr>\n<td><b>Method<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">insert(tableName: String!, nullColumnHack: String!, dataValues: ContentValues!)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The insert() method is useful to insert a record in the specified table of a database.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">rawQuery(sql: String!, selectionArgs: Array&lt;String!&gt;!)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The rawQuery() method runs a SQL query on the database and returns a Cursor object.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">openDatabase(path: File, openParams: SQLiteDatabase.OpenParams)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The openDatabase() method is used to open a database specified by the path of the database and the parameters.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">isOpen()<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The isOpen() method is used to know if a database is already open or not.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">deleteDatabase(file: File)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The deleteDatabase() method is useful to delete a database and all associated files created by the database engine.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">delete(table: String!, whereClause: String!, whereArgs: Array&lt;String!&gt;!)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The delete() method is used to delete records from the specified table that follows the condition of whereClause.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">execSQL(sql: String!)<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The execSQL() method executes the given SQL statement but doesn\u2019t execute SELECT or any other statement that returns data.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Implementation of SQLite in Android<\/h3>\n<p>So until now, you saw what SQLite is and its use in android. Now it&#8217;s time for us to explore SQLite a bit further by building an application that involves SQLite in it. So, in this implementation, we will create an application to store college students\u2019 data.<\/p>\n<p>Step 1: Start your Android Studio and create a project named \u201cTechVidvanSQLite.\u201d<\/p>\n<p>Step 2: Now open your AndroidManifest.xml file and add the permission to access the external storage.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"\/&gt;\r\n<\/pre>\n<p>Step 3: Now, you need to create a modal class for storing the students&#8217; records. Just make a new Kotlin class file and name it as \u201cstudent.kt\u201d.<br \/>\n<strong>Code: student.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.techvidvansqlite\r\n\r\nclass student {\r\n    var rollNum = 0\r\n    var name: String? = null\r\n    var collegeName: String? = null\r\n\r\n    \/\/Null constructor\r\n    constructor() {}\r\n\r\n    \/\/Constructor to initialize the data\r\n    constructor(roll: Int, name: String?, _college_name: String?) {\r\n        rollNum = roll\r\n        this.name = name\r\n        collegeName = _college_name\r\n    }\r\n\r\n    constructor(name: String?, _college_name: String?) {\r\n        this.name = name\r\n        collegeName = _college_name\r\n    }\r\n\r\n}\r\n<\/pre>\n<p>Step 4: Now, we need to create a databaseHandler class extending the properties from SQLiteOpenHelper class. The databaseHandler.kt file helps us in managing our database and performing operations on it.<\/p>\n<p><strong>Code: databaseHandler.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.techvidvansqlite\r\n\r\nimport android.content.ContentValues\r\nimport android.content.Context\r\nimport android.database.sqlite.SQLiteDatabase\r\nimport android.database.sqlite.SQLiteOpenHelper\r\nimport java.util.ArrayList\r\n\r\n\r\nclass DatabaseHandler(context: Context?) :\r\n    SQLiteOpenHelper(context, DATABASE_NAME, null, DATABASE_VERSION) {\r\n\r\n    override fun onCreate(db: SQLiteDatabase)\r\n    {\r\n\r\n        \/\/Creating Students Table\r\n        val CREATE_STUDENTS_TABLE = (\"CREATE TABLE \" + TABLE_STUDENTS + \"(\"\r\n                + ROLL_NO + \" INTEGER PRIMARY KEY,\" + NAME + \" TEXT,\"\r\n                + CLG_NAME + \" TEXT\" + \")\")\r\n\r\n        db.execSQL(CREATE_STUDENTS_TABLE)\r\n    }\r\n\r\n    override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {\r\n        \/\/ upgrade the database when required\r\n        \/\/ if a table named students already exist then drop it\r\n        db.execSQL(\"DROP TABLE IF EXISTS $TABLE_STUDENTS\")\r\n\r\n        \/\/ creating the student table again\r\n        onCreate(db)\r\n    }\r\n\r\n    \/\/ using the below code we can add students\r\n    fun addStudent(studObj: student) {\r\n        val db = this.writableDatabase\r\n        val values = ContentValues()\r\n        values.put(NAME, studObj.name) \/\/ Name of the student\r\n        values.put(CLG_NAME, studObj.collegeName) \/\/ Name of the college\r\n\r\n        \/\/ Inserting student record\r\n        db.insert(TABLE_STUDENTS, null, values)\r\n\r\n        db.close()\r\n    }\r\n\r\n    \/\/ below function retrieves a student from the table\r\n    fun getStudent(id: Int): student {\r\n        val db = this.readableDatabase\r\n        val cursor = db.query(\r\n            TABLE_STUDENTS,\r\n            arrayOf(\r\n                ROLL_NO,\r\n                NAME, CLG_NAME\r\n            ),\r\n            \"$ROLL_NO=?\",\r\n            arrayOf(id.toString()),\r\n            null,\r\n            null,\r\n            null,\r\n            null\r\n        )\r\n        cursor?.moveToFirst()\r\n\r\n        \/\/\/return the student object\r\n        return student(\r\n            cursor!!.getString(0).toInt(),\r\n            cursor.getString(1), cursor.getString(2)\r\n        )\r\n    }\r\n\r\n\r\n    \/\/ below function gives us details of all the students in the form of list\r\n    val allStudents: List&lt;student&gt;\r\n        get()\r\n        {\r\n            val studentList: MutableList&lt;student&gt; = ArrayList&lt;student&gt;()\r\n\r\n            \/\/Query to select all students\r\n            val selectQuery = \"SELECT  * FROM $TABLE_STUDENTS\"\r\n            val db = this.writableDatabase\r\n            val cursor = db.rawQuery(selectQuery, null)\r\n\r\n            \/\/ traversing through each student record\r\n            if (cursor.moveToFirst()) {\r\n                do {\r\n                    val studentObj = student(cursor.getString(0).toInt(), cursor.getString(1),\r\n                        cursor.getString(2))\r\n\r\n                    \/\/adding student object to student list\r\n                    studentList.add(studentObj)\r\n\r\n                } while (cursor.moveToNext())\r\n            }\r\n\r\n            \/\/ returning the students list\r\n            return studentList\r\n        }\r\n\r\n\r\n\r\n    companion object\r\n    {\r\n        private const val DATABASE_VERSION = 1\r\n        private const val DATABASE_NAME = \"StudentDatabase\"\r\n        private const val TABLE_STUDENTS = \"students\"\r\n        private const val ROLL_NO = \"rollNum\"\r\n        private const val NAME = \"name\"\r\n        private const val CLG_NAME = \"collegeName\"\r\n    }\r\n}\r\n<\/pre>\n<p>Step 5: Now come back to your MainActivity.kt file and paste the below code there.<\/p>\n<p><strong>Code: MainActivity.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.techvidvansqlite\r\n\r\nimport androidx.appcompat.app.AppCompatActivity\r\nimport android.os.Bundle\r\nimport android.util.Log\r\n\r\n\r\nclass MainActivity : AppCompatActivity()\r\n{\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n        val db = DatabaseHandler(this@MainActivity)\r\n\r\n        \/\/ Inserting Students Data\r\n        Log.d(\"TechVidvanSQLite\", \"Your Student data is inserted\")\r\n        db.addStudent(student(\"Mohit Kumar\", \"SRM University AP\"))\r\n        db.addStudent(student(\"Rahul\", \"Manipal University\"))\r\n        db.addStudent(student(\"Nitesh Singh\", \"IIT Delhi\"))\r\n        db.addStudent(student(\"John\", \"PES University\"))\r\n\r\n\r\n        \/\/Reading all the students data\r\n        Log.d(\"TechVidvanSQLite\", \"Reading all the students data\")\r\n\r\n        val studentList: List&lt;student&gt; = db.allStudents\r\n        for (stud in studentList) {\r\n            val log = \"Roll Number: \" + stud.rollNum.toString() + \" , Name: \" + stud.name\r\n                .toString() + \" ,College Name \" +\r\n                    stud.collegeName.toString()\r\n\r\n            \/\/Displaying the students data in log\r\n            Log.d(\"TechVidvanSQLite\", log)\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>Now your application is all set and ready to execute. Simply run it on your device or emulator and notice the output.<\/p>\n<p>You need to see the output in the logcat window(that is located at the bottom of your android studio).<\/p>\n<h3>How to view the data stored in SQLite in android studio?<\/h3>\n<p>To view the data stored in SQLite, you need to follow the below steps:<\/p>\n<p>1: Open your Android SQLite Project in Android Studio and then navigate to <strong>Tools&#8212;&gt;Tool<\/strong> <strong>Windows&#8212;&#8211;&gt;Device<\/strong> <strong>File Explorer<\/strong> as shown below.<\/p>\n<p>2: Now, you can see the Device File Explorer window in front of you.<\/p>\n<p>3: Now, you need to browse through data. After opening the data folder, you will find another subfolder named data. Open it and look for the package name of your project. In my case, it is \u201ccom.techvidvan.techvidvansqlite\u201d.<\/p>\n<p>4: Now open the <strong>databases<\/strong> folder present inside your package, as shown below.<\/p>\n<p>5: Now select the database file and click on Save As option as shown below. In my case, my database name is \u201cStudentDatabase\u201d.<\/p>\n<p>6: After clicking on Save As an option, a window will appear to provide the path where you wish to save this file. Provide your path and click on Ok, as shown below.<\/p>\n<p>7: Now, your database file is successfully downloaded in your desired path. To view that database file, you need a tool known as DB Browser for SQLite. DB Browser is available for almost all distributions, Windows, macOS, Linux, etc. Use the link to<a href=\"https:\/\/sqlitebrowser.org\/dl\/\"> download DB Browser<\/a> on your system.<\/p>\n<p>If you are a Linux user, then use the below command to install SQLite DB Browser.<\/p>\n<p><strong>Command:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">snap install sqlitebrowser\r\n<\/pre>\n<p>Step 8: After successfully installing DB Browser, you need to open it and browse your database file as shown below.<\/p>\n<p>After opening your database file, you need to browse the required table to get the results, as shown below.<\/p>\n<h3>Summary<\/h3>\n<p>Through this article, you came across another storage technique in android. You came across what SQLite is, its features, and its roles in android. Later on, you saw the classes present in SQLite in android and the involved methods. Finally, you saw an implementation of SQLite database through an android application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I hope you are enjoying your Android journey with us and are learning quite a few new things. Previously you saw several ways to store data in Android. Some of them were internal storage,&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":85081,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2791],"tags":[4355,4356],"class_list":["post-85004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-sqlite","tag-android-sqlite-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android SQLite Database - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn what SQLite is, its features, implementation and role in android. See the classes present in SQLite &amp; involved methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android SQLite Database - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn what SQLite is, its features, implementation and role in android. See the classes present in SQLite &amp; involved methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-27T03:30:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-15T15:54:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/09\/android-sqlite-database.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android SQLite Database - TechVidvan","description":"Learn what SQLite is, its features, implementation and role in android. See the classes present in SQLite & involved methods.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/","og_locale":"en_US","og_type":"article","og_title":"Android SQLite Database - TechVidvan","og_description":"Learn what SQLite is, its features, implementation and role in android. See the classes present in SQLite & involved methods.","og_url":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-09-27T03:30:39+00:00","article_modified_time":"2024-08-15T15:54:10+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/09\/android-sqlite-database.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Android SQLite Database","datePublished":"2021-09-27T03:30:39+00:00","dateModified":"2024-08-15T15:54:10+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/"},"wordCount":1598,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/09\/android-sqlite-database.jpg","keywords":["Android SQLite","Android SQLite Database"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/","url":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/","name":"Android SQLite Database - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/09\/android-sqlite-database.jpg","datePublished":"2021-09-27T03:30:39+00:00","dateModified":"2024-08-15T15:54:10+00:00","description":"Learn what SQLite is, its features, implementation and role in android. See the classes present in SQLite & involved methods.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/09\/android-sqlite-database.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/09\/android-sqlite-database.jpg","width":1200,"height":628,"caption":"android sqlite database"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/android-sqlite-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Android SQLite Database"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/85004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=85004"}],"version-history":[{"count":2,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/85004\/revisions"}],"predecessor-version":[{"id":447648,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/85004\/revisions\/447648"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/85081"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=85004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=85004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=85004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}