iBoxDB

Fast ACID Table Style Document NoSQL Database

fast lightweight ACID embedded table style document NoSQL database for java c# android unity xamarin mono blazor .net core linux windows. Application NoSQL Database small footprint makes it easier and cheaper to store and process data. Thread-Safe best lightweight general purpose Java .NET Local ACID database. NoSQL Embedded Document Database Engine Java C# Mono Android iPhone ASP.NET Core. lightweight serverless database best NoSQL database embedded for java .net c# android stable standalone DB. Local Database Lightweight self-contained database Cross Platform for Linux and Mac and Win. In Memory and On Disk Mobile Database, Java C# Local Serverless NoSQL Storage, with SQL Document Table. embedded database server cross-platform development. support Blazor to store data on server or client. and can post database from client to server when online.

Project Description

iBoxDB is a fast acid table style document NoSQL Embedded Database, easily store objects and documents, traditional table with unstructured data, zero configuration, pure JAVA and DotNET engines, no dependencies.

iBoxDB has a well designed interface with great performance and capability for agile development. You can create applications with database services embedded and deploy it on mobiles, desktops, servers, to locally persist your data from anywhere.

Green, low carbon emission!

Dual Core Application Database
For   JAVA   C#   Android   Unity   Xamarin   Mono   Linux   Windows

Features

Examples

Each box is an ISOLATED data space (transaction-based)
  using(var box = auto.Cube())
  {                            
     //select, insert, update, delete ...
     CommitResult cr = box.Commit();
  }
  try(Box box = auto.cube()){
     ...
     CommitResult cr = box.commit();
  }  
Normal Object
  Member m = new Member();  
  m.Id = box.NewId();
  m.Name = "Andy";
  m.Password = EncodePassowrd("123");
  box["Member"].Insert(m);
  Member m = new Member();
  m.Id = box.newId();
  m.Name = "Kevin";
  box.d("Member").insert(m); 
Dynamic Object (document database)
  //Game : Dictionary<string, object>
  game["GameType"] = "ACT";
  box["Product"].Insert(game);
  //Game extends HashMap<String,Object>
  game.put("GameType", "ACT");
  box.d("Product").insert(game);  
Key Value Style Query
  box["Table", 2L].Select<Member>();
   //Composite Key
  box["Table2", 99, "ABC"].Select<Product>();
  box.d("Table", 3L).select(Member.class);
  //Composite Key
  box.d("Table2", 88, "ABC").select(Product.class);  
SQL Like
  /* 
  from TABLE where A>? & B<=? order by C limit 0,10

  from [table] where [condition] 
                      order by [field1] desc,[field2] limit [0,10]
  [Condition:] == != < <= > >= & | ( )
  */ 
  box.Select<Member>("from Member where Name==?", "MyName");
  box.select(Member.class, "from Member where Name==?", "MyName"); 
Query
  //query
  box.Select("from Member");
  //load to memory first, startswith '*'
  box.Select("*from Member");
  //selecting tracer, startswith '!'
  box.Select("!from Member")  
Index, make Select hundred times faster in average
  config.EnsureIndex<Member>("Member", "Field1","Field2")
  config.ensureIndex(Member.class, "Member", isUnique,"Field1","Field2")
  box.Select("from Member where Field1 == ? & Field2 == ?",arg1,arg2)
Custom QueryFunction
  box.Select<Member>("from Member where [Tags]", new IFunction("Value"))
Compatible with LINQ (.NET)
  from o in box.Select<Member>("from Member")
  where o.Text.Contains(text) select o;
Compatible with Stream (Java)
  StreamSupport
   .stream(box.select(Member.class,"from Member").spliterator(), true)
   .collect(groupingBy(m -> m.group, summarizingLong(m -> m.value)))
Snapshot-Serializable Transaction
Transaction Step Isolation Level
using(var box = auto.Cube()){
  //Snapshot...
  box.Commit( ()=>{
    //Serializable...  
  });                            
}
Application Point Snapshot
Database Point Serializable
Update Increment
Apply To Trigger Type Value From
UpdateIncrement non-primary key insert/update long Database NewId(MaxPos,1)
AutoIncrement primary key insert number Table Max(ID)+1
Generator Time
UpdateIncrement Serializable Transaction Commit
AutoIncrement Data Insert, Differed from Commit order
Selecting Tracer
Thread Usage
Tracer non-blocked read/write different records
Locker blocked read/write same record
IO
.NET JAVA
 class BoxFileStreamConfig
 class BoxMemoryStreamConfig
 class ReadonlyStreamConfig
 class CacheStreamConfig 
 class BoxFileStreamConfig 
 class BoxMemoryStreamConfig
 class ReadonlyStreamConfig
 class CacheStreamConfig 
