`

Raven .NET的文档数据库

阅读更多
Raven is schema-less LINQ-enabled document data store for .NET/Windows. Raven is yet another NoSQL, non-relational solution that wants to address the performance and scalability needs required by large web applications.

Raven can store all sorts of data as JSON documents without imposing a specific schema on their content. That means data can have arbitrary formats being appropriate for the following scenarios:

•Web Related Data, such as user sessions, shopping cart, etc. - Raven's document based nature means that you can retrieve and store all the data required to process a request in a single remote call.
•Dynamic Entities, such as user-customizable entities, entities with a large number of optional fields, etc. - Raven's schema free nature means that you don't have to fight a relational model to implement it.
•Persisted View Models - Instead of recreating the view model from scratch on every request, you can store it in its final form in Raven. That leads to reduced computation, reduced number of remote calls and improved overall performance.
•Large Data Sets - The underlying storage mechanism for Raven is known to scale in excess of 1 terabyte (on a single machine) and the non relational nature of the database makes it trivial to shard the database across multiple machines, something that Raven can do natively.
The following snippet is an example of a 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, the key being “2321816” for the example mentioned above. Beside documents, Raven can store metadata or text/binary attachments attached to documents. To be able to search through and retrieve documents from a data store, Raven employs indexes:

An index is a Linq query that operates over a set of documents, producing a projection out of each document that can be efficiently queried. An index is essentially a Linq query that Raven executes in the background, and whose results are stored in persistent storage. Those results can be efficiently queried at a later date.

An example of an index which organizes posts by Title is:

from post in docs.Posts
where post.AcceptedAnswerId != nullselect new { post.Title };After the index has been created, the user simply queries it to get the document he is looking for.

Raven has an HTTP API and a Client API (C#). The HTTP API provides about the same functionality as the Client API permitting to work only by using JavaScript and HTML. Some of the commands are:

•GET
•PUT
•POST
•DELETE
•PATCH
The HTTP API also supports getting multiple documents in one call or batching requests.

Raven was released with 3 licensing options:

•Raven DB Community – a free edition that can be used only for 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, failover, replication to RDBMS, and better support.
Both commercial editions have a monthly subscription or a perpetual license. Raven was created by Hibernating Rhinos, a consultancy founded by Ayende Rahien.
分享到:
评论

相关推荐

    RavenDB Community 许可文件License

    RavenDB 数据库是 .NET平台下的文档型数据库, License 是社区版的许可证! 可在 About 中输入即可注册未 Community版

    RavenDB-简介

    RavenDB是一个开源的文档数据库,主要设计用于.NET平台,支持.NET 4.0及更高版本。作为一个NoSQL数据库系统,它提供了高性能、高可用性和易于扩展性的解决方案,特别适合处理非结构化和半结构化数据。在本文中,我们...

    PacktPub.RavenDB.2.x.Beginners.Guide.Sep.2013

    RavenDB是一个高性能、开源、无模式的文档型数据库,特别适合于.NET开发者。以下是对RavenDB 2.x的一些核心知识点的详细阐述: 1. **文档型数据库**:RavenDB是文档型数据库的代表,它存储的数据是以JSON格式的文档...

    manysight-ravendb-4-getting-started:RavenDB 4的Pluralsight课程材料:入门

    ://ravendb.net-Raven网站,文档,下载等 -Google社区Google网上论坛 -RavenDB 4 Deep Dive书 -RavenDB国际现场研讨会 先决条件 安装.NET Core 2.0 SDK 要编辑和生成源代码,您至少需要安装.NET Core 2.0 SDK。 ...

    RavenSignalR:网络表格演示

    3. **Raven Changes API** - RavenDB是一个NoSQL文档数据库,它提供了用于监听数据库变化的API。`RavenChanges`允许开发者订阅数据库的增删改事件,以便在数据发生变化时得到通知。在`RavenSignalR`项目中,这个API...

Global site tag (gtag.js) - Google Analytics