Tagged Questions
-1
votes
2answers
47 views
mongoDB vs mySQL — why one is better than another in some aspects [closed]
I am really new to database and am interested in some high level basic knowledge. I have read this wonderful SO post. I under one is better than another in some cases, but not sure why.
Why is ...
1
vote
1answer
20 views
A complicated MongoDB query (a high level of nesting)
I run MongoDB v.2.4.4-pre- under Linux. There is a collection with elements like this:
{
num: 1,
arr: [
{
a: 'a1',
b: 'b1'
},
{
a: ...
0
votes
1answer
23 views
Detecting new data in a replicated MongoDB slave
Background: I have a very specific use case where I have an existing MongoDB that I need to interact with via reads, but I have to ensure that the data can never be modified. However I also need to ...
0
votes
1answer
28 views
MongoDB - select document where all values in field array are present in a given array
I have documents like
{
foo : [1, 2]
}
{
foo : [2, 3]
}
Given an array like
[2, 3, 4]
How would I select only the second document? i.e. select only the documents where all the values in ...
0
votes
2answers
37 views
Adding unique index in MongoDB ignoring nulls
I'm trying to add unique index on a group of fields in MongoDB. Not all of those fields are available in all of the documents and I'd like to index only those which have all of the fields.
So, I'm ...
1
vote
1answer
44 views
Remove database name from mongodb list of databases
When dropping a database from mongodb, the database contents are dropped, but the database name continues to clutter the database list:
$ mongo localhost:49996
MongoDB shell version: 2.0.7
connecting ...
3
votes
1answer
111 views
MongoDB performance - having multiple databases
Our application needs 5 collections in a db. When we add clients to our application we would like to maintain separate db for each customer. For example, if we have 500 customers, we would have 500 ...
0
votes
2answers
20 views
Sparse Index in MongoDB not working?
I'm trying to understand sparse index in MongoDB. I understand that if I do this :
> db.check.ensureIndex({"id":1},{sparse:true, unique:true})
I can only insert documents where the id field is ...
0
votes
1answer
24 views
MongoDB db.dropDatabase() dropping all but one collection
I get a status of { "dropped" : "FLIS", "ok", 1 }, but then I run a "show collections" and see that one collection remains in the database and it contains all records previous to the drop.
This is ...
0
votes
0answers
46 views
What type of database should I use for separate logs of event/time series data? [closed]
I am planning on developing a Web site for MMO combat log analysis similar to World of Logs but for a different game. :)
I would like to ultimately be able to handle having on the order of 200k ...
0
votes
1answer
28 views
MongoDB Query for pagination from Java Driver
Is the following Query the correct way to perform pagination in MongoDB from Java Driver end ?
Criteria criteria = new Criteria("users").in(userID);
Query query = new ...
0
votes
2answers
29 views
How to do multiple OR queries in Mongo?
I'm trying to get something like this to work:
db.Event.find({
startDate: {
$or: [
{$and: [
{$gte: '2013-05-12'}
{$lt: '2013-05-13'}
]},
{$and: [
...
0
votes
0answers
22 views
Matching timeless dates in MongoDB queries?
I have date entries in my MongoDB database:
2013-05-30T13:54:35.313Z
I need a way to find entries which match the date 2013-05-30 regardless of the time. Is there a way to do this?
Let's start ...
0
votes
2answers
81 views
MongoDB write performance
Given, 20M documents with each average of 550bytes and PHP driver on a single machine.
First insert (not mongoimport) with journal on, WriteConcern to default (1). Took about 12 hours. Then it made ...
0
votes
1answer
43 views
Dynamic Data inside MongoDB
I'm making dynamic data storage, which it was in relational data base as:
form -> field
form -> form_data
field -> field_data
form_data -> filed_data
and field data contains field_id, ...