mongodb

id autoincrement/sequence emulation with CassandraDB/MongoDB etc

Hi, I'm trying to build small web-system (url shortcutting) using nonsql Cassandra DB, the problem I stack is id auto generation. Did someone already stack with this problem? Thanks. P.S. UUID not works for me, I do need to use ALL numbers from 0 to Long.MAX_VALUE (java). so I do need something that exactly works like sql sequence U...

mongodb java driver - raw command?

Is it possible to execute raw commands as javascript through the Java driver for MongoDB? I'm tired of wrapping everything in Java objects using Rhino, and would happily sacrifice performance for the convenience of passing javascript directly through to the DB. If not, I can always use sleepymongoose or something, but I don't really wa...

Migrating from SQLAlchemy to MongoDB in Pylons

Is there a migration guide for the the models aspect in pylons, syntax with SQLAlchemy to MongoDB? ...

MongoDB lists with paginations?

for documents with lists with pagination, is it better to embed or use reference? im reading the custom type "SONManipulator" and it appears to transform every thing on retrieval, even the sub docs. i want to keep the list in the document sorted, should this impact anything? ...

MongoDB ORM for Python?

im trying to convert from sqlalchemy (sqlite) to using mongodb. i would like schema vertification. im looking at mongokit, but i want something with similar to mappers, so that it would save from the object's property, and not a dict. i would like a mapper so that i can use existing objects without modifying them. ...

Using MongoDB with Ruby On Rails and the Mongomapper plugin

Hello, i am currently trying to learn Ruby On Rails as i am a long-time PHP developer so i am building my own community like page. I have came pritty far and have made the user models and suchs using MySQL. But then i heard of MongoDB and looked in to it a little bit more and i find it kinda nice. So i have set it up and i am using mong...

heroku mongohq and mongoid Mongo::ConnectionFailure

UPDATE 12th aug 2010: Although I got an accepted answer 6th may from Jackues Crocker, there are aspects of this issue that makes it easy to mess up! It happened to me yet again and I decided to research the mongoid source code. So, here it goes: Currently, host: port: name/database: settings TAKE PRECEDENCE OVER the uri: setting. Hence...

A list of indices in MongoDB?

Is there a way to see a list of indices on a collection in mongodb in shell? i read through http://www.mongodb.org/display/DOCS/Indexes but i dont see anything ...

Mongo not returning full data from query

I am using PyMongo and Mongo version db version v1.4.1, pdfile version 4.5 When I try to query the database I am always getting different results. The code looks like this: familycollection = conn.picdata pics = familycollection[place] pictures = [i for i in pics.find()] return pictures However pictures doesn't full return all my dat...

MongoDB: What's the point of using MapReduce without parallelism?

Quoting http://www.mongodb.org/display/DOCS/MapReduce#MapReduce-Parallelism As of right now, MapReduce jobs on a single mongod process are single threaded. This is due to a design limitation in current JavaScript engines. We are looking into alternatives to solve this issue, but for now if you want to parallelize your M...

mongodb: insert if not exists

Hello, Every day, I receive a stock of documents (an update). What I want to do is inserting each of them if it does not exists. I also want to keep track of the first time I inserted them, and the last time I saw them in an update. I don't want to have duplicate documents. I don't want to remove a document which has previously bee...

MongoDB PHP Drive install failed (Windows)

I attempted to download the php_mongo.dll from this link (http://github.com/mongodb/mongo-php-driver/downloads) and added the extension to php. However it doesn't work at all. My PHP version is: 5.2.x Windows: Windows 7 64 bit. I have also try to use pecl install mongo but it returned some error like: This DSP mongo.dsp doesn't not ex...

How can i generate mongoid.yml config in Rail 2.3.5?

As the title says, how can i generate the default mongoid.yml config file on Rail 2.3.5? I try to use te ´rails generate mongoid:config´ command but it just generates a new app. And also, i would like to use has_many in mongoid without embeding the associated model in the same field. I would like them to be in seperate fields and associ...

How to scale MongoDB

I know that MongoDB can scale vertically. What about if I running out of disk? I am currently using EC2 with EBS. As you know, I have to assign EBS for a fixed size. What if the mongodb growth bigger than the EBS size? Do I have to create a larger EBS and Copy & Paste the files? Or shall we start more MongoDB instance and each connect...

RDMS with memcached or NOSQL database like MongoDB/CouchDB?

Data in question would be mainly text with a one to many relationship (for example HTML pages) . I know that one can do "cache for x number of days" in memcached however how easy would that be to implement in NO SQL ? Thank you again and I apologize in advance if I am not making sense ...

MongoDB index/RAM relationship

I'm about to adopt MongoDB for a new project and I've chosen it for flexibility, not scalability so will be running it on one machine. From the documentation and web posts I keep reading that all indexes are in RAM. This just isn't making sense to me as my indexes will easily be larger than the amount of available RAM. Can anyone share ...

Memcachedb Versus MongoDB Versus CouchDB in terms of file based caching solution?

We need a caching solution that essentially caches data (text files) anywhere from 3 days up to a week based on user preferences and criteria. In this case memory based caching does not make sense to us. We were referred to MemcacheDB however I also thought of some NO SQL solutions. Our current application uses RDMS (MYSQL) and I guess...

Using MongoDB's map/reduce to "group by" two fields

I need something slightly more complex than the examples in the MongoDB docs and I can't seem to be able to wrap my head around it. Say I have a collection of objects of the form {date: "2010-10-10", type: "EVENT_TYPE_1", user_id: 123, ...} Now I want to get something similar to a SQL GROUP BY query, grouping over both date and type. T...

Data aggregation mongodb vs mysql

I am currently researching on a backend to use for a project with demanding data aggregation requirements. The main project requirements are the following. Store millions of records for each user. Users might have more than 1 million entries per year so even with 100 users we are talking about 100 million entries per year. Data aggreg...

how to Solve the "Digg" problem in MongoDB

A while back,a Digg developer had posted this blog ,"http://about.digg.com/blog/looking-future-cassandra", where the he described one of the issues that were not optimally solved in MySQL. This was cited as one of the reasons for their move to Cassandra. I have been playing with MongoDB and I would like to understand how to impleme...