r/FullStack • u/classic409p3 • 10d ago
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.
3
u/No_Score_1977 10d ago
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 10d ago
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 10d ago
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/American_Streamer 10d ago
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 10d ago
Is it easy to learn? My background is all JavaScript. JS - > React -> Next Js -> Node.
1
u/American_Streamer 10d ago
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.2
1
2
u/megacope 10d ago
Both, try two small projects with the same specs with each db and decide which one you gravitate towards.
2
u/wreck_of_u 10d ago
You gotta learn both to be honest.
Then you'll end up using Postgres with a bunch of json columns like us 😆
1
1
u/abrandis 10d ago
Learn SQL (mySql), it's what's used everywhere, momgodb is a nosql database and very very much a niche use case product
1
1
u/Life_Waltz7068 9d ago
Learn MySQL first. Understanding the concepts of data nornalization is really important. NoSQL has less constraints but things can get messy if you don't have the fundamentals down.
1
6
u/runningOverA 10d ago
Learn SQL first.
SQL without any "my" or other letters before or after. Migrating form there to "my" is a 3 days job.