DZone
Database Zone
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
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Database Zone > A NoSQL Conversation

A NoSQL Conversation

Like most things in life, important decisions are deeply rooted in culture. Databases are no different. Here is one more (mercifully short) observation.

Steven Lott user avatar by
Steven Lott
·
Apr. 28, 16 · Database Zone · Opinion
Like (2)
Save
Tweet
2.36K Views

Join the DZone community and get the full member experience.

Join For Free

This cropped up recently. It's part of a "replace Mongo with Relational DB" conversation.

I'm going to elide the conversation down to five key points. The three posthoc nonsensical ideas, and the two real points.

What's (to me) very telling is that someone else published the five reasons in this order. As if they larded three on the front. Or, included the two at the end out of guilt because they were avoiding the real issues.

Relational Queries Are Desired

"The only way to find [the documents] would be to write a query that literally trolls through the entire database in order to find the most recent values." 

I beg to differ. "Only way" is a strong statement. Mongo has indexes. To suggest that they exist or don't work is misleading. The details of the use case involved searching by date. It's possible to contrive a database that does bad searches by date; the implication being that Mongo couldn't do date matching or something. 

To Enforce Constraints and Schema 

"It is still possible for the application layer to ensure the constraint, but that relies on every single point in the application code enforcing it–a single error can lead to inconsistent data". 

This runs perilously close to the "What if some bonehead bypasses the API and hacks into the database directly?" question. Which is isomorphic to "What if all corporate governance disappeared tomorrow?" and "What if an evil genius hacks all our database drivers?"

Lack of Document-Oriented Access Patterns.  

"If there are more complex access patterns (like reading certain fields from many records, or frequently updating single fields within a record) then a document-oriented database is not a good fit"

That's nonsense. Mongo has field-level updates. There was one example of a long-running transaction that appeared to be misdesigned. I suggested that an improved design might be less complex and expensive than rewriting the API's and moving the data.

What's Left  

  • Desire to Utilize [Relational DB]

  • More Support Available for [Relational DB]

Clearly, these last two are the real reasons. Everything above looks like posthoc justification for the real issue. 

We're not sure we like Mongo. 

My point in the conversation was not to talk them out of making a switch. The last two reasons included the kind of compelling rationalization that can't be disputed. The best I could do was to challenge the errors in the first three reasons so that everyone could be honest about the change. It's not technical. It's organizational.

Database Conversations (software) NoSQL

Published at DZone with permission of Steven Lott, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Ultra-Fast Microservices: When Microstream Meets Wildfly
  • How Database B-Tree Indexing Works
  • What SREs Can Learn From the Atlassian Nightmare Outage of 2022
  • How to Optimize MySQL Queries for Speed and Performance

Comments

Database Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • 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:

DZone.com is powered by 

AnswerHub logo