Fragmented - Android Developer Podcast

095 : Room Databases with Florina Muntenescu


Listen Later

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 them map to tables, using DAOs to access data and even observe them

Listen on for the details!

Show Notes
Official docs
  • Android Architecture Components
  • Room migration docs
  • runInTransaction api (which Florina recommended if you're executing more than one SQL statement and don't want multiple event fired)
  • Google Samples - Android Architecutre Components
  • Florina's posts
    • Florina's Medium blog posts
      • Room & RxJava
      • 7 steps to Room
      • Understanding migrations with Room
      • Testing Room migrations
      • 360|AnDev talks
        • Room - Behind the scenes (Yigit Boyar)
        • Data Persistence in Android: Room for Improvement
        • 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
          • Rollbar - special offer: Bootstrap plan free for 90 days
          • Contact
            • @fmuntenescu [twitter.com]
            • @fragmentedcast [twitter.com]
            • @donnfelker and +DonnFelker
            • @kaushikgopal and +KaushikGopalIsMe
            • ...more
              View all episodesView all episodes
              Download on the App Store

              Fragmented - Android Developer PodcastBy Donn Felker, Kaushik Gopal

              • 5
              • 5
              • 5
              • 5
              • 5

              5

              68 ratings


              More shows like Fragmented - Android Developer Podcast

              View all
              Design Details by Brian Lovin, Marshall Bock

              Design Details

              361 Listeners

              Developer Tea by Jonathan Cutrell

              Developer Tea

              402 Listeners

              Does Not Compute by Sean Washington, Rockwell Schrock

              Does Not Compute

              53 Listeners

              Toolsday by Una Kravets, Chris Dhanaraj

              Toolsday

              48 Listeners

              Swift Unwrapped by JP Simard, Jesse Squires, Spec Network, Inc.

              Swift Unwrapped

              90 Listeners