iBoxDB Fast ACID NoSQL Document Database Java C# Unity Xamarin Mono

iBoxDB

Fast ACID Table Style Document NoSQL Application Database

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, Java C# Local Serverless NoSQL Storage, Entity-Component-System Database Engine, with SQL Document Table. embedded database server cross-platform development.

Project Description

iBoxDB is a fast transactional table style document NoSQL Application Database, easily store, process objects and documents, traditional table with unstructured data, zero configuration, pure JAVA and .NET 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 persist your data from anywhere.

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

Features

Examples

Each box is an ISOLATED data space (transaction-based)
  using(var box = auto.Cube())
  {                            
     //select, insert, update, delete ...
     var result = box.Commit();
  }
  try(Box box = auto.cube()){
     ...
     CommitResult r = box.commit();
  }  
Normal Object
  box["Member"].Insert(new Member() {  
       ID=box.NewId(),
       Name = "Andy",
       Password = EncodePassowrd("123"),
       Tags = new string[]{ "Nice" , "Fast" }
     }
  );
  Member m = new Member();
  m.ID = box.newId();
  m.setName("Kevin");
  m.setTags(new Object[] { "Handsome", "Strong" });
  box.d("Member").insert(m); 
Dynamic Object (document database)
  game["GameType"] = "ACT";
  box["Product"].Insert(game);
  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:] == != < <= > >= & | ( )
  [IFunction:] =[F1,F2,F3] 
  */ 
  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, startwith '*'
  box.Select("*from Member");
  //selecting tracer, startwith '!'
  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 == ?")
Custom QueryFunction
  box.Select<Member>("from Member where [Tags]", new Query("Value"));
Compatible with LINQ (.NET)
  from o in box.Select<Class>("from Class")
  where o.Text.Contains(text)
  select o;
Compatible with Stream (Java8)
  StreamSupport.stream(db.select("from Table").spliterator(), true)
  .collect(Collectors.groupingBy((l) -> l.get("GroupID"),
   Collectors.summingLong((l) -> (Long) l.get("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 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
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[]









                            
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
Command Line   F# and JavaScript
 #r "iBoxDB.dll" 
 open iBoxDB.LocalServer 
 open System 
 DB.Root( "C:\\DB" ) 
 let db = new DB() 
 let auto = db.Open() 
 for v in auto.Select("from OT limit 0 , 2") do 
   Console.WriteLine(DB.ToString(v)) 
 for v in auto.GetDatabase().GetSchemata() do 
   Console.WriteLine(v.Key) 
 db.Dispose()
 //jjs -cp iBoxDB.jar 
 var DB = Java.type("iBoxDB.LocalServer.DB") 
 DB.root("/db/") 
 var db = new DB() 
 var auto = db.open() 
 auto.select("from table1 limit 0,3") 
   .forEach( function(v){ print(v) }) 
 auto.getDatabase().getSchemata() 
   .forEach( function(v){ print(v) }) 
 db.close()   
Benchmark with MongoDB
iBoxDB.Java 32bit System Low Memory
iBoxDB.java v1.4.1 mongodb-win32-i386-2.5.4 mongo-java-driver-2.9.3.jar
threadCount=100000 , batchCount=10
MongoDB(Default) 
 Insert:1000000  AVG:10521 objects/s
 
iBoxDB(File Mode)
 Insert:1000000  AVG:17981 objects/s
 Update:1000000  AVG:12397 objects/s 
 Delete:1000000  AVG:22869 objects/s
            
iBoxDB(MemoryMappedFile Mode) 
 Insert:1000000  AVG:38458 objects/s
 Update:1000000  AVG:20200 objects/s 
 Delete:1000000  AVG:33342 objects/s
 
iBoxDB(InMemory Mode)
 Insert:1000000  AVG:39132 objects/s
 Update:1000000  AVG:20226 objects/s 
 Delete:1000000  AVG:33658 objects/s 

iBoxDB.NET 64bit System
iBoxDB v1.5 mongodb-win32-x86_64-2008plus-2.4.5 MongoDB.Driver v1.8.2.34
MongoDB(Default) 
 Insert:1,000,000  AVG: 32,702 objects/s
 
iBoxDB(File Mode) 
 Insert:1,000,000  AVG:33,368 objects/s
 Update:1,000,000  AVG:16,939 objects/s 
 Delete:1,000,000  AVG:22,504 objects/s
 
iBoxDB(MemoryMappedFile Mode)
 Insert:1,000,000  AVG:42,236 objects/s
 Update:1,000,000  AVG:17,765 objects/s 
 Delete:1,000,000  AVG:23,147 objects/s
 
iBoxDB(InMemory Mode)
 Insert:1,000,000  AVG:47,382 objects/s
 Update:1,000,000  AVG:26,806 objects/s 
 Delete:1,000,000  AVG:35,092 objects/s   
Composite Key Supported
iBoxDB Fast ACID NoSQL Application Database Composite Key
config.ensureTable(Item.class, "Item", "UID", "Type")

Replication Master-Slave , Master-Master
iBoxDB Fast Transactional NoSQL Application Database Replication
iBoxDB Fast Transactional NoSQL Application Database for JAVA, .NET, Android, Mono, Unity3D, Xamarin, Nashorn, Linux, Windows
International iBoxDB
iBoxDB Professional Document Database ACID NoSQL Application Database C# Xamarin Unity3D Android Java Embedded Document Database Powerful Cross Platform NoSQL Database System. Just Enough to Get the Job Done.