Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

What's MongoDB all about?

Just a quick question, I've been starting the Database courses recently and been interested in Mongo but I wonder what it's like in relation to SQL. Is it a similar course or should I get the SQL courses out of the way first? :-)

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

They're non-related, really. I wondered the same thing, and started using mongo in a soon to be production ready app. Mongo is nosql, which I thought mean't it's not sql, but it's actually Not Only SQL.

So you can set up a scheme, and you can have relateable data like you would in SQL. But by default there is no scheme, no structure. It stores everything basically as JSON.

A collection is like a table. A document is like a row in a table.

In SQL, as you probably know, every row has to be filled, even if it's a null value. In mongo, that's not the case, A document can be as wildly different from another document, all in the same collection. It'll just return you whatever information it has. Which is really cool and powerful. But you'll probably find you will want your documents to be somewhat consistent so they are predictable when calling them from a collection.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

So it sounds like a kind of mini programming language in itself but very different to SQL. I think therefore I'll wait till the due SQL courses are done before I dip in.

Thanks :)