Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

How data is stored in MongoDB tables?

Ranch Hand
Posts: 165
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm learning Mongodb by integrating it with my Java application. Till now I have configured my MongoDB as a Windows service that runs when my windows starts and also I'm successfully able to connect, insert and finding data from MongoDB which is integrated with my Java application. I understand that each data is stored as a Key : Document pair in MongoDb and scaled horizontally without any predefined schema definition. However I'm still not clear with my following doubts:-

1) When we say each data is stored as key:document pair then what does the term 'key' here means? Is it a primary key value which I'm entering in the data or does this 'key' means some unique record id (containing random numbers like in RDBMS). For instance:-


Here, if I'm not wrong then EmpId is not the key here, right? Key will be unique id of this data in MongoDB table called 'employee' like '57cd9d404a85c209a42ed747'. Please confirm.

2) When we say each data is stored as a document then what exactly it means? How it looks like, in a structured form or unstructured? Can't we see the stored documents using some client like SQLDeveloper or Toad for RDBMS?

3) Finally which is faster to store as well to retrieve with huge data
Let nothing stop you! Not even this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic