MongoDB for Developers with Python Transcripts
Chapter: Mapping classes to MongoDB with the ODM MongoEngine
Lecture: The dealership demo
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
So far, we've been kind of poking at MongoDB, playing around with some of maybe existing data
0:06
or creating simple little databases with one or two records in it. We're kind of done with that, we're ready to move on
0:12
to be building the main application that we're going to build for this course. So we're going to take this concept of a car dealership
0:19
that does service for autos, sells cars, does service like engine repair, fixes flat tires and so on, for a Ferrari dealership,
0:27
and that's going to be our demo for the rest of this course. On this first go round, we're going to start out
0:33
with an empty database or a non-existent database, we're going to model it in MongoDB with MongoEngine
0:39
and then we're going to run that code and create a few simple cars, a couple Ferraries, maybe associate the cars with some owners,
0:46
do some service on the cars, somebody over rev the engine and has got to get a new engine, or got a flat tire,
0:52
things like that; we'll see how it all works. Later, when we get to the high performance section,
0:56
we're going to instead of start with an empty database start with one with like a quarter million cars and tons and tons of service records
1:03
and they will start asking really interesting questions and really focus on the performance side of things.
1:09
So we're going to use this for the rest of our time and I have been really waiting till we got to the MongoEngine section
1:14
to create what I would think of as a somewhat realistic complex demo because with PyMongo it's fine, but you'll see the real power of modeling this
1:22
in a full featured realistic production style way once we get to MongoEngine things like indexes and uniqueness,
1:30
and constraints and types and lots of good stuff. So I hope you're ready to learn MongoEngine,
1:35
and put it to work building this cool Ferrari dealership.