
MongoDB
Master NoSQL Databases and Build Real Projects
What you'll learn
- Understand the NoSQL concept and its benefits
- Install MongoDB and set up the Mongo Shell
- Create databases and work with collections
- Understand the document structure, BSON, and schema
- Perform create, read, update, and delete (CRUD) operations
- Use embedded documents, comparison operators, and logical operators
- Search with regular expressions (regex)
- Use indexes to speed up searches
- Analyze data with the Aggregation framework
- Connect MongoDB to NodeJS and build a user registration project
About this course
This course teaches the MongoDB database from scratch. MongoDB is a NoSQL database that stores data in documents instead of tables. It starts with an introduction and an overview of the NoSQL concept and its benefits, then installing MongoDB and setting up your work environment and the Mongo Shell. After that you learn how to create databases, work with collections, understand the structure of a document, the BSON format, data types, and the idea of a schema. Then you move on to CRUD operations: adding data with insertOne and insertMany, searching with find and findOne, updating and deleting, plus bulkWrite and upsert. The lessons also explain embedded documents, comparison operators, logical operators, and searching with regular expressions (regex), followed by indexing and the Aggregation framework, and finally connecting to NodeJS with a practical user registration project. The course suits programmers, computer science students, and anyone who wants to learn databases, and it requires no previous database experience. By the end, you will be able to design a MongoDB database, write its queries, and connect it to a NodeJS application.
Expected outcomes
- Ability to design and build robust NoSQL databases from scratch.
- Mastering data analysis and processing using Aggregation Pipelines.
- Proficiency in connecting databases to real software projects.
- Complete readiness to work as a professional developer handling data.
Learner reviews
Course content
1Module One | Introduction and Setting Up the Work Environment
4 lectures
- Course Introduction: Goals and Basic RequirementsIntroduces MongoDB: defines a database and why data is stored, compares SQL and NoSQL databases and the types of NoSQL, and shows MongoDB is a flexible document database that does not store empty values.14:12
- Overview of MongoDB and the NoSQL Concept and Its BenefitsAn overview of MongoDB as a flexible NoSQL database that stores data as JSON-like documents and scales well, compared with MySQL, covering CRUD operations and its use at large companies such as Uber and Adobe.6:00
- Installation and Configuration: Setting Up the Working Environment on the Operating SystemExplains installing MongoDB on Windows and setting environment variables so it runs from the command line, creating the data/db folder and starting the server, then opening mongosh and listing the default databases.19:37
- Control Tools and Installing and Setting Up Mongo Shell for Data HandlingExplains how to download and install MongoDB Shell from the MongoDB website, launch it with mongosh, list the existing databases with show dbs, and exit the shell.3:17
2Module Two | Data Structuring and Foundational Rules
6 lectures
- Ways to Create Databases and Switch Between ThemExplains creating databases in MongoDB and switching between them with the use command, listing them with show dbs, connecting through MongoDB Compass, and the default admin, config and local databases.12:59
- Working with CollectionsExplains working with collections in MongoDB: creating and dropping a database, creating a collection such as Students with createCollection, listing it with show collections, and removing it with drop.15:11
- Creating and Organizing GroupsExplains naming rules for databases and collections in MongoDB: upper and lower case are allowed, special characters are not except the underscore, and a collection name cannot start with a number.4:59
- Document Structure and Understanding Data Format and BSONExplains the structure of a MongoDB document: curly braces holding key-value pairs separated by commas, illustrated with a student example, plus the naming rules for keys.8:23
- Supported and Stored Data TypesExplains the data types that document values can hold, such as strings, integers, booleans, dates and nested objects, and why keys should have meaningful names.14:41
- Schema Concept: Explaining the Structural Design of DataExplains the Schema concept and how to add validation rules to a collection using a validator and the jsonSchema operator, defining field types with bsonType and required fields so incomplete data is rejected.24:42
3Module Three | Basic Operations CRUD
11 lectures
- Introduction to CRUDDefines CRUD operations, create, read, update and delete, noting that they apply to databases in general and not only MongoDB, as an introduction to the create methods.1:38
- Adding Data and Theoretical and Practical Methods for Inserting RecordsExplains how to add data in MongoDB with insertOne and insertMany, the document syntax in braces, adding several documents inside an array, and that the collection is created automatically on first insert.10:15
- Practical Application of insertOne (Adding a Single Document)A hands-on use of insertOne in the MongoDB shell to add a document to a teachers collection, explaining the response and the _id field that MongoDB generates automatically or that you can set yourself.10:07
- Practical Application of insertMany (Adding Multiple Documents in One Operation)Demonstrates insertMany to add several documents to a collection in one operation, automatic creation of the collection when it does not exist, and countDocuments to count the documents.8:08
- Explaining the find Function and Data Retrieval and Search MethodsExplains the read operation of CRUD using the find method to retrieve all documents from a collection in the shell, shown on a students collection.4:12
- Explaining the findOne Function and Accurately Accessing a Specific RecordExplains findOne, which returns only the first document matching the query, and compares it with find, which returns all documents, using an example with similar documents.5:29
- Advanced find Techniques and Professional Filtering and Customizing ResultsCovers the extra parameters of find: the filter, projection to show or hide specific fields, and chaining sort for ordering and limit to cap the number of documents returned.13:00
- Updating Data and Using Update Functions to Modify RecordsExplains MongoDB update operations: updateOne, updateMany and replaceOne, using set to change a value or add a new field, and replacing an entire document with new data.24:35
- Deleting Data and Using Delete Functions and Managing DeletionExplains deletion in MongoDB with deleteOne for a single document and deleteMany for multiple documents by filter, and that an empty filter removes every document in the collection.12:05
- Bulk Operations bulkWrite and Executing Multiple Operations at OnceExplains bulkWrite for running several different operations such as insertOne, updateOne and deleteOne in a single command, with the ordered option and reading the response that reports what was inserted and deleted.23:57
- Upsert Technique: Smart Merging of Update and InsertExplains upsert, a combination of update and insert: when the target document does not exist a new one is created automatically, unlike a plain update that ignores a missing document.11:06
4Module Four | Transactions and Interconnected Documents
8 lectures
- Nested Documents and Definition of Embedded DocumentsExplains embedded documents in MongoDB, how to add a document inside another in a Courses collection, and how to view it in Compass, ahead of filtering with query operators.13:01
- Advanced Access and How to Handle Nested FieldsExplains accessing fields inside embedded documents in MongoDB, either by matching the whole nested document or by using dot notation to reach a specific field, with filtering in the find command.14:47
- The in$ Operator (Usage and Application Explanation)A hands-on look at querying embedded documents in MongoDB by filtering on the full name or the course field, showing selected fields with projection, and explaining the $in operator.13:33
- Comparison Operators 1 (Basic Operations)Covers the basic comparison operators in MongoDB queries such as in, nin, gt, gte, lt, lte and eq, the difference between greater than and greater than or equal, and how to write them in Compass and the shell.17:16
- Comparison Operators 2 (Advanced Cases and Linking Values)Explains the exists and type operators in MongoDB: exists checks whether a field is present in a document, type filters by value type, with a hands-on example using updateMany.20:33
- Pattern Matching with regex$ and Using Regular Expressions in QueriesExplains regular-expression search in MongoDB: matching the start of a word with ^, the end with $, or any position, and the options flag to ignore letter case.16:19
- Theoretical Programming Logic and Basics of Logical OperatorsExplains the logical operators AND, OR, NOR and NOT in theory, how they combine several conditions in a find query, and the true and false results each one produces.10:52
- Practical Programming Logic and Applying Complex Logical QueriesApplies the logical operators and, or, not and nor in practice on a courses collection in the shell, such as finding a given person enrolled in a Node.js course and negating a condition with not.34:09
5Module Five | Performance and Analytical Operations
3 lectures
- What is an Index and How Does it Speed Up Search Operations?Explains what an index is in MongoDB and how it speeds up search instead of scanning every document, creating one with createIndex on a field such as brand, listing existing indexes and dropping one.22:44
- Different Indexing Strategies and Their UsesExplains index types in MongoDB, including the compound index that combines several fields, testing it in practice with explain to see whether the index was used in a query, and dropping indexes.15:26
- Explaining Aggregation: A Framework for Data Analysis and ProcessingExplains the Aggregation framework in MongoDB for grouping and analyzing data through a pipeline of successive stages, applying the group, project and match stages along with sort and limit.23:43
6Module Six | Practical Application and Programming Integration
2 lectures
- Connecting with NodeJS: How to Integrate NodeJS with MongoDBExplains connecting MongoDB to Node.js using the Mongoose library, defining a user Schema with fields such as name, unique email and age, then inserting data and querying it.23:49
- User Registration Project: A Practical Application for Building a Data Storage SystemA hands-on user registration project: building an app with Express and Mongoose that receives name, email and phone from a form and saves them to MongoDB through a POST request, then checking the data in Compass.27:57
7Appendices
1 attachments
- Uploading Practical Application Files
Instructor

Eng. Amr Abdel Fattah



