NDatabase


NDatabase 3.8

[Download for .net 3.5] [Download for .net 4.0] [Download for .net 4.5] [Download for Mono]

NDatabase 3.4

[Download for Silverlight] [Download for WindowsPhone] [Download for CompactFramework]

NDatabase is a easy to use .NET Object Database. To avoid impedance mismatch overhead between Object and Relational worlds, give a try to NDatabase. NDatabase is a new generation Object Database: a real native and transparent persistence layer for .NET.
  • Object because the basic persistent unit is an object, not a table.
  • Native and Transparent because it directly persists objects the way they exist in the native programming language, without any conversion.

Using NDatabase as your persistence layer will let you focus on your business logic allowing storing and retrieving native objects in a single line of code. No more Relational to Object mapping is necessary, NDatabase just persists objects the way they are, no matter their complexity.

[Release Notes]

Features


 
NDatabase 3
  • One single database file to store all data:
    • Meta-model
    • Objects
    • Indexes
  • Handles cycle detection and circular references
  • Safe access from many threads and from many processes
  • Store private members (even marked as readonly)
  • NoSQL, Linq support and SODA queries
  • Values Queries, supporting metrics like Max, Min, Avg, Count and others
  • Compatible with LinqPad
  • Transactions Support (ACID)
  • Store any object, no need for Serializable attribute, OID, or anything else
  • Zero Configuration, just reference NDatabase3.dll
  • Use as In-Memory Database
  • Portability - identify types only by namespace and class name
  • Automatic Database Creation
  • BTree Indexes
    • Unique indexes
    • Non Unique indexes
  • Paging
  • Triggers
    • Select trigger (after)
    • Insert trigger (before, after)
    • Delete trigger (before, after)
    • Update trigger (before, after)
  • Refactoring
    • Adding a new field (via API)
    • Removing a field (via API)
    • Rename a class (via API)
    • Rename a field (via API)
  • Logging mechanism extensible with custom loggers
    • Sample loggers: log4net, Console
  • NonPersistent attribute
  • CascadeDelete attribute - allowing on cascade delete
  • OID attribute - allows on mapping internal OID to class defined field
  • Built-in caching
  • Sample Northwind database
  • Handle Assembly Version Changes
  • Dynamic Schema Evolution
  • Source Code Available
  • Supported Platforms
    • Microsoft .net 3.5, 4.0, 4.5
    • Silverlight 4, Silverlight 5 (see limitations)
    • Windows Phone 7.1, Windows Phone 7.5 (see limitations)
    • Mono (4.0)
    • NuGet

[See more]

Sponsors



NDepend

Structure101

ReSharper

Syncfusion

How to persist an object with NDatabase


// Create the instance be stored
var sport = new Sport("volley-ball");

// Open the database
using (var odb = OdbFactory.Open("test.db"))
{
    // Store the object
    odb.Store(sport);
}

How to retrieve object from NDatabase

// Open the database
using (var odb1 = OdbFactory.Open("test.db"))
{
    var sports = odb1.QueryAndExecute<Sport>();

    // code working on sports list
}

The Sport class definition

public class Sport
{
    public Sport(string name)
    {
        Name = name;
    }

    public string Name { get; set; }

    public override string ToString()
    {
        return Name;
    }
}

To quickly understand how NDatabase works, have a look at the 1 minute tutorial . For a deeper introduction, check the 5 minutes tutorial and/or the full NDatabase documentation.

NDatabase is released under the GNU LGPL license.

Last edited May 12, 2013 at 4:38 PM by jacek, version 118