MongoDB.live, free & fully virtual. Register Now MongoDB.live, free & fully virtual. Register Now

Earn a *new* forum badge! MongoDB Schema Design Anti-Patterns

Want to earn a snazzy new MongoDB forum badge and learn some tips that could pay off big time in your next project? Learn about common “anti-patterns” to avoid in your MongoDB database, complete our Anti-Patterns Quiz, earn your badge, and start your next project with confidence!

Many of us like to get our app up and running as quickly as possible when starting a new project. Creating an MVP (minimum viable product) and iterating to improve your work is a great way to get rapid feedback and create amazing things. Often, in the rush to get to that MVP, it is possible to fall into the trap of taking shortcuts that create big headaches later as we prepare to scale up.

Recognizing these potential pitfalls can help you to start off your project on the right foot and create data models that scale. We’ve identified six anti-patterns to be aware of when developing your schema that should be avoided.

Share your thoughts on anti-patterns and how you avoid them below.

4 Likes

Got perfect score on antipatterns quiz but no badge … there’s an antipattern for ya! :slight_smile:

2 Likes

Hi @Jack_Woehr,

Congrats on being one of the first to successfully complete the quiz!

These ultra-rare collectible badges are currently awarded via artisanal inspection, but they will be eventually consistent :).

Regards,
Stennie

2 Likes

Great tutorial, I’m amazed by the speech and slides perfection. Well done.

2 Likes

All kidding aside, you asked:

Share your thoughts on anti-patterns and how you avoid them below.

I think the biggest MongoDB antipattern has to be “mistaking MongoDB for a relational database” which leads to pretzels and spaghetti.

As to “how to avoid”, the answer is, “If you want RDB, use RDB. If you want a document management system, use MongoDB.”

2 Likes

Thanks for sharing @Jack_Woehr!

Totally agree - using MongoDB in the same way you would use a relational database is a huge anti-pattern. It makes pretzels and spaghetti. (Although, I have to admit I googled “pretzels and spaghetti” and found this recipe, and I kind of want to try it: https://parade.com/1089361/sheagoldstein/spaghetti-pretzel-bombs-recipe/)

I do want to clarify that MongoDB is general purpose database that handles relational data quite well—you just model it differently than you would in a relational database.

2 Likes

G’day folks! If you’ve earned the Anti-Patterns Quiz Maestro forum badge by getting 100% on the quiz, you can now choose to use this as a custom title in the forum.

Once you have been awarded your badge:

Note: only some special badges support being used as a custom title.

Regards,
Stennie

2 Likes