Creating a Database
There are three steps to creating a database with Room:
annotating your model class to make it a database entity
creating the class that will represent the database itself
creating a type converter so that your database can handle your model data
Room makes each of these steps straightforward, as you are about to see.
Room structures the database tables for your application based on the entities you define.
Entities are model classes you create, annotated with the
Room will create a database table for any class with that annotation.
Since you want to store crime objects in your database, update Crime to be a Room entity. Open Crime.kt and add two annotations: ...