Articles

Affichage des articles associés au libellé Room library

Android Mini project and tutorial : create and manage SQLite internal databases with Room persistence library with Kotlin

Image
  In this tutorial we will learn how to work with the Android Room library to create and manipulate internal SQLite databases in our android applications. Previously, we were able to create our database and our tables and manage our data thanks to SQLiteOpenHelper and SQLiteDatabase classes. This meant entering a large amount of standard code to create and manipulate even a very small database. In addition, no compile-time verification of  SQL queries was possible. And if the database schema is modified, we had to update the affected SQL queries. But now with Jetpack libraries we have become able to create and manipulate our internal databases in more flexible ways thanks to Room library. The Room library provides an abstraction layer on SQLite, which allows more robust access to the database while offering all the power of SQLite. Room is an ORM, Object Relational Mapping library. In other words, Room will map our database objects to Java objects and provide an abstraction layer on SQ