095 : Room Databases with Florina Muntenescu

In this episode, we talk to Florina from Google about the recently released Database library Room. Room was introduced as part of the Android Architecture components and has been picking up a lot of steam in the community.

Room focuses on being a beautiful api layer to Sqlite. Florina explains to us how we can use Room to create a database, creating entities and how they map to tables using DAOs to access data and even “observe” them. Listen on for more of the details!

Download directly

Show Notes

Official docs

Florina’s posts

360|AnDev talks

Micellaneous questions about Room (that we chopped off for lack of time)

Q: Does Room use reflection?

A: There’s only 1 reflection call (at the time of finding the database implementation, when you call Room.builder). Most of the other stuff is generated code (with compile time verification!).

Q: Does Room provide compile-time SQL checks

A: Yes, Room was designed to provide compile-time checks.

Q: Does Room handle SQL injection attacks (security)

Yes … for all practical purposes. See this post for times when it doesn’t.

Q: Do we have tools to access the sqlite database file directly?

Nope, at the moment, adb is your friend. Use that to download the file manually from your device.

Sponsors

Contact

070: An honest discussion about Realm

In this episode Donn and Kaushik have an honest discussion about Realm (a client side database). Donn has worked pretty extensively with Realm and even consulted for their Android platform previously. But Kaushik has only recently tried it out on a production app.

In this episode they have an honest and frank discussion about using Realm, the advantages, the disadvantages, the gotchas and if it makes sense to use a database like Realm as an Android developer today.

Direct download

Show Notes

Misc

Sync stuff

Github issues tracked on Realm

Resources

Sponsor

BuddyBuild is a continuous integration and continuous deployment system built specifically for mobile developers. Thousands of development teams love BuddyBuild because it’s the fastest way to build, distribute and gather feedback for their apps. Give it a try for FREE at buddybuild.com

Contact

Continue reading 070: An honest discussion about Realm