MongoDB (from humongous) is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc. and is free and open-source, published under a combination of the GNU Affero General Public License and the Apache License.

Share tech news, updates, or what's on your mind.

Sign up to Post

How do MongoDB and Active Directory go together?

I have a small bit of exposure to MongoDB and  Active Directory as well. But is there so synergy of using them together?


How do you know if your security is working?
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.


how DB2 work with MongoDB ?

what is the solution to integrate Oracle with Mongo DB? data flow between them ?

anyone know how to intergrate MariaDB and Mongo DB so that they work together well ?

how about MariaDB and hadoop?

anyone know how to intergrate MS SQL and Mongo DB so that they work together well ?

how about MS SQL and hadoop?
Mongo vs. Postgres DB.  Can you anyone pointed pros and cons?  And from the personal experience advice?
Hello. I am working on a node application.  I'm trying to use Passport for the log in.   I found an example online of what I want to do.  However I cannot get it to work.  I am running into an issue with my routes.  I get a compiler error that I have not seen before.  I tried to attached the project to this question, but it won't accept zip files so I will just attach my index.js and AuthController.js.  This is the error I get on index.js when it tries to do my first route.
var auth = require("../controllers/AuthController.js");

// restrict index for logged in user only
router.get('/', auth.home);

Open in new window

I get this error:  
throw new mongoose.Error.OverwriteModelError(name);
OverwriteModelError: Cannot overwrite `User` model once compiled.
at MongooseError.OverwriteModelError (C:\Users\ernest\Documents\coding bootcamp\code\Passport MongoDB\node-passport-auth\node_modules\mongoose\lib\error\overwriteModel.js:18:11)
    at Mongoose.model (C:\Users\ernest\Documents\coding bootcamp\code\Passport MongoDB\node-passport-auth\node_modules\mongoose\lib\index.js:349:13)
    at Object.<anonymous> (C:\Users\ernest\Documents\coding bootcamp\code\Passport MongoDB\node-passport-auth\models\user.js:12:27)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require …
I am about to start to play around with the Bitcoin open source, source code, and got introduced to a new term: a Blockchain database.

What technologies are needed for this? Is this NO-SQL?

Hello All,

I am reading a book called express.js Blueprints.  I am trying to wrap my mind around understanding authentication using passport.  serializing and deserializing is not registering to me.  I have just started learning node and express js so that's a big reason why.

Here's a code from the book on setting up passport.  Starting with line 5, can someone please break down what's happening?  Where is the "user" parameter coming from in the serializeUser function?  Where did "" come from?

var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var User = require('mongoose').model('User');

