# room-database

Published articles for room-database.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Run, SQL Run!

DevFeed: [Run, SQL Run!](<https://devfeed.tech/articles/run-sql-run-91138.md>)

Original publisher: [Read original article](<https://proandroiddev.com/run-sql-run-58b1045dce4a?source=rss----c72404660798---4>)

Author: Burak Karaduman

Published: 2026-10-20T16:28:24Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [rdbms](<https://devfeed.tech/topics/rdbms.md>), [email](<https://devfeed.tech/topics/email.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [full-text-search](<https://devfeed.tech/tags/full-text-search.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [offline-first](<https://devfeed.tech/tags/offline-first.md>), [performance](<https://devfeed.tech/tags/performance.md>), [room](<https://devfeed.tech/tags/room.md>), [room-database](<https://devfeed.tech/tags/room-database.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

The excerpt describes using SQLite FTS4 with Room to speed up local email search in an offline-capable app. FTS indexes text as searchable tokens linked to source rows, then uses that index to find matching keywords. In the demo, `LIKE` with a prefix pattern checks only the beginnings of fields, while FTS can match terms elsewhere, so FTS returns more results. On a database of 20,776 items, the author reports that FTS found more matches faster for the tested queries, but gives no numerical timings here. The five consecutive trials used to average query duration may benefit from caching; no cache-control improvement was implemented.

### Source excerpt

Searching data like products, messages or emails is one of the most common features in modern applications. There are couple of ways to implement this. In many cases, the client works together with backend services for searching. But, for fully client based or offline first app without network connection, we must execute search operations locally. When the number of tables and rows grows, local queries can become slow. To handle this performance issue, a widely used technique is full text search. Our goal is to achieve the same search functionality that exists in current Gmail application. Image generated with ChatGPTAbout The Demo It is demonstrated in a sample email application, which displays only emails with sender, subject, and body. After performing a search, it is possible to see the number of results, the average time taken, and the times from all five trials. Also note that while FTS searches every content in every field, a query using LIKE only searches the beginnings of tields, so the results are not exactly the same. FTS generally finds more matches. How Does FTS Work Generally? There are two phases in full text search: indexing and searching. Full text search uses a virtual table to index text columns for faster search. While indexing, the text is split into searchable tokens, and each token is linked with its source row through a special column called docid, which points to the original document in the normal table. After the index is generated, users can search, and the system processes the query and uses index to locate documents that contain the matching keywords. FTS4 Usage With Room Room library was used in this demo, which provides built in support, and the setup is easy to do. Firstly, we must have a normal table. https://medium.com/media/84455741835c2f3883228f41aee4585f/href Then we can add the FTS version of it by providing FTS4 annotation with required properties in FTS table. For our case I added all of these. https://medium.com/media/1b3f03

## Building On-Device AI Agents on Android with Google ADK -- Part 4: Local RAG on Android -- Storing...

DevFeed: [Building On-Device AI Agents on Android with Google ADK -- Part 4: Local RAG on Android -- Storing...](<https://devfeed.tech/articles/building-on-device-ai-agents-on-android-with-google-adk-part-4-local-rag-on-android-storing-63036.md>)

Original publisher: [Read original article](<https://medium.com/google-developer-experts/building-on-device-ai-agents-on-android-with-google-adk-part-4-local-rag-on-android-storing-6f6d8947899d?source=rss----a67bd6fa7d58---4>)

Author: Pankaj Rai

Published: 2026-10-01T02:31:58Z

Content type: article

Language: en

Sources: [Google Developer Experts](<https://devfeed.tech/sources/google-developer-experts-medium.md>)

Topics: [Local AI](<https://devfeed.tech/topics/local-ai.md>), [Vectors & LLMs](<https://devfeed.tech/topics/vectors-llms.md>), [google-adk](<https://devfeed.tech/topics/google-adk.md>)

Tags: [adk](<https://devfeed.tech/tags/adk.md>), [ai](<https://devfeed.tech/tags/ai.md>), [android](<https://devfeed.tech/tags/android.md>), [database](<https://devfeed.tech/tags/database.md>), [memory](<https://devfeed.tech/tags/memory.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [rag](<https://devfeed.tech/tags/rag.md>), [retrieval-augmented-generation](<https://devfeed.tech/tags/retrieval-augmented-generation.md>), [room-database](<https://devfeed.tech/tags/room-database.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

### AI overview

The excerpt explains why an on-device agent should retrieve relevant information instead of placing a user's entire history in the prompt: limited context budgets, prefill latency on mobile CPUs, and irrelevant notes can impair responses. It proposes storing notes in a local Room SQLite database for Retrieval-Augmented Generation, but the excerpt ends before describing how retrieval works.

### Source excerpt

Combine Google ADK with Android's Room database to give your on-device agent permanent memory and local Retrieval-Augmented Generation. Continue reading on Google Developer Experts "