litedb-org/LiteDB
litedb-org/LiteDB has 9,491 GitHub stars and 1,324 forks. GitHot measured -1 stars in 24 hours. Last checked 2026-11-06 20:48 UTC. Last push 2026-10-28.
Comment ces chiffres sont mesurés
LiteDB – magasin de documents NoSQL pour .NET dans un fichier de données unique
Progression mesurée des étoiles
- in 24h
- -1
- in 7 days
- Mise à jour retardée
- in 15 days
- Mise à jour retardée
- in 1 month
- Mise à jour retardée
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalLiteDB - A .NET NoSQL Document Store in a single data file
LiteDB is a small, fast and lightweight .NET NoSQL embedded database.
- Serverless NoSQL Document Store
- Simple API, similar to MongoDB
- 100% C# code for .NET 4.5 / NETStandard 1.3/2.0 in a single DLL (less than 450kb)
- Thread-safe
- ACID with full transaction support
- Data recovery after write failure (WAL log file)
- Datafile encryption using DES (AES) cryptography This implemention is currently not secure, DO NOT USE.
- Map your POCO classes to
BsonDocumentusing attributes or fluent mapper API - Store files and stream data (like GridFS in MongoDB)
- Single data file storage (like SQLite)
- Index document fields for fast search
- LINQ support for queries
- SQL-Like commands to access/transform data
- LiteDB Studio - Nice UI for data access
- Open source and free for everyone - including commercial use
- Install from NuGet:
Install-Package LiteDB
New v5
- New storage engine
- No locks for
readoperations (multiple readers) Writelocks per collection (multiple writers)- Internal/System collections
- New
SQL-Like Syntax - New query engine (support projection, sort, filter, query)
- Partial document load (root level)
- and much, much more!
Lite.Studio
New UI to manage and visualize your database:

Documentation
Visit the Wiki for full documentation. For simplified chinese version, check here.
LiteDB Community
Help LiteDB grow its user community by answering this simple survey
How to use LiteDB
A quick example for storing and searching documents:
// Create your POCO class
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public string[] Phones { get; set; }
public bool IsActive { get; set; }
}
// Open database (or create if doesn't exist)
using(var db = new LiteDatabase(@"MyData.db"))
{
// Get customer collection
var col = db.GetCollection<Customer>("customers");
// Create your new customer instance
var customer = new Customer
{
Name = "John Doe",
Phones = new string[] { "8000-0000", "9000-0000" },
Age = 39,
IsActive = true
};
// Create unique index in Name field
col.EnsureIndex(x => x.Name, true);
// Insert new customer document (Id will be auto-incremented)
col.Insert(customer);
// Update a document inside a collection
customer.Name = "Joana Doe";
col.Update(customer);
// Use LINQ to query documents (with no index)
var results = col.Find(x => x.Age > 20);
}
BSON serialization
If you need direct access to raw BSON, BsonSerializer exposes overloads that write into caller-supplied Memory<byte> or IBufferWriter<byte> instances. This allows applications to reuse buffers from pools without forcing an intermediate array allocation. The Memory<byte> must be backed by a managed array. The IBufferWriter<byte> overload is available in the net8.0 and net10.0 builds, but is omitted from the netstandard2.0 API.
var writer = new ArrayBufferWriter<byte>();
var written = BsonSerializer.Serialize(document, writer);
// written now contains the BSON length and writer.WrittenSpan holds the bytes
Using fluent mapper and cross document reference for more complex data models
// DbRef to cross references
public class Order
{
public ObjectId Id { get; set; }
public DateTime OrderDate { get; set; }
public Address ShippingAddress { get; set; }
public Customer Customer { get; set; }
public List<Product> Products { get; set; }
}
// Configure the global template. Mapper-less databases clone this configuration.
var mapper = BsonMapper.Global;
// "Products" and "Customer" are from other collections (not embedded document)
mapper.Entity<Order>()
.DbRef(x => x.Customer, "customers") // 1 to 1/0 reference
.DbRef(x => x.Products, "products") // 1 to Many reference
.Field(x => x.ShippingAddress, "addr"); // Embedded sub document
using(var db = new LiteDatabase("MyOrderDatafile.db"))
{
var orders = db.GetCollection<Order>("orders");
// When query Order, includes references
var query = orders
.Include(x => x.Customer)
.Include(x => x.Products) // 1 to many reference
.Find(x => x.OrderDate <= DateTime.Now);
// Each instance of Order will load Customer/Products references
foreach(var order in query)
{
var name = order.Customer.Name;
...
}
}
Where to use?
- Desktop/local small applications
- Application file format
- Small web sites/applications
- One database per account/user data store
Plugins
- A GUI viewer tool: https://github.com/falahati/LiteDBViewer (v4)
- A GUI editor tool: https://github.com/JosefNemec/LiteDbExplorer (v4)
- Lucene.NET directory: https://github.com/sheryever/LiteDBDirectory
- LINQPad support: https://github.com/adospace/litedbpad
- F# Support: https://github.com/Zaid-Ajaj/LiteDB.FSharp (v4)
- UltraLiteDB (for Unity or IOT): https://github.com/rejemy/UltraLiteDB
- OneBella - cross platform (windows, macos, linux) GUI tool : https://github.com/namigop/OneBella
- LiteDB Studio - Fork of OneBella with bug fixes, updates and migrated to C# - https://github.com/MelnikovIG/LiteDB.Studio.Avalonia
- LiteDB.Migration: Framework that makes schema migrations easier: https://github.com/JKamsker/LiteDB.Migration/
Changelog
Change details for each release are documented in the release notes.
Code Signing
LiteDB is digitally signed courtesy of SignPath
Explorer des projets similaires
Asabeneh/30-Days-Of-Python
Le défi de programmation 30 Days of Python est un guide pas à pas pour apprendre le langage de programmation Python en 30 jours. Ce défi peut prendre plus de 100 jours. Avancez à votre rythme. Ces vidéos peuvent aussi vous aider : https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,303 étoilesgrafana/grafana
Plateforme ouverte et composable d’observabilité et de visualisation de données. Visualise les métriques, les journaux et les traces issus de plusieurs sources, comme Prometheus, Loki, Elasticsearch, InfluxDB, Postgres et bien d’autres.
77,725 étoilesredis/redis
Pour les développeurs qui créent des applications en temps réel pilotées par les données, Redis est le cache, le serveur de structures de données et le moteur de requêtes documentaires et vectorielles préféré, le plus rapide et le plus riche en fonctionnalités.
77,268 étoilesapache/superset
Apache Superset est une plateforme de visualisation et d'exploration de données.
75,439 étoiles