#Setting up sqlite database android how to
How to create and interact with a Room database to persist data.See the SQLite Primer for a quick overview or refresher. A basic understanding of SQL databases and the SQLite language.See " Multithreaded & callbacks primer" for an introductory overview. Basic knowledge of concurrency fundamentals.These Architecture Components topics are covered in other codelabs in this course. View models, view-model factories, LiveData and its observers.Navigating between fragments and using Safe Args (a Gradle plugin) to pass data between fragments.Using activities, fragments, and views.Building a basic user interface (UI) for an Android app.The image below shows how the Room database fits in with the overall architecture recommended in this course. Room also has a query syntax allowing you to search for data. It also makes it possible for your app to interact with the database using ordinary function calls. Instead of using SQLite directly, Room simplifies the chores of setting up, configuring, and interacting with the database. SQLite uses a specialized language (SQL) to perform database operations. Under the hood, the Room library is an abstraction layer on top of a SQLite database. Room is a database library that's part of Android Jetpack. For most of these cases, you use a database to store this persistent data.
![setting up sqlite database android setting up sqlite database android](https://4.bp.blogspot.com/-RUweAX_T_8Q/WsOR2Dq0mrI/AAAAAAAAAls/QrXBQ5RhZKcGeuDiNRAC3_NjYYMP0-G6ACLcBGAs/s1600/Android-Login-with-SQLite-Database-Tutorial.jpg)
![setting up sqlite database android setting up sqlite database android](https://developer.android.com/codelabs/basic-android-kotlin-training-persisting-data-room/img/7521165e051cc0d4.png)
For example, the app might store a playlist of songs, an inventory of game items, records of expenses and income, a catalog of constellations, or a history of personal sleep data. Most apps have data that needs to be saved, even after the user closes the app. All the course codelabs are listed on the Android Kotlin Fundamentals codelabs landing page. You'll get the most value out of this course if you work through the codelabs in sequence.
![setting up sqlite database android setting up sqlite database android](https://www.codeproject.com/KB/android/783073/main.jpg)
This codelab is part of the Android Kotlin Fundamentals course.