Database Path
C# & JAVA,  place outside IDE working directory can get better performance
iBoxDB.LocalServer.DB.Root("/data/"); 
ASP.NET Cross Platform
iBoxDB.LocalServer.DB.Root(MapPath("~/App_Data/"));
Xamarin
iBoxDB.LocalServer.DB.Root(System.Environment.GetFolderPath( 
       System.Environment.SpecialFolder.Personal));
Unity3D
iBoxDB.LocalServer.DB.Root(Application.persistentDataPath);
Android
iBoxDB.LocalServer.DB.root(android.os.Environment.getDataDirectory()
       .getAbsolutePath() + "/data/" + packageName + "/"); 
JSP WebApplication
@WebListener()
public class StartListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
       String path = System.getProperty("user.home") + "/data/"; 
       new File(path).mkdirs();   
       iBoxDB.LocalServer.DB.root(path); 
    }
} 
Getting Started   C# and Java
 using iBoxDB.LocalServer;

 var db = new DB();
 db.GetConfig().EnsureTable<Record>("Table", "Id");
 AutoBox auto = db.Open();

 auto.Insert("Table", new Record { Id = 1L, Name = "Andy" });
 var o1 = auto.Get<Record>("Table", 1L);
 o1.Name = "Kelly";
 auto.Update("Table", o1);
 auto.Delete("Table", 1L);  
 import iBoxDB.LocalServer.*;

 DB db = new DB();
 db.getConfig().ensureTable(Record.class, "Table", "Id");
 AutoBox auto = db.open();

 auto.insert("Table", new Record(1L, "Andy"));
 Record o1 = auto.get(Record.class, "Table", 1L);
 o1.Name = "Kelly";
 auto.update("Table", o1);
 auto.delete("Table", 1L);  
Install
.NET: Add NETDB/iBoxDB.DLL  to Project
Java: Add JavaDB/iBoxDB.jar to Project
Benchmark with MySQL
iBoxDB
 Insert: 1,000,000 AVG: 47,016 objects/s 
 Update: 1,000,000 AVG: 25,558 objects/s 
 Delete: 1,000,000 AVG: 42,714 objects/s 

MySQL
 Insert: 1,000,000 AVG: 5,514 objects/s 
 Update: 1,000,000 AVG: 5,109 objects/s 
 Delete: 1,000,000 AVG: 6,044 objects/s 
Supported Types
.NET JAVA
 bool
 char
 byte
 sbyte
 short 
 ushort
 int
 uint
 long
 ulong              
 float
 double        
 decimal
 DateTime
 Guid
         
 bool? 
 char? 
 byte? 
 sbyte? 
 short?
 ushort? 
 int? 
 uint? 
 long? 
 ulong?      
 float? 
 double? 
 decimal?
 DateTime?
 Guid? 
 string 
       
 //non-indexable
 Dictionary<string, object>
 MemoryStream
 byte[]
 string[]
  
 boolean 
 Boolean
 byte 
 Byte
 char 
 Character
 short 
 Short
 int 
 Integer
 long 
 Long
 float
 Float
 double
 Double
 UUID
 Date

 //dynamic length
 BigDecimal
 BigInteger
 String
 
 //non-indexable
 HashMap<String,Object>
 MemoryStream
 byte[]
 Object[]









                            
Automatic Object Mapping
//Name
*.Name

//name
*.name



                            
//Name
*.Name
*.Name(val)
*.setName(val)

//name
*.name
*.name(val)
*.setname(val) 
Composite Key Supported
Database Composite Key
config.ensureTable(Item.class, "Item", "UID", "Type")

Replication Master-Slave , Master-Master
Database Replication
NoSQL Application Database for JAVA, .NET, Android, Mono, Unity3D, Xamarin, Linux, Windows

NEXT - >
iBoxDB professional document database ACID NoSQL application database c# java .net core xamarin unity3d android embedded document database powerful cross platform NoSQL databases system. Application NoSQL database small footprint makes it easier and cheaper to store and process data. NoSQL embedded document database engines for java .net core c# mono android. cross-platform development. Just Enough to Get the Job Done.