r/FullStack • • Aug 31 '26

Question What should I learn as backend: MongoDB or mySQL?

I am learning backend and I want to know which stack is good. I am not sure about it. Should I go for Mongodb or mySQL? My aim is to be employable. Pls give me suggestions.

12 Upvotes

22 comments sorted by

2

u/American_Streamer API Magician (Backend) Aug 31 '26

If your goal is employability, learn SQL first, so between those two, MySQL, which is a relational database. Learn tables, relationships, joins, indexes, transactions, constraints and basic schema design. Those concepts transfer directly to PostgreSQL, SQL Server, Oracle, etc., and relational databases are everywhere in backend jobs.

MongoDB is useful, but I’d learn it after you understand relational databases. It’s much easier to understand when a document database is actually appropriate once you know what problem SQL databases solve.

Personally I’d even choose PostgreSQL for learning if you aren’t tied specifically to MySQL.

1

u/classic409p3 Aug 31 '26

Is it easy to learn? My background is all JavaScript. JS - > React -> Next Js -> Node.

1

u/American_Streamer API Magician (Backend) Aug 31 '26

Take the free SQL course by Data with Baraa: https://www.youtube.com/watch?v=SSKVgrwhzus&list=PLNcg_FV9n7qZY_2eAtUzEUulNjTJREhQe
The frist steps in SQL are easy, but it gets hard if you go deeper into how it works. Which will distnguish you form the other applicants, as most people only have a shallow knowledge of SQl, and just claim that they know it well.

→ More replies (1)

6

u/runningOverA Aug 31 '26

Learn SQL first.

SQL without any "my" or other letters before or after. Migrating form there to "my" is a 3 days job.

3

u/No_Score_1977 Aug 31 '26

Both are good, both are relevant.

Learn both, even at the same time, understand the benefits and drawbacks of both.

3

u/Active_Load_2546 Aug 31 '26

If you are learning first time then I will suggest go for the SQL databases, it will gives you better idea about how does databases works. Don't just mug up the queries, learn how does databases works under the hood. Learning queries same as what we learn in programming syntax but knowing the internal working will standout you differently.

3

u/burlingk Aug 31 '26

SQL based databases are still the norm. So learning them will be more employable. Learning MongoDB can be another tool in your toolbox.

2

u/megacope Aug 31 '26

Both, try two small projects with the same specs with each db and decide which one you gravitate towards.

2

u/wreck_of_u Aug 31 '26

You gotta learn both to be honest.

Then you'll end up using Postgres with a bunch of json columns like us 😆

1

u/Grand_Conflict_4076 Aug 31 '26

Why not both. But learn sql first

1

u/abrandis Aug 31 '26

Learn SQL (mySql), it's what's used everywhere, momgodb is a nosql database and very very much a niche use case product

1

u/kartiky24 Sep 01 '26

Learn any relational db first, build projects then learn mongoDB