
On mobile devices, databases are commonly used to save data from a running app so that it can be accessed the next time the app is opened, without retrieving the data from another source, like the internet. Databases can store any of the same information you can represent in an app using Kotlin. In computing, a database is simply a structured collection of data that can be electronically accessed and written to.
A computer with Android studio installed.
How to insert, update, and delete rows using SQL. SELECT statements including WHERE, ORDER BY, GROUP BY, and LIMIT clauses. The structure of a relational database: tables, columns, and rows. By the end of this codelab, you'll have all the fundamentals you need to start learning how to work with databases in an Android app. If not, then that's perfectly fine! We don't expect you to know anything about databases at this point. If you're already familiar with these concepts, consider this lesson as a review to make sure these concepts are fresh when you learn about Room. However, before you dive into working with persistence on Android, it's important to get familiar with the basics of relational databases, and how to read and manipulate data with something called SQL (short for Structured Query Language). Later in this unit, you'll learn more about persistence on Android, and learn about a library called Room that allows your apps to read and write from a database. While it's easy for users to take these features for granted, persisting data is an essential skill for a developer to build high quality apps. From writing a shopping list, to scrolling through pictures from several years ago in a photos app, to pausing and resuming a game, apps use persistence to provide a seamless user experience.
Even if you haven't heard the term before, you've likely encountered persistence before when using an app. In this pathway, you'll learn another fundamental skill of Android development that will enable you to build quality apps: persistence. Previously, you learned about how to incorporate networked data into your app, and learned about using coroutines to handle concurrent tasks.