passport.serializeUser(function(user, done) {
passport.deserializeUser(function(id, done) {
User.findById(id, done);

passport.use(new LocalStrategy(function(email, password, done) {
email: email
}, function(err, user) {
if (err) return done(err);
if (!user) {
return authFail(done);
if (!user.validPassword(password)) {
return authFail(done);
return done(null, user);

Open in new window

I am trying to connect to MongoDB in mongoDBatlas from my javascript but I keep getting the following error.

MongoError: connection 5 to closed
    at Function.MongoError.create (C:\Users\558642\ga\js-dc-5\11-crud-and-dbs\assignment\todo\node_modules\mongodb-core\lib\error.js:29:11)
    at TLSSocket.<anonymous> (C:\Users\558642\ga\js-dc-5\11-crud-and-dbs\assignment\todo\node_modules\mongodb-core\lib\connection\connection.js:202:22)
    at Object.onceWrapper (events.js:293:19)
    at emitOne (events.js:101:20)
    at TLSSocket.emit (events.js:191:7)
    at _handle.close (net.js:511:12)
    at Socket.done (_tls_wrap.js:332:7)
    at Object.onceWrapper (events.js:293:19)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at TCP._handle.close [as _onclose] (net.js:511:12)

Here's my code
const express = require('express')
const hbs = require('express-handlebars')
const mongoose = require('mongoose')
const bodyParser = require('body-parser')


const itemEntry = require('./models/toDoEntry.js')
const app = express()

app.get('/', function( req, res ) {
	itemEntry.find({}, function( err, itemEntries ) {

Open in new window

Managing Security & Risk at the Speed of Business
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

Hi there,

I have a mongo aggregation query that works fine in the mongo shell (and robomongo) but I can not work out how to translate this into a PHP query.

I am using PHP 5.6 with the latest mongo class (MongoDB\Driver\Query).  The mongo query looks like this:

     {$match: {
             vendor_name : "vendor8",
             distributor_id : 8
     { $sort: { 
         cw_product_code: 1, download_Date: 1 
     { $group:
           _id: "$cw_product_id",
           lastDownloadDate: { $last: "$download_Date" },
     {allowDiskUse: true}     

Open in new window

Any help to point me in the right direction would be appreciated.
hi, i have the following document on mongodb

name: "john",
state: "GA",
city: [
     {"atlanta", 30350},
     {"atlanta", 30351},
     {"atlanta", 30352},
     {"marietta", 45093}

how do i aggregate the array of citys and get a document like this:

name: "john",
state: "GA",
city: [
     {"atlanta", "30350, 30351, 30352"},
     {"marietta", "45093"}
What is the equivalent package for oracle  dbms_application_info..set_module in postgreSQL
Hi Experts,

I have a database that did grow monthly the following in MB
What is the way to calculate the expected growth for the next few months?
I have 2 tables that look like this:

Table1: EntityID, FamilyID

Table 2: EntityID, ParentEntityID

Table 1 contains a list of entities with FamilyID column currently all NULLs. Table 2 provides family information between entities. E.g.: an entity can be linked to a parent entity, a grandparent entity, to grandparent, etc.. A single entity can be linked to multiple parent entities too (just like in Family2 in the example below)

I am looking for an SQL that generates and populates a unique family ID for all linked Entities in the Table1. Example, if Table2 has the following data:

Than Table1 FamilyID column should be populated as follows:
1, family1
2, family1
3, family2
4, family2
5, family2
6, family2

Note, Table2 currently has 3 million records. And table 1 has about 5.5 million not all entities have parents)...

Thank you, Experts!
Hi Experts,

We have SQL Express 2005 and I realized our data file is almost reaching the limit (4GB).
Now my question is, how can I shrink the size of the file in order to prolong the need to upgrade (FE/BE)?

Also I see one table that has about 200 MB used for data and 450 MB for indexes, is that acceptable?
How can I see what indexes are not being used so frequent and can be dropped (for a particular table or in general)?

PS. Our front end app is an Access ADP and then therefore I don't see how the database can be split.

Thanks in advance.
Hi I have a colleague who has a SQL Script that she runs in Crystal Reports.  I need this similar script to run on our AIX box for a certain program.  It runs fine in Crystal, but it just hangs on our IBX AIX box.

It has like 14 SELECT Statements.  Is there a way I can step through this script in SQL, like a debug tool, so I can see why it is running a long time or failing without me knowing?  I wish there was a log file or something?  Is there??

Thanks in advance for help!
Lets say you have a table:
Name   City            Date
Bob      Anytown   2017-03-15
Bob      Anytown   2017-03-21
Jim       Sometown 2017-02-27
John    Mytown      2017-03-06
John    Mytown      2017-03-19
John    Mytown      2017-03-25

I need to query the table so that my results are as follows:
Name  City            Dates
Bob     Anytown    2017-03-15,2017-03-21
Jim      Sometown 2017-02-27
John    MyTown     2017-03-06,2017-03-19,2017-03-25

I guess I'm asking how can I (can I?) have the results of a single field query reported in a single row rather than multiple rows?


I know how I can use a programming language to manipulate this (VB/ASP for example), with looks, but I'm looking for a pure SQL way.  IDEALLY MySQL way.
we have located a sql script (*.sql) on a file share which seems to show passwords for an initial creation of a SQL database, for example it has sp_addlogin commands, and then a number of accounts and passwords.

However, the password does not seem to comprise of standard alpha numeric characters, and contains a number of "special" characters, e.g. µ, ·, â, Ë

can SQL Server handle these characters in a password, or is it more likely this is some sort of encrypted representation of the password? Or can you use any character you like in a SQL Server password? It seems a bizarre combination if you ever had to enter those when entering a password to access a database, I was just intrigued what it may be, and whether SQL Server can use those characters or if its restricted to more common values, e.g. a..z, A..Z, !"£$%^&*()-, 0..9 etc.
Ultimate Tool Kit for Technology Solution Provider
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dear experts,

I have a query that look like this:

SELECT GUIDCustomer, MAX(CreatedDate) AS 'latestTransDate'
FROM Invoice i
WHERE Completed = 1
AND Type = 'O'

The result will give me the latest date of each customer in Invoice table when invoices are completed.

I also wish to obtain the GUIDInvoice from the above query but unfortunately, I need to add GUIDInvoice in GROUP BY clause.
What I want to achieve is to find the latest transaction date by each customer and also obtain the GUIDInvoice of the invoice with latest transaction date. I wish to know how can I adjust my query to obtain that result. Thanks
Our sql server is a VM with vmware.  I know that the classical way to set up partitions for a sql server was to have 3 partitions.
1) for the os
2) for the mdf
3) for the ldf files

I have also heard that since vmware has came to prominence that this is not a big concern anymore.  meaning....  you can responsibly run a sql server install on 2 partitions now.
1) os
2) mdf and ldf

Can someone confirm that it is ok to run sql servers with either setup.  currently we are choosing the second way of setting up our sql servers, but i have a vendor that is highly recommending that we go to the classic 3 partition setup.

Thanks a bunch!
I have an AMS / eCommerce application that runs on IIS7 / WIN2008 R2 SP1. Databases for this application sit on two nodes of SQL Server 2008 that runs on Windows Failover Cluster. In the light of needing to fix "Sweet32" vulnerability, which is removing 3DES cipher and removing TLS1.0 protocols I had to update SQL Server 2008 environment to SP4 and apply TLS1.2 patch to it. I also updated .NET 4.5.2 with a security patch from Microsoft.

So, once I did this, I disabled DES/3DES ciphers and TLS 1.0 protocols on the web server and my application stopped working. I get
"site currently unavailable" message on the web browser.

When I look at the event viewer on the web server, I get series of error messages.

Event ID: 1309
Event Code: 3005
Process name: w3wp.exe

Exception Information:
Exception type: SqlException
Exception message: A communication was successfully established with the server, but then an error occured during the login process. (Provider: SSL Provider, error:0 - The client and server cannot communicate, because they do not possess a common algorithm)

Then there are a number of Schannel events:

Event ID 36871: A Fatal error occured while creating an SSL client credential. The internal error state is 10013.

Any thoughts appreciated.
Thank you,
What kind of factors do you need to consider in terms of defining offline backup retention (tape) for your major IT systems/data. Do you work towards any specific retention policy, e.g. 6 months oldest, or if you are keeping things for over 6 months - for what purposes? Our main systems are all driven by MSSQL databases, and some apps enforce retention policies for the online copy of the data - just wondered what kinds of things you factor in to determine how long you retain offline backups for (tape) as offsite storage for D/R is not all that cheap.
hi how can i write this code better

cursor get_emp_id is
    select id form emp_temp
	   where name = :block.itemName;
for curr3 in get_emp_id loop
		wrk_curr_emp :=  GEN_CURRENT_empaccNo(;
		if wrk_curr_nsn != then
			message('this is not current accno');
			raise form_trigger_failure;
			:block.idNr :=
		elsif wrk_curr_nsn !=  then
				:block.idnr := 	wrk_curr_emp;
			end if;
		--	end if;
		end loop;

Open in new window

Hi All,

I have a product master with schema like this :

1. ItemCode
2. Name
3 Unit
4, Unit1
5. Ratio1
6. Unit2
7. Ratio2

Example : Coca Cola, BTL, DZN 12, CTN 50

There is transaction for in an out in CTN.

What if someday the product master is change to :
Coca Cola, BTL, DZN 12, CTN 30

Is it problem with this scenario ?

What is the solution for this ?

Thank you.






MongoDB (from humongous) is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. MongoDB is developed by MongoDB Inc. and is free and open-source, published under a combination of the GNU Affero General Public License and the Apache License.

Top Experts In