In this quick-start you will find just enough information to get you started using the Siaqodb- NoSQL embedded database for .NET.

Getting assemblies

The simplest way to get started is by using the nuget package. The package page will provide details on using nuget.

You can download the entire package from the Siaqodb website. After you downloaded the .zip file, simply unzip it and place the contents anywhere you want (on some Windows systems, by default, all .zip files are blocked, to unblock it: right click on downloaded zip file->Properties->Unblock).

Add a Reference to Siaqodb DLLs

Right click on the References folder in Visual Studio's Solution Explorer and select Add Reference.... Navigate to the folder where the DLLs were installed, choose from /bin folder the platform you are using and add DLLs from respective folder (example for .NET 4.5 platform):

  • Siaqodb.dll
  • SiaqodbPortable.dll

Platform considerations:

Siaqodb assemblies are platform independent, however projects require platforms specific lmdb binaries. If you use Nuget packages, those binaries will be automatically placed into your /bin folder and no action is required.

Take a look on Platform specifics for other specific settings you will have to set depending on the platform you are targeting.

Add Required using Statements

As a minimum you will need the following using statements:

using Sqo;

Step 1: Define storable classes:

public class Employee
        public Company Employer { get; set; }

        public string LastName { get; set; }
        public string FirstName { get; set; }
        public int Age { get; set; }
        public DateTime HireDate { get; set; }
        public string City { get; set; }
        public int OID { get; set; }

public class Company
       public string Name{get; set;}
       public string Address{get; set;}
       public string Phone{get; set;}
       public int OID { get; set; }

Step 2: Open/Create a database and store objects:

Siaqodb siaqodb = new Siaqodb (@"c:\Siaqodb\");
Company company = new Company();
company.Name = "MyCompany";


Employee employee1 = new Employee();
employee1.Employer = company;
employee1.FirstName = "John";
employee1.LastName = "Walter";


Step 3:Retrieve objects from database:

  • Example1: get all companies from database:

IObjectList<Company> companies = siaqodb.LoadAll<Company>();

  • Example 2: get all employees that FirstName contains "John"
var query = from Employee emp in siaqodb
                 where emp.FirstName.Contains("John")
                 select emp;

foreach (Employee emp in query)
//do something with employee

  • Example 3: get all Employees that are over 30 years old and are from Berlin:
var query2 = from Employee emp in siaqodb
                  where emp.Age > 30 && emp.City == "Berlin"
                  select emp;

foreach (Employee emp in query2)
//do something with employee

  • Example 4: get all Employees that work at "MyCompany" company:
var query3= from Employee1 emp in siaqodb
                 where emp.Employer.Name == "MyCompany"
                 select new { emp.FirstName, emp.LastName };

For more examples, download siaqodb setup and take a look on Examples projects