English 中文(简体)
我怎么能够利用红树储存和盘问反复发生的事件?
原标题:How can I store and query recurring date events using mongo?

我愿让我的用户为其活动制定时间表。 这可能是一个天,或者为了方便起见,我允许他们具体说明一次重复活动(类似于《展望》任命)。

只剩下一天会非常容易,但我如何储存和质疑一次重复的活动? 我不需要花时间,因为我只是单独储存,如果他们需要不同的时间,我就不得不做另一个事情。 页: 1

Examples:

每一星期的mon、tu、th、 f

Every wed every week

每个月的二读日

我在几年前曾问过:。 我如何储存和盘问表数据?,但它正在使用一种SQL服务器。 我想要使用Mongo,尽管如此,一个港口已经成行。

最佳回答

How about storing the original date and information about the recurrence? Its an unlimited field for experiments and you can invent a "recurring event format" of your own. For example:

event : {
   date: 17 May 2012 22.45, 
   recurring: "+2d"  # meaning, every second day after the date
}
问题回答

暂无回答




相关问题
Access DB Ref MongoDB

Whats the best way to access/query a DB Ref: UPDATE: users: name, groupref : {$ref:"groups",$id:"ObjectId ..." } } groups: name, topic, country,...,.. Assumption is that user belongs to only one ...

MongoDB nested sets

What re the best practices to store nested sets (like trees of comments) in MongoDB? I mean, every comment can have a parent comment and children-comments (answers). Storing them like this: { ...

MongoMapper and migrations

I m building a Rails application using MongoDB as the back-end and MongoMapper as the ORM tool. Suppose in version 1, I define the following model: class SomeModel include MongoMapper::Document ...

MongoDB takes long for indexing

I have the following setup: Mac Pro with 2 GB of RAM (yes, not that much) MongoDB 1.1.3 64-bit 8 million entries in a single collection index for one field (integer) wanted Calling .ensureIndex(...) ...

Storing and accessing large amounts of data

My application creates pieces of data that, in xml, would look like this: <resource url="someurl"> <term> <name>somename</name> <frequency>somenumber</...

热门标签