分析RavenDB的索引功能

I am currently teaching a course in RavenDB, and as usual during a course, we keep doing a lot of work that pushes what we do with RavenDB. Usually because we try to come up with new scenarios on the fly and adapting to the questions from the students.

In this case, we were going over the map/reduce stack and we kept coming more and more complex example and how to handle them, and then we got to this scenario.

Given the following class structure:

CODE:

1.1: public class Animal
2.{
3.public string Name { get; set; }
4.public string Species { get; set; }
5.public string Breed { get; set; }
6.}Give me the count of all the species and all the breeds.  That is pretty easy to do, right?  In SQL, you would write it like this:

CODE:

1.SELECT Species, Breed, Count(*) FROM Animals
2.GROUP BY Species, Breed

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-751075/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/301743/viewspace-751075/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值