Nosql is a hot topic recently. It can be seen in high-performance and high-concurrency systems. For example, memcached and MongoDB, memcached only supports column-store, And MongoDB does not support transactions. Most importantly, these require server support. In some embedded systems, the hardware environment is overwhelmed by the old bull.
At a friend's suggestion, I tried to use db4o and found that such a good database exists.
The main advantages include:
1. Fully open-source.
2. acid is supported.
3. All supported.
4. Provides the vs2010 plug-in designer.
5. provides two Integration Methods: Embedded Version and server.
Let's take an example to see the benefits of db4o.
Creation object:
Namespace Db4objects. db4o. Tutorial. f1.chapter1 { Public Class Pilot { String _ Name; Int _ Points; Public PILOT ( String Name, Int Points) {_ name = Name; _ points = Points ;} Public String Name { Get { Return _ Name ;}} Public Int Points { Get { Return _ Points ;}} Public Void Addpoints (Int Points) {_ points + = Points ;} Override Public String Tostring (){ Return String . Format ( " {0}/{1} " , _ Name, _ points );}}}
Open connection
//Accessdb4oIobjectcontainer DB =Db4ofactory. openfile (util. yapfilename );Try{//Do something with db4o}Finally{DB. Close ();}
Storage objects:
//StorefirstpilotPilot pilot1 =NewPILOT ("Michael Schumacher",100); DB. Set (pilot1); console. writeline ("Stored {0}", Pilot1 );
During development,CodeVery concise and clear.