You are correct that jQuery and MongoDB are separate.
The $
is just a coincidence. $
is
just an odd letter that is allowed in JS identifiers, so it can be
a nice way to have something stand out.
It's stored on MongoDB's servers, in the cloud somewhere. I let them take care of all the administration and such.
That's one of the differences between the fall version of 304, which uses MySQL, and the spring version, which using MongoDB. Both are important players, so rather than pick one, I wanted to allow a choice.
Sure. It's literally a whole new language, built of expressions using JS dictionaries (documents).
Yes, it certainly is. We'll start playing with the Mongo Shell very soon.
Projection is jargon for reducing the amount of data, but choosing or discarding attributes (keys) from the documents.
Projection isn't a way to search. It just a way to reduce the data.
Regex is a great way to search for strings. That's what regular expressions are for.
We could certainly do queries like that. Yes, they can get complicated, but the more work we can do in the cloud, the better.
We'll play in the Mongo Shell today.
By default, all documents are returned with keys. If your search returns several matches, you can tell them apart with their keys. For example, all the Georges:
Their argument is a document (JS object literal) containing the query. Again, that's a whole new language, and one that will take a little time to learn. Documentation is our friend.
Regular expressions are a way to describe a pattern for a string. For example, a phone number might look like DDD-DDD-DDDD. Regular expressions allow us to search for things like that.
A meta-character comes from the regex world. It's a character that
is used to talk about other characters. Like [0-9]
is a
way of describing a digit.
Amazing!