[02:09:36] <nixnerd> I don't know anything about databases beyond their conceptual reason for existence. I never really liked sql. But... I have a new project that I'm going to use mongo on but I have a question about file storage.
[02:10:57] <nixnerd> if I'm storing a BUNCH of photos in a db... should I just write the links to said files in a json object or store the actual photo in mongo db?
[02:11:11] <nixnerd> Perhaps a stupid question... sorry.
[02:16:20] <nixnerd> Also... I keep hearing a lot of mongo bashing from SQL lovers. Can anyone explain from a nosql point of view when relational dbs make sense and when they don't?
[02:18:16] <StephenLynx> is not about SQL, but about relational dbs being a good fit.
[02:18:26] <cheeser> if you have highly relational data subject to a lot of joins, an RDBMS might be a better fit.
[02:18:41] <cheeser> it's possible to model your data in mongo to avoid much of that but not always.
[02:18:46] <StephenLynx> also when you need relational integrity
[02:18:58] <nixnerd> I'm not even in a position to evaluate what is the best idea. I have a bunch of pictures I want to serve up to users. That's pretty much it.
[02:19:02] <StephenLynx> and MUST have that integrity validated.
[02:19:10] <nixnerd> But I don't want to commit to a certain schema
[02:19:11] <StephenLynx> yeah, mongo fits that well.
[02:20:21] <StephenLynx> you just put w/e you want on the metadata field of the file.
[02:20:44] <nixnerd> StephenLynx: I said that wrong or I'm not explaining what I'm thinking properly. But if I want to timestamp each photo and tag it with whatever... I can just add a json object to do the job?
[03:45:09] <Jonno_FTW> when using find_one_and_update, how do I $set a value based on another field?
[05:12:11] <thinrhino> Hello Folks, I have a question on "eventually consistant" state of the DB.
[05:12:52] <thinrhino> As I understand, when I update a record, and time taken to update the other copies of the record takes time and they become 'eventually consistent'
[05:13:42] <thinrhino> But, when I create a new record and try to read it, will I get an answer or I may miss the record, since the read went to a different server?
[06:16:25] <thinrhino> hello anybody around, who can help me a little in understanding 'eventual consistency'
[06:29:06] <Mattias> thinrhino: there's a wikipedia page for that
[18:55:37] <shlant> anyone know if using secondaryPreferred vs secondary would result in "not master" errors?
[18:55:51] <shlant> or is it something to do with slave_ok?
[18:57:21] <cheeser> only if you're trying to write to that host
[19:00:44] <shlant> cheeser: do you know how to prevent writing to secondary? I have secondaryPreferred, but that's for reads, correct?
[19:11:45] <cheeser> secondary writes aren't possible under any circumstances.
[19:30:59] <shlant> cheeser: any idea why I am getting "not master" errors then? might it be a problem with the node.js mongodb connector?
[19:31:33] <cheeser> i haven't seen any code and I don't do node.js so it probably wouldn't really help if I did
[20:20:22] <stickperson> how can i get back the most recent document by timestamp and only see the value of timestamp? so far i have “db.articles.find().sort({'timestamp': -1}).limit(1)”
[20:25:18] <cheeser> stickperson: use a project on your find()
[20:39:01] <stickperson> cheeser: i mean “db.articles.find({}, {"timestamp.$": 1}).sort({'timestamp': -1}).limit(1)”, but that doesn’t work
[20:50:46] <devdvd> hi all, so i have a little issue. I'm running mongo 2.4.5 (yes i know, im working on upgrading to 3.0.x) We had a problem the other day and one of my colleges decided it would be a wonderful idea to fix the problem by removing all the other members in the replica set manually. Now in addition to having a standalone mongo instance. It also segfaults a few seconds after I start it up with the --replSet flag. My question is this. If
[20:50:47] <devdvd> i wipe the records from local.system.replset on the master instance and the slave instances, can i just configure the replica set again from the master just like I did when I first set it up. What about the data that already exists on the slave, should I wipe it? Is there any danger to the data on the master?
[23:38:17] <sewardrobert> Hello I have a development Mongo instance using wiredTiger that won't start. How I can I blow away or re-initialize the data directory so Mongo instance will start again ?
[23:41:38] <joannac> shut down the mongod, move all the files aside, restart?
[23:41:53] <joannac> assuming it is a problem in the data directory
[23:48:30] <cheeser> are you trying to start it with service scripts? or manually?
[23:52:48] <sewardrobert> Yep. I moved the existing directory out of the way and created a new directory with the correct permissions. Now mongo is happy again. Thanks.