. NET Document Database-raven

Source: Internet
Author: User

Raven is a LINQ-based, weakly-formatted (shcema-less) document data Storage service for. Net/windows. Raven is not another nosql, nor a relational solution, but rather a solution to the performance and extensibility requirements of large Web applications.

Raven can save all types of data as JSON documents without imposing a particular format on them. This means that the data can be saved in any format, especially for the following scenarios:

Web-related data, such as user sessions, shopping carts, and so on--raven the document-based nature means that you can get and save all the data you need to process in a separate remote call.

Dynamic entities, such as user-defined entities, entities with a large number of optional fields, and so on--raven free-form features mean you don't have to be tired of implementing relational models.

Persistent view model--instead of recreating the view model from scratch at every request, you can simply save its final form in Raven. This reduces computational time, reduces the number of remote calls, and improves overall performance.

Large Datasets--raven's underlying storage mechanism can support more than 1T of capacity (on a single machine), and the nature of the non-relational features makes it easy to share databases on multiple machines, which is extremely natural for Raven.

The following code fragment is a sample document stored in Raven:

{
    "PostTypeId":1,
    "Id":2321816,
    "Title":"Storing commercial files on the server",
    "AcceptedAnswerId":2321854,
    "LastActivityDate":"\/Date(1266953391687+0200)\/",
    "AnswerCount":3,
    "Comments":[
          {
          "Score":null,
          "CreationDate":"\/Date(1266952919510+0200)\/",
          "Text":"are they \"sensitive\" information?",
          "UserId":"users/203907"
    },
          {
          "Score":null,
          "CreationDate":"\/Date(1266953092057+0200)\/",
          "Text":"I wouldn't say they are sensitive information...",
          "UserId":"users/200145"
    }
   ]
}

Each document has a key or a document ID associated with it, and the key in the example above is "2321816". In addition to documents, Raven can also store meta data or text/binary attachments attached to a document. To search for and retrieve documents from the data store, Raven uses the index to complete:

An index is a LINQ query that operates on top of a series of documents and generates projections for each document to make the query more efficient. An index is an important LINQ query that Raven can perform in the background, and its results are saved in persistent storage. These queries can be efficiently queried at a later date.

Here is an example of organizing a post with title as an index:

from post in docs.Posts 
where post.AcceptedAnswerId != null
select new { post.Title };

After the index is created, the user can use the query only to obtain the document they are looking for.

Raven provides HTTP APIs and client APIs (C #). The HTTP API has the same functionality as the client API, making it accessible to programs that can only use JavaScript and HTML. Contains some of the following commands:

Get

Put

POST

DELETE

PATCH

The HTTP API also supports the ability to get multiple documents or batch requests in one call.

Raven is issued based on 3 license agreements:

Raven DB community–a Free Edition that can is used only to open source projects with no support

Raven DB commercial–a paid-for Edition for commercial software with support for a limited number of incidents/year

Raven DB enterprise–similar to commercial but has extra features-like sharding, unlimited master/slave, replicas R, replication to RDBMS, and better support.

Raven DB community--free version, only for open source projects, no technical support

Raven DB commercial--paid commercial software providing technical support with event and annual restrictions

The Raven DB enterprise--is similar to the commercial edition, but has some additional features such as fragmentation, unlimited master/From replication, failover, replication to the RDBMS, and better technical support.

Both business editions have either a monthly subscription or a long term license. Raven was developed by hibernating rhinos, a consulting firm created by Ayende Rahien.

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.