RizeDb 1.0.1

A free, ultra portable, embedded, nosql, serverless database. Designed to be easy to use and easy to deploy. Works in any .net environment that supports .net Standard. Perfect for Apps, IoT, Xamarin or any project requiring a light weight database. It has both a document store implementation and a relational implenetation with an Entity Framework like interface for a complete NoSql solution.
Thread Safe
AES Encryption

Install-Package RizeDb -Version 1.0.1
dotnet add package RizeDb --version 1.0.1
<PackageReference Include="RizeDb" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RizeDb --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Document-Oriented

RizeDb has a document-oriented implementation that allows for the storing, indexing and
retrieving of documents. Documents are not stored into tables and have very little structure to them.

RizeDb's document store requires no schema and document values can change types without requiring the
database to update all existing data. By default, nearly all document data is indexed so that finding
data is fast and easy.

Rize Db Primer

The first step to creating a document store is simply to instantiate the DocumentStore object with a stream.

using(var stream = new MemoryStream())
{
   using(var documentStore = new RizeDb.DocumentStore(stream))
   {
      //Code goes here
   }
}

Once your document store is created, create POCO classes.

public class Order
{
    public long Id { get; set; } //This is the only required field
    public string Number { get; set; }
    public DateTime Date { get; set; }
    public List<OrderItem> OrderItems = { get; set; }
}

public class OrderItems
{
    public string ItemName { get; set; }
    public decimal Price { get; set; }
    public int Quantity { get; set; }
}

Now that your POCO classes are created, instantiate and fill an Order object with data.

var order = new Order()
{
    Numer = "1001",
    Date = DateTime.Now,
    OrderItems = new List<OrderItem>();
}

order.OrderItems.Add(new OrderItem()
{
    ItemName = "Sun Glasses",
    Price = 19.99,
    Quantity = 1
});

order.OrderItems.Add(new OrderItem()
{
    ItemName = "Flashlight",
    Price = 10.50,
    Quantity = 4
});

Once your order is ready to be stored simply add it to a document collection.

documentStore.Store("Orders", order);

This will store the order object and its' items as one document into a collection named "Orders".
If the collection "Orders" does not already exist it will be created. Now that the order document has
been stored into a collection it will have a unique value assigned to the Id property of order. This
The Id value is what will be used to retrieve, update or delete the order in the future.

Retrieving your document is as simple as requesting it by Id.

var order = documentStore.Retreive<order>("Orders", 1 /*Assuming the document Id is 1*/);

The retrieve method will create an Order object and its' OrderItem objects and populate them with the exact same data that was stored.

You can also lookup documents by values.

var orders = documentStore.Retreive<order>("Orders", o => o.Number == "1001");

This call to the Retrieve method will create an IEnumerable object containing all Orders objects with
the Number "1001".

You can also search by child object values.

var orders = documentStore.Retreive<order>("Orders", o => o.OrderItems.Any(i => i.ItemName == "Flashlight"/);

Again you will get an IEnumerable object containing all orders that have an order item with the ItemName of "Flashlight".

By default, all values except for byte arrays are indexed so lookups are fast and flexible.

You can even use a different object to retrieve data.

public class OrderHeader
{
    public long Id { get; set; }
    public string Number { get; set; }
}

var orderHeader = documentStore.Retreive<OrderHeader>("Orders", 1 /*Assuming the document Id is 1*/);

This call will create and return an OrderHeader object with the Number property set to "1001".

And finally you can change the type of the property and the properties will still get set as long as they
are compatible.

public class OrderHeader2
{
    public long Id { get; set; }
    public int Number { get; set; } //<-- This was changed to an Int32
}

var orderHeader2 = documentStore.Retreive<OrderHeader2>("Orders", 1 /*Assuming the document Id is 1*/);

Now the newly create OrderHeader2 will have an integer value for the Number property set to 1001. Changing types
will work for most types, but some are not compatible and will either be null or default when the document is retrieved.

Please visit VizeoTech.com for full Documentation

Document-Oriented

RizeDb has a document-oriented implementation that allows for the storing, indexing and
retrieving of documents. Documents are not stored into tables and have very little structure to them.

RizeDb's document store requires no schema and document values can change types without requiring the
database to update all existing data. By default, nearly all document data is indexed so that finding
data is fast and easy.

Rize Db Primer

The first step to creating a document store is simply to instantiate the DocumentStore object with a stream.

using(var stream = new MemoryStream())
{
   using(var documentStore = new RizeDb.DocumentStore(stream))
   {
      //Code goes here
   }
}

Once your document store is created, create POCO classes.

public class Order
{
    public long Id { get; set; } //This is the only required field
    public string Number { get; set; }
    public DateTime Date { get; set; }
    public List<OrderItem> OrderItems = { get; set; }
}

public class OrderItems
{
    public string ItemName { get; set; }
    public decimal Price { get; set; }
    public int Quantity { get; set; }
}

Now that your POCO classes are created, instantiate and fill an Order object with data.

var order = new Order()
{
    Numer = "1001",
    Date = DateTime.Now,
    OrderItems = new List<OrderItem>();
}

order.OrderItems.Add(new OrderItem()
{
    ItemName = "Sun Glasses",
    Price = 19.99,
    Quantity = 1
});

order.OrderItems.Add(new OrderItem()
{
    ItemName = "Flashlight",
    Price = 10.50,
    Quantity = 4
});

Once your order is ready to be stored simply add it to a document collection.

documentStore.Store("Orders", order);

This will store the order object and its' items as one document into a collection named "Orders".
If the collection "Orders" does not already exist it will be created. Now that the order document has
been stored into a collection it will have a unique value assigned to the Id property of order. This
The Id value is what will be used to retrieve, update or delete the order in the future.

Retrieving your document is as simple as requesting it by Id.

var order = documentStore.Retreive<order>("Orders", 1 /*Assuming the document Id is 1*/);

The retrieve method will create an Order object and its' OrderItem objects and populate them with the exact same data that was stored.

You can also lookup documents by values.

var orders = documentStore.Retreive<order>("Orders", o => o.Number == "1001");

This call to the Retrieve method will create an IEnumerable object containing all Orders objects with
the Number "1001".

You can also search by child object values.

var orders = documentStore.Retreive<order>("Orders", o => o.OrderItems.Any(i => i.ItemName == "Flashlight"/);

Again you will get an IEnumerable object containing all orders that have an order item with the ItemName of "Flashlight".

By default, all values except for byte arrays are indexed so lookups are fast and flexible.

You can even use a different object to retrieve data.

public class OrderHeader
{
    public long Id { get; set; }
    public string Number { get; set; }
}

var orderHeader = documentStore.Retreive<OrderHeader>("Orders", 1 /*Assuming the document Id is 1*/);

This call will create and return an OrderHeader object with the Number property set to "1001".

And finally you can change the type of the property and the properties will still get set as long as they
are compatible.

public class OrderHeader2
{
    public long Id { get; set; }
    public int Number { get; set; } //<-- This was changed to an Int32
}

var orderHeader2 = documentStore.Retreive<OrderHeader2>("Orders", 1 /*Assuming the document Id is 1*/);

Now the newly create OrderHeader2 will have an integer value for the Number property set to 1001. Changing types
will work for most types, but some are not compatible and will either be null or default when the document is retrieved.

Please visit VizeoTech.com for full Documentation

Release Notes

Added document store option and renamed from Database.net

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 48 7/26/2019
1.0.0 50 7/24/2019