Sure, I'm happy to do so. Yes, there are actual disk files where the data is stored, but in files and folders that are controlled by the server, not by the client. Think of it like the registrar, which controls your transcript.
No; that's the prompt. I put it there to give you an idea of where to enter the command. This is a common presentational problem.
Again, that's the prompt. Some commands are unix commands, and some are MySQL commands.
The database queries always end in a semi-colon, but commands for the database often don't. I've been doing this for 20+ years and I still sometimes forget to add a semi-colon. And it never hurts to put in an unnecessary one. I wouldn't worry about this.
Commenting is always dependent on the complexity of the code. You should almost always give identifying info (author's name, maybe the date, etc) and the purpose or overall goal of the code. Then, explain any tricky parts of the implementation. The last part depends on the complexity.
I'm not sure what you mean by "consistency." Do you mean is it a stable sort? "Stable" means that if row 13 precedes row 14, and we sort by some column for which row 13 and 14 are equal, then 13 still precedes 14 in the result. I think it is.
That works just fine. It sorts, and then reports the columns you want. Like sorting a spreadsheet and then hiding some columns.
MySQL uses a good sorting algorithm. So the complexity is...
The lines are blurry. Both are designed for concurrent access, but they may have different guarantees for correctness. We'll talk about this again much later in the course.
Relational means that the fundamental building block is a relation AKA a table.
NULL
is special. So whenever you care about NULL, you use different operators.
MySQL is not a file or a folder in your account. It exists
elsewhere. We talk to it via the mysql
client, which is a
command that we run.
Because the first line of the batch file is a use
statement, which changes what database you are in.
Y'know, you're right. It *does* change, but the fact is not printed because of the way that the query is run. I'll fix the notes, and thanks for catching that.
Yes. If you need to, I can teach you how, but we probaby won't need to in this course.
Great question. WMDB makes the assumption that movies don't have multiple directors. This is realistic without being completely true. (In the real world, most movies have just one director.) We'll talk more about this next time.
Yes, many times.
There are many software implementations of relational databases: Oracle, DB2, Postgres, ... MySQL is one such. But they all speak the standard query language: SQL.
We will use a Python package to interact with MySQL. Give us a few weeks. Oct 12th to be specific.
Efficiency is excellent. People have been working on RDBMS efficiency for 50 years.
Y'know how binary trees work? That's a branching factor of 2. Imagine a branching factor of 100 or 200... They're really cool.
This sounds like it aligns with the space-time complexity trade-off, but I'm having a hard time wrapping my head around why this is the case. Would you mind collaborating a bit more?
It's similar to space-time tradeoff, but it's really more about saying that there's still a place for frugality. Don't store the number of children someone has in a 8-byte number when a 1-byte number will be more than enough.