Oh, we'll talk a lot about MySQL vs MongoDB later this semester. We have an entire class allocated to it.
But, just a few words now: MySQL and other RDBMS (Relational DataBase Management Systems) have been around for decades. Every company uses one. Venerable, efficient and reliable. Still an extremely important part of the market.
MongoDB and other NoSQL databases were invented in the last decade or so to address some issues of scaling RDBMS systems to huge databases (bigger than will fit on one server). So, pretty much only in that case do you choose NoSQL over SQL.
They're different software, with different ways of organizing and managing the data.
Almost! If we are being pedantic, a "query" is something that retrieves (reads) information, while a "statement" create/updates/deletes. If you do both, you get "CRUD". Or maybe it changes something, like the use DB statement.
Informally, the terms are interchangeable. People will say "please write a query that inserts a row..." and everyone understands what they mean.
We will get to editing the database in a couple of weeks. That's also done with SQL statements, not with anything we've learned yet.
But now is a good time to address a common misconception. The database is *not* in any of your files. Certainly not in any batch files. The batch file is just a way to write down a query so you can easily run it again. (Think about a weekly sales report for the boss.)
If you really want the gory details, there *are* system files under /var/lib/mysql/ that
allows the DBMS to restart after a reboot, but these are not relevant to us. We do not edit those files,
except via the SQL statements that we will learn later.
I promise we'll get to that in a couple of weeks. Please be patient. But if you want to skip ahead, the lecture is on DDL, Sept 15th.
As for not overwriting the batch file, the shell should prevent you, thanks to some settings that I just put in place because of your question.
This is the shell's "noclobber" setting. Very useful!
Just, practice, practice.
Absolutely!
Keep 'em coming!