Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vaibhavmojidra/android-java---demo-room-db

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.
https://github.com/vaibhavmojidra/android-java---demo-room-db

android-java androidarchitecturecomponets mojidra room-database room-persistence-library vaibhav vaibhav-mojidra vaibhavmojidra

Last synced: 12 days ago
JSON representation

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.

Awesome Lists containing this project

README

        

# Android-Java---Demo-Room-DB

- Add all dependencies required for Room DB
- Make a POJO Class i.e object/entity class for the data.( Eg: Student)
- Annotate that class as @Entity Annotation
- Also make any primary key if required @PrimaryKey
- Make a Dao interface to declare all the CRUD methods for entity ( Eg: StudentDAO -> insertStudentRecord(Student obj) )
- Make a Database Abstract Class for database connection (Eg: StudentDatabase)
- Make Repository Class
- Make ViewModel Class

![1](https://github.com/VaibhavMojidra/Android-Java---Demo-Room-DB/blob/master/screenshots/1.png)
![2](https://github.com/VaibhavMojidra/Android-Java---Demo-Room-DB/blob/master/screenshots/2.png)
![3](https://github.com/VaibhavMojidra/Android-Java---Demo-Room-DB/blob/master/screenshots/3.png)
![4](https://github.com/VaibhavMojidra/Android-Java---Demo-Room-DB/blob/master/screenshots/4.png)
![5](https://github.com/VaibhavMojidra/Android-Java---Demo-Room-DB/blob/master/screenshots/5.png)