Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm in the process of creating a utility that stores a fairly large hierarchy into a NoSQL document. The data of this is similar to an Active Directory / LDAP structure which contains sub groupings, etc for each record.

These are fairly large, a JSON representation is about 40MB per copy.

Each day a new copy of this hierarchy would be added as a new document in the collection.

Through a web interface, a user would be able to select any two copies (documents) and they would be compared. The differences between the two would be displayed, sort of like a diff command would display differences between two documents.

My questions are

  • Is NoSQL a good fit for storing a LDAP like structure for just viewing purposes?
  • If so, what sort of techniques are useful for comparing two documents and getting the differences?

I'm currently trying this in MongoDB and I haven't figured out how to do a direct comparison from a MongoDB command to get the differences. So, my attempt so far is to simply export each record as a JSON text file and run a custom diff command to compare and format as needed.

I am curious if someone has a better method for this.

An example document in NoSQL

    date: "2013-06-10",
    users: [
             _id: 1,
             dn: "CN=B A Baracus,OU=Testing,OU=People,DC=my,DC=domain,DC=com",
             name: { first: 'B', middle: 'A', last: 'Baracus' },
             employeeId: ‘001234’,
             domain: 'mydomain',
             username: ‘babaracus’,
             created: new Date('Dec 03, 1924'),
             modified: new Date('Mar 17, 2007'),
             memberOf: [ 
                   "CN=CTX - Epic Prod,OU=Access,OU=Groups,DC=my,DC=domain,DC=com",
                   "CN=Public Folder Admins,CN=Users,DC=my,DC=domain,DC=com",
                   "CN=Exchange Services,CN=Users,DC=my,DC=domain,DC=com",
share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.