Lovefield
discontinuedby Google · since 2015 · also known as google/lovefield
Google's pure-JavaScript relational database for web apps, layered over IndexedDB; archived since 2021.
discontinued. GitHub repository archived (no commits since Aug 2021); last npm release 2.1.12 (Feb 2017). Consider SQLite WASM, PGlite or Dexie.
Overview
Lovefield is a relational query engine written in JavaScript by Google and open-sourced in 2014-2015. You declare a typed schema, and a fluent SQL-like API (select, from, where, innerJoin, orderBy, groupBy) runs queries with an optimizer, indexes, constraints, transactions and observable queries for data binding, persisting rows to IndexedDB or keeping them in memory (Firebase was an optional backend). It worked across Chrome, Firefox, IE 11, Edge and Safari and, per its FAQ, Inbox by Gmail relied on it heavily. The last npm release, 2.1.12, dates from February 2017 and the GitHub repository is archived; for new browser apps, SQLite compiled to WebAssembly, PGlite or Dexie are the usual choices.
Strengths & trade-offs
Strengths
- +Real relational queries with joins, aggregation and an optimizer in the browser
- +Declarative schema with indexes, constraints and transactions
- +Observable queries for UI data binding
- +Proven at scale inside Inbox by Gmail
Trade-offs
- −Archived and unmaintained since 2021
- −Fluent API rather than SQL text; no SQL compatibility
- −Performance bounded by IndexedDB and JavaScript execution
Great for
- +Maintaining older web apps built on it
- +Learning how a relational engine maps onto IndexedDB
Think twice for
- −New browser apps (prefer SQLite WASM, PGlite or Dexie)
- −Server-side Node.js data storage
Capabilities
Native or official first-party support · 5 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- No
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Strict
- Architecture
- Embedded, In memory
- Query languages
- SQL-like JavaScript query builder
Bounded by browser storage quotas and memory.
Deployment
Ecosystem
Alternatives to Lovefield
The browser's built-in transactional object store, and the storage layer under most web local-first libraries.
lovefield vs indexeddb →The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.
lovefield vs dexie →Real PostgreSQL compiled to WebAssembly: an embeddable Postgres for browsers, Node, Bun and Deno.
lovefield vs pglite →Pure-JavaScript in-memory SQL engine for browsers and Node.js that queries arrays, JSON, CSV and Excel files.
lovefield vs alasql →Reactive local-first NoSQL database for JavaScript with pluggable storage and replication.
lovefield vs rxdb →In-memory JavaScript document store with indexes and pluggable persistence; no longer maintained.
lovefield vs lokijs →Lovefield FAQ
What is Lovefield?
Lovefield is a relational database by Google, first released in 2015. Lovefield is a relational query engine written in JavaScript by Google and open-sourced in 2014-2015. You declare a typed schema, and a fluent SQL-like API (select, from, where, innerJoin, orderBy, groupBy) runs queries with an optimizer, indexes, constraints, transactions and observable queries for data binding, persisting rows to IndexedDB or keeping them in memory (Firebase was an optional backend). It worked across Chrome, Firefox, IE 11, Edge and Safari and, per its FAQ, Inbox by Gmail relied on it heavily. The last npm release, 2.1.12, dates from February 2017 and the GitHub repository is archived; for new browser apps, SQLite compiled to WebAssembly, PGlite or Dexie are the usual choices.
Is Lovefield open source?
Yes. Lovefield is open source. License: Apache License 2.0.
Does Lovefield support ACID transactions?
Yes. Lovefield supports full ACID transactions, with strong consistency.
Does Lovefield scale horizontally?
Lovefield does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).
How can I run Lovefield?
You can embed it in your application.
What is Lovefield best for?
Lovefield is a strong fit for maintaining older web apps built on it and learning how a relational engine maps onto IndexedDB. Think twice for new browser apps (prefer SQLite WASM, PGlite or Dexie).
What are the best alternatives to Lovefield?
Common alternatives to Lovefield include IndexedDB, Dexie.js, PGlite, AlaSQL and RxDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
Is Lovefield still maintained?
Lovefield is discontinued. GitHub repository archived (no commits since Aug 2021); last npm release 2.1.12 (Feb 2017). Consider SQLite WASM, PGlite or Dexie.
How popular is Lovefield?
Lovefield ranks #413 of 844 databases on the WhichDB Score (4.3/100), and #133 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.



