
Of course, this is only the first step as a database is not very useful until it contains data and allows software to run queries against that data. Go to build.The previous chapter introduced the SQLiteOpenHelper and SQLiteDatabase classes and discussed how to create databases. Give the project a descriptive name and select Kotlin as the preferred development language. Launch Android Studio and create a new empty activity project. To understand the concept of the Paper database better, we’ll create a note app that adds notes to the database and displays them on a RecyclerView.

It allows users to use Java/Kotlin classes without any annotations, factory methods, or required class extensions.Īdding or removing fields from data classes is also no longer a chore because all data structure changes are handled automatically. The goal of PaperDB is to provide an easy-to-use yet fast object storage solution for Android. PaperDB is a NoSQL-like database for Java/Kotlin objects on Android that supports automatic schema migration. This tutorial aims to explain what Paper database is, where to use it, the advantages and disadvantages of Paper DB, and how to implement it in Android. Be familiar with the concept of data/view binding.Have basic knowledge of the Kotlin Programming language.Understand the basics of Android development.To follow along with this tutorial, you need to: Initializing Paper in an application class.Instead, it has the field as the main element of the database. An example is the phone book which has no records for each person. In Android, there are several databases such as SQLite, Room, SQLDlight, Datastore, SharedPreferences, and Realm database.Īlthough most people think that all databases are composed of fields and records, databases held on Paper contain fields and have no records.

A database is an organized collection of data that is stored in computer systems.
