Embedded nosql database db4o

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.