• How to get a random record in MongoDB

    I have roughly a 100 million records and I need to get a random record in MongoDB. What's the best way to do this? I already have the data ready to go but there's no field from which I can generate a random number / obtain and random row. I would appreciate the help.

    ITKE1,143,040 pointsBadges:
  • Should I learn MongoDB or CouchDB for NoSQL?

    I'm pretty new to everything NoSQL related but I've heard a ton of things on MongoDB and CouchDB but I'm not sure of the differences. Can anyone help me? Which one do you recommend as a first step to learning NoSQL? Thank you very much!

    ITKE1,143,040 pointsBadges:
  • How to delete all data in MongoDB

    I'm currently working in development on MongoDB. Every once in a while, I need to delete pretty much everything in that database. Does anyone know if there's a single line of code to do this? I'm going through every single collection right now and it's taking way too long.

    ITKE1,143,040 pointsBadges:
  • Dropping MongoDB database from the command line

    Would anyone know how to drop a MongoDB database from the command line? Is there a way to do it through the bash prompt? Thanks so much.

    ITKE1,143,040 pointsBadges:
  • Performing SQL Join equivalent in MongoDB

    Does anyone know of a way to perform a SQL Join equivalent in MongoDB? This is what I have right now: comments { uid:12345, pid:444, comment="blah" } { uid:12345, pid:888, comment="asdf" } { uid:99999, pid:444, comment="qwer" } users { uid:12345, name:"john" } { uid:99999, name:"mia" } And I'm...

    ITKE1,143,040 pointsBadges:
  • How to get the last N records in MongoDB

    I'm currently using MongoDB and I'm trying to figure how I can get the last N records. I know that, be default, the find() process will get all the records from the beginning. I would appreciate any help available.

    ITKE1,143,040 pointsBadges:
  • What should I choose for file storage: MongoDB or Hadoop?

    For about the past month, I've been looking for the best solution to create scalable storage for big files. The file size varies from 1-2 megabytes and some get to 500-600 gigabytes. I'm deciding between MongoDB and Hadoop and I'm not sure which way to go. I'm thinking of using MongoDB as a file...

    ITKE1,143,040 pointsBadges:
  • Print documents in MongoDB shell

    Does anyone know of a way to print out more than 20 documents in MongoDB's shell? I've tried this: db.foo.find().limit(300) But this still prints out 20. Then I tried this code: db.foo.find().toArray() db.foo.find().forEach(printjson) But it's printing out an expanded view of each document of the...

    ITKE1,143,040 pointsBadges:
  • Execute Mongo commands in Shell Script

    I'm trying to execute MongoDB commands using Shell Script. Here's what I tried so far: #!/bin/sh mongo myDbName db.mycollection.findOne() show collections When I executed it, it said the connection was established but not executed. Can someone help me out?

    ITKE1,143,040 pointsBadges:
  • Get names in keys in MongoDB

    I'm trying to get the names of all the keys in my MongoDB collection. Here's what I have so far: db.things.insert( { type : ['dog', 'cat'] } ); db.things.insert( { egg : ['cat'] } ); db.things.insert( { type : [] } ); db.things.insert( { hello : [] } ); And I'm trying to get the unique keys, like...

    ITKE1,143,040 pointsBadges:
  • Putting username and password in MongoDB

    I've been trying to set up the user name and password for my MongoDB so any remote access will ask for it. Does anyone know if there's a way to do it? I've tried this but it still doesn't ask me for a password or user name. use admin db.addUser('theadmin', '12345'); db.auth('theadmin','12345');...

    ITKE1,143,040 pointsBadges:
  • How to reduce the file size of a MongoDB database

    My friend and I have a MongoDB database which was pretty large (over 3 GB). But we recently deleted a bunch of documents, files, etc., and we thought that would lead to the size of the database files to go down. But since MongoDB keeps allotted space, our files are still big. We read that mongod --...

    ITKE1,143,040 pointsBadges:
  • List all collections in a MongoDB shell

    I'm currently in a MongoDB shell and I was wondering if anyone knows how to list all of the collections for the current database and I'm using. I can't anywhere at all. Thanks!

    ITKE1,143,040 pointsBadges:
  • What wiki software do you recommend?

    Just as the title suggests, what wiki software (DokuWiki, MediaWiki, etc...) do you suggest to run?  The purpose of this is nothing more than to make a remote note-taking sort of scenario, so it's not something for anyone but me to be used.  I know I could do my own thing and stuff, but I'd...

    Eric Hansen2,065 pointsBadges:
  • Which database is better: MySQL or NoSQL?

    We are e-learning company and have a product based on client server model. We are currently using MySQL but facing problems with the installation as it takes longer time to install all the prerequisites. Is there a better way or better database option available? Switching to NoSQL-Mongo DB will be...

    RyanHaris5 pointsBadges:
  • What’s the better embedded database: SQLite or MongoDB?

    I've been working on a RSS reader application and I'm looking at several different back end databases to use. I need the database to be embedded because I don't want the users to install a database server. I'm between SQLite and MongoDB. Which one is the better choice?

    ITKE1,143,040 pointsBadges:
  • How to store images in a MongoDB database

    Would it possible to store images in a MongoDB database rather than just text? Should I create an array of images in the database? If that's possible, can I do the same for videos?

    ITKE1,143,040 pointsBadges:
  • Access data from MongoDB through JavaScript

    I'm trying to figure out if it's possible to access and retrieve data from MongoDB through JavaScript without any back end processing. Can somebody shed some light here? Thanks so much.

    ITKE1,143,040 pointsBadges:
  • What’s the better option: Azure Table or MongoDB?

    We have a NoSQL database that's currently on Windows Azure and the data volume in it is pretty large. We're looking at both an Azure Table storage and MongoDB database to fulfill our needs of performance and scalability. What would be the better option for us? Azure or MongoDB?

    ITKE1,143,040 pointsBadges:
  • Storage for Blogs in .NET and MongoDB

    I’m new to MongoDB and am building a blogging application using .NET as well.  What is the best way to store content (text, images, and embedded videos) for blogs created through such an application?  Should I save them via HTML into the database?

    ITKE1,143,040 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following