• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

How data is stored in MongoDB tables?

Ranch Hand
Posts: 165
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic