DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Join us today at 1 PM EST: "3-Step Approach to Comprehensive Runtime Application Security"
Save your seat
  1. DZone
  2. Data Engineering
  3. Databases
  4. NoSQL Concept and MongoDB

NoSQL Concept and MongoDB

Altuğ Altıntaş user avatar by
Altuğ Altıntaş
·
Jun. 25, 13 · Interview
Like (0)
Save
Tweet
Share
25.02K Views

Join the DZone community and get the full member experience.

Join For Free

in recent years, we often hear the name of nosql as a new star that is rising in the world of it and it has emerged as a different and alternative approach compared to relational database management systems ( rdbms ).

the reason of occurrence of this concept and therefore, databases enhanced by this alternative approach is to meet the required speed to read/write for the data on internet that its size increases day after day and the systems with high traffic.

there are fundamental differences between the horizontally scalable nosql systems and relational database management systems.

  • relational database management systems are transaction-based and have acid rules. nosql systems do not fully support the acid rules and there is no transaction concept in many nosql systems.
  • data in the relational database management systems is located on fixed tables and columns. nosql systems are not dependent on fixed tables and columns.
  • sql query is not used in nosql systems.
  • disintegration of data by primary key is not compulsory in relational database management systems. nosql systems access the data over primary keys.

as we mentioned the differences in proportion to relational database management systems, i want to indicate that nosql systems are defined in 3 groups among themselves such as document-based , key/value based and graphic-based generally and each group have differences about data consistency and data access strategies.

mongodb

today, there are so many nosql solutions on the market. mongodb, which was started to be improved in 2007 by 10gen company and has been converted to an open source project with agpl license in 2009, is one of the most popular one among these solutions.

mongodb presents itself as an open source designed for improvement and scaling ease and a document-oriented database. each record is actually a document in mongodb. documents are stored in a json-like format, binary json( bsn ) in mongodb. bson documents are the objects that contain an ordered list of saved elements. each element is composed of a field name and a specific type of value.

at this point, it would be useful to look at the mapping chart of mongodb concepts and sql concepts in the conventional relational database management systems:

sql mongodb
database database
table collection
row document or bson document
column field
index index
table joins embedded documents and linking
primary key
specify any unique column or column combination as primary key.
primary key
in mongodb, the primary key is automatically set to the _id field.
aggregation (e.g. group by) aggregation framework
see the sql to aggregation framework mapping chart.

http://docs.mongodb.org/manual/reference/sql-comparison/

mongodb

why mongodb?

mongodb has important positive features that highlights and distinguishes itself from any other nosql solutions. the following features can be considered as first and foremost:

  • query support . whereas many nosql solutions enables you to access the data only through the keys, mongodb offers to query regarding the intended fields and specific ranges ( range query ), also it offers you to query with regular expressions .
  • secondary index support . as well as the querying with respect to intended fields, defining these fields as secondary index provides to access data in a high performance.
  • master-slave replication support . directing the read and write operations to separate servers, running a slave server as a master server when the master service is inaccessible is a very important positive value undoubtedly.
  • sharding support . spreading the large-scaled data across multiple servers is a feature that makes different mongodb among its kinds.
  • mapreduce support .
  • driver support for many software languages.

update version number of mongodb is 2.4.1. you can download is freely from this address: http://www.mongodb.org/downloads there is also a commercial version of mongodb.

mongodb documentation provides sufficient information about how to set up mongodb on the platform you are using. all being well, we will consider how to perform crud operations and query processing on mongodb in the next article.

real content above, can be accessed at http://en.kodcu.com/2013/06/nosql-concept-and-mongodb/

Database Relational database MongoDB NoSQL Concept (generic programming)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • When AI Strengthens Good Old Chatbots: A Brief History of Conversational AI
  • Handling Automatic ID Generation in PostgreSQL With Node.js and Sequelize
  • Best Practices to Succeed at Continuous AWS Security Monitoring
  • ChatGPT: The Unexpected API Test Automation Help

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: