From Wikipedia, the free encyclopedia
Jump to: navigation, search
Developer(s) Jeffrey Dean, Sanjay Ghemawat
Written in C++
Size 350 kB (binary size)
Type Database library
License New BSD License
Website code.google.com/p/leveldb/

LevelDB is an open source on-disk key-value store written by Google Fellows Jeffrey Dean and Sanjay Ghemawat,[1][2] who built parts of Google's platform. Inspired by BigTable,[3] LevelDB is hosted on Google Code under the New BSD License and has been ported to a variety of Unix-based systems, Mac OS X, Windows, and Android.[4] Open webOS's DB8 database service and also Basho Technologies' Riak use it as a backend.[5]


LevelDB stores keys and values in arbitrary byte arrays, and data is sorted by key. It supports batching writes, forward and backward iteration, and compression of the data via Google's Snappy compression library.

LevelDB is not a SQL database. Like other NoSQL and Dbm stores, it does not have a relational data model, it does not support SQL queries, and it has no support for indexes. Applications use LevelDB as a library, as it does not provide a server or command-line interface.

MariaDB 10.0 will come with a Storage Engine which will allow users to query LevelDB tables from MariaDB.[6]


LevelDB is based on concepts from Google's BigTable database system. The tablet implementation for the BigTable system was developed starting in about 2004, and is based on a different Google internal code base than the LevelDB code. That code base relies on a number of Google code libraries that are not themselves open sourced, so directly open sourcing that code would have been difficult. Jeff Dean and Sanjay Ghemawat wanted to create a system resembling the BigTable tablet stack that had minimal dependencies and would be suitable for open sourcing, and also would be suitable for use in Chrome for the IndexedDB implementation. They wrote LevelDB starting in early 2011, with the same general design as the BigTable tablet stack, but not sharing any of the code.[7]


LevelDB is used as the backend database for Google Chrome's IndexedDB and is one of the supported backends for Riak.[8]


Google has provided benchmarks comparing LevelDB's performance to SQLite and Kyoto Cabinet in different scenarios.[9] LevelDB outperforms both SQLite and Kyoto Cabinet in write operations and sequential-order read operations. LevelDB also excels at batch writes, but is slower than SQLite when dealing with large values.


  1. ^ "Google Research Scientists and Engineers: Jeffrey Dean". Google, Inc. 
  2. ^ "Research Scientists and Engineers: Sanjay Ghemawat". Google, Inc. 
  3. ^ "Google Open-Sources NoSQL Database Called LevelDB". ReadWriteWeb. July 30, 2011. Retrieved July 30, 2011. 
  4. ^ "Google Open Source Blog: LevelDB: A Fast Persistent Key-Value Store". Google, Inc. 
  5. ^ "Open webOS Overview". Hewlett-Packard Development Company, L.P. Retrieved April 15, 2012. 
  6. ^ LevelDB storage engine
  7. ^ Jeff Dean. "LevelDB mailing list: "Current Status of LevelDB"". 
  8. ^ LevelDB. Docs.basho.com. Retrieved on 2013-09-18.
  9. ^ "LevelDB Benchmarks". Google, Inc. 

External links[edit]

Unofficial community-based website