Over a million developers have joined DZone.

How to Use Relational Databases and SQL to Understand MongoDB

· Java Zone

Learn more about Kotlin, a new programming language designed to solve problems that software developers face every day brought to you in partnership with JetBrains.

Developers familiar with relational databases and SQL but interested in moving into the NoSQL world - MongoDB, in particular - might find this recent article from Ashish Trivedi at Tuts+ to be helpful. It explores the structure and use of MongoDB in terms of relational databases, making comparisons and pointing out similarities in order to draw on existing RDBMS knowledge. For example, Trivedi makes the following connections:

  • RDBMS tables map to MongoDB collections
  • RDBMS rows map to MongoDB documents
  • RDBMS columns map to MongoDB fields
  • RDBMS relationships map to linking and embedding documents in MongoDB

Trivedi goes on to compare SQL queries to MongoDB queries, presenting code samples of things like SELECT and UPDATE statements side-by-side with their MongoDB equivalents. Overall, it's a relatively basic look at both SQL and MongoDB - mostly a way to get started with something entirely new - but well-organized and very helpful in its reliance upon more common RDBMS knowledge to understand MongoDB. Check out the full article for more details.

The Java Zone is brought to you in partnership with JetBrains.  Discover how powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience.

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}