SlideShare a Scribd company logo
Realm Java
Leonardo YongUk Kim lk@realm.io
Yet another
database?
Realm Java
No more SQL
String query = "SELECT " + Owner.NAME + ", " + Dog.NAME + ", " + City.NAME
+ " FROM " + Owner.TABLE_NAME
+ " INNER JOIN " + Dog.TABLE_NAME + " ON " + Owner.DOG_ID + " = " +
Dog.ID
+ " INNER JOIN " + City.TABLE_NAME + " ON " + Owner.CITY_ID + " = " +
City.ID
+ " WHERE " + Owner.NAME = "'" + escape(queryName) + "'";
Use cases
Realm Java
Realm Java
Fastest
Realm Java
Realm Java
Realm Java
Realm Java
Why is it so fast?
Realm Java
Realm Java
Realm Java
Realm Java
Realm Java
Realm Java
Traditional data structure
Column-based data structure
• Padding bits are not needed anymore.
• Queries for columns help the cache hit rate.
• Boolean type fields are put into integers field.
• Other fields are packaged as 1, 2, 4, 8, 16, 32, 64bits.
• More space efficient than SQLite (~50%)
How to use?
Extend RealmObject class
Create a standalone object, and then copy it to Realm
Instantiate through the Realm directly
Use realm.executeTransaction() method
Asynchronous transactions
Logical operators
Sorting
Chaining
Aggregation
Iteration
Deletion
Async queries
Async queries (cont.)
Relationships (Many-To-One)
Relationships (Many-To-One)
Link queries
RealmResults<Contact> contacts =
realm.where(Contact.class).equalTo("emails.active", true).findAll();
Migrations
Migrations (cont.)
Encryption
Adapter
Q&A kr@realm.io

More Related Content

PDF
Realm: Building a mobile database
PDF
Realm to Json & Royal
PDF
Latinoware
PDF
NoSQL для PostgreSQL: Jsquery — язык запросов
ODP
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PDF
Aggregation Framework MongoDB Days Munich
PDF
龍華大學前端技術分享 Part1
Realm: Building a mobile database
Realm to Json & Royal
Latinoware
NoSQL для PostgreSQL: Jsquery — язык запросов
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
Aggregation Framework MongoDB Days Munich
龍華大學前端技術分享 Part1

What's hot (20)

PDF
Getting Started with MongoDB
PDF
Indexing
PDF
Dirty - How simple is your database?
KEY
C# Development (Sam Corder)
PDF
Jsquery - the jsonb query language with GIN indexing support
PDF
Oh, that ubiquitous JSON !
KEY
Python Development (MongoSF)
ODP
Aggregation Framework in MongoDB Overview Part-1
KEY
Djangocon
PDF
Play á la Rails
PDF
On Beyond (PostgreSQL) Data Types
PPTX
Aggregation Framework
PDF
D-Talk: What's awesome about Ruby 2.x and Rails 4
PPTX
MongoDB: Easy Java Persistence with Morphia
PPTX
MongoDB - Aggregation Pipeline
PPTX
Slick: Bringing Scala’s Powerful Features to Your Database Access
PDF
Nodejs - A quick tour (v5)
PDF
Using MongoDB and Python
PDF
Javascript the New Parts v2
Getting Started with MongoDB
Indexing
Dirty - How simple is your database?
C# Development (Sam Corder)
Jsquery - the jsonb query language with GIN indexing support
Oh, that ubiquitous JSON !
Python Development (MongoSF)
Aggregation Framework in MongoDB Overview Part-1
Djangocon
Play á la Rails
On Beyond (PostgreSQL) Data Types
Aggregation Framework
D-Talk: What's awesome about Ruby 2.x and Rails 4
MongoDB: Easy Java Persistence with Morphia
MongoDB - Aggregation Pipeline
Slick: Bringing Scala’s Powerful Features to Your Database Access
Nodejs - A quick tour (v5)
Using MongoDB and Python
Javascript the New Parts v2
Ad

Viewers also liked (20)

KEY
The Git - (#1/2)
PDF
Anatomy of an android
PPTX
A brief guide to android gradle
PDF
Butter android views
PDF
Tensorflow 101
PDF
Actionbar and fragment
PDF
C++ 미정의 행동(undefined behavior)
PDF
[0602 박민근] Direct2D
PDF
3D Graphics 101
PDF
좋은 뷰, 나쁜 뷰, 이상한 뷰
PPTX
C++ stl
PDF
Modern android
PDF
자바 서버 애플리케이션 아키텍처 안티 패턴
PDF
Realm과 RxJava
PPTX
EventBus for Android
PDF
A brief introduction to Realm with Kotlin
PPTX
Guava’s Event Bus
PDF
PublishSubject
PDF
Realm: 초고속 데이터베이스
PDF
오픈 소스로 취업하기: 나는 어떻게 오픈 소스를 하다 렘 개발자가 되었나?
The Git - (#1/2)
Anatomy of an android
A brief guide to android gradle
Butter android views
Tensorflow 101
Actionbar and fragment
C++ 미정의 행동(undefined behavior)
[0602 박민근] Direct2D
3D Graphics 101
좋은 뷰, 나쁜 뷰, 이상한 뷰
C++ stl
Modern android
자바 서버 애플리케이션 아키텍처 안티 패턴
Realm과 RxJava
EventBus for Android
A brief introduction to Realm with Kotlin
Guava’s Event Bus
PublishSubject
Realm: 초고속 데이터베이스
오픈 소스로 취업하기: 나는 어떻게 오픈 소스를 하다 렘 개발자가 되었나?
Ad

Similar to Realm Java (18)

ODP
Realm Mobile Database - An Introduction
PPTX
Present realm
PPTX
RealmDB for Android
PDF
Realm Java 2.2.0: Build better apps, faster apps
PDF
Realm Java 2.2.0: Build better apps, faster apps
PDF
Realm Presentation
PDF
Painless Persistence in a Disconnected World
PPTX
Realm mobile database
PPTX
Realm database
PDF
No sql databases blrdroid devfest 2016
PDF
Убийца SQLite, или Мобильная БД с блек-джеком и синхронизацией
PDF
#MBLTdev: Уроки, которые мы выучили, создавая Realm
PPTX
Realm Java for Android
PDF
Gotta Persist 'Em All: Realm as Replacement for SQLite
PDF
React-Native Lecture 11: In App Storage
PDF
Realm.oi new database for mobile apps
PPTX
Realm 研究
PDF
Data Persistence in Android with Room Library
Realm Mobile Database - An Introduction
Present realm
RealmDB for Android
Realm Java 2.2.0: Build better apps, faster apps
Realm Java 2.2.0: Build better apps, faster apps
Realm Presentation
Painless Persistence in a Disconnected World
Realm mobile database
Realm database
No sql databases blrdroid devfest 2016
Убийца SQLite, или Мобильная БД с блек-джеком и синхронизацией
#MBLTdev: Уроки, которые мы выучили, создавая Realm
Realm Java for Android
Gotta Persist 'Em All: Realm as Replacement for SQLite
React-Native Lecture 11: In App Storage
Realm.oi new database for mobile apps
Realm 研究
Data Persistence in Android with Room Library

More from Leonardo YongUk Kim (13)

PDF
Compose Multiplatform 101
PDF
Kotlin 2.0을 통해 알아보는 코틀린의 미래
PDF
안드로이드 빌드: 설탕없는 세계
PDF
Realm은 어떻게 효율적인 데이터베이스를 만들었나?
PDF
MVC부터 MVVM, 단방향 데이터 흐름까지
PDF
Anatomy of Realm
PDF
역시 Redux
PDF
React Everywhere
PDF
React Redux React Native
PDF
Veni, Vide, Built: Android Gradle Plugin
PDF
GIt 마을로 이주하기 (Git -> Svn, svn-all-fast-export)
KEY
red black tree
Compose Multiplatform 101
Kotlin 2.0을 통해 알아보는 코틀린의 미래
안드로이드 빌드: 설탕없는 세계
Realm은 어떻게 효율적인 데이터베이스를 만들었나?
MVC부터 MVVM, 단방향 데이터 흐름까지
Anatomy of Realm
역시 Redux
React Everywhere
React Redux React Native
Veni, Vide, Built: Android Gradle Plugin
GIt 마을로 이주하기 (Git -> Svn, svn-all-fast-export)
red black tree

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
KodekX | Application Modernization Development
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
MYSQL Presentation for SQL database connectivity
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Advanced methodologies resolving dimensionality complications for autism neur...
Understanding_Digital_Forensics_Presentation.pptx
Electronic commerce courselecture one. Pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KodekX | Application Modernization Development
Per capita expenditure prediction using model stacking based on satellite ima...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
MYSQL Presentation for SQL database connectivity
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing

Realm Java