{"id":19637297,"url":"https://github.com/walidabazo/learn-mongodb-in-1-hour","last_synced_at":"2026-06-19T06:32:47.053Z","repository":{"id":214735014,"uuid":"737235764","full_name":"walidabazo/Learn-MongoDB-in-1-Hour","owner":"walidabazo","description":"Like any other database management language, MongoDB is based on a NoSQL database that is used for storing data in a key-value pair. Its work is based on the concept of document and collection. It is also an open-source, document-oriented, cross-platform database system that is written using C++. ","archived":false,"fork":false,"pushed_at":"2023-12-30T09:57:39.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T07:13:55.002Z","etag":null,"topics":["mongodb","mongodb-database","mongoose-schema","mongoshell","nodejs","nosql-database"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/walidabazo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-30T09:39:55.000Z","updated_at":"2024-02-07T10:02:42.000Z","dependencies_parsed_at":"2023-12-30T10:44:00.256Z","dependency_job_id":null,"html_url":"https://github.com/walidabazo/Learn-MongoDB-in-1-Hour","commit_stats":null,"previous_names":["walidabazo/learn-mongodb-in-1-hour"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/walidabazo/Learn-MongoDB-in-1-Hour","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walidabazo%2FLearn-MongoDB-in-1-Hour","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walidabazo%2FLearn-MongoDB-in-1-Hour/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walidabazo%2FLearn-MongoDB-in-1-Hour/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walidabazo%2FLearn-MongoDB-in-1-Hour/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/walidabazo","download_url":"https://codeload.github.com/walidabazo/Learn-MongoDB-in-1-Hour/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walidabazo%2FLearn-MongoDB-in-1-Hour/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34520431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","mongodb-database","mongoose-schema","mongoshell","nodejs","nosql-database"],"created_at":"2024-11-11T12:33:59.463Z","updated_at":"2026-06-19T06:32:47.036Z","avatar_url":"https://github.com/walidabazo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn-MongoDB-in-1-Hour\nLike any other database management language, MongoDB is based on a NoSQL database that is used for storing data in a key-value pair. Its work is based on the concept of document and collection. It is also an open-source, document-oriented, cross-platform database system that is written using C++. \n\n[![Watch the video](https://img.youtube.com/vi/iLcJZ1QdE-E/0.jpg)](https://youtu.be/iLcJZ1QdE-E)\n\n# what main Collections ?\nCollections can be defined as a cluster of MongoDB documents that exist within a single database. You can relate this to that of a table in a relational database management system. MongoDB collections do not implement the concept of schema. Documents that have collections usually contain different fields. Typically, all the documents residing within a collection are meant for a comparable or related purpose.\n\n# what main document?\nA document can be defined as a collection of key-value pairs that contain dynamic schema. Dynamic schema is something that documents of equal collection do not require for having the same collection of fields or construction, and a common field is capable of holding various types of data.\n\n# Learning \n\n## MongoDB tutorial for beginners\n        - MongoDB Overview\n        - MongoDB installation \n        - MongoShell installation\n        - Set Environment variable PATH\n        - VSCode with Mongosh\n        - Database creation and drop\n\n## insert\n         db.staff.insertOne(\n         {\n          name:\"walid\",\n          age:40,\n          Fulltime:false,\n          ReguisterDate:new Date(),\n          BirthDate:New Date(1984-8-2),\n          Corses:[\"ASP.NET\",\"C#\",\"MS SQl server\"],\n          Address{street:\"4 st.\",City:\"cairo\",zipcode:123456}\n          })\n## data types\n## Sorting and limiting\n\n        db.staff.find()\n        db.staff.find().sort({name:1})\n        db.staff.find().sort({name:-1})\n\n        db.staff.find().sort({age:1})\n        db.staff.find().sort({age:-1})\n\n        db.staff.find().limit(1)\n        db.staff.find().limit(3)\n\n        db.staff.find().sort({age1}),limit(1)\n        db.staff.find().sort({age:-1}),limit(1)\n        \n## find\n        get all \n        db.staff.find() \n\n       db.staff.find({name: \"adam\"})\n       db.staff.find({age: 25})\n       db.staff.find({FullTime: false})\n\n       .find({query},{Projection})\n\n       db.staff.find({age: 40}, {FullTime: false})\n\n       db.staff.find({}, {name: true})\n       db.staff.find({}, {_id: false, name: true})\n       db.staff.find({}, {_id: false, name: true, age: true})\n\n## update\n      db.staff.find()\n       - updateOne()\n      db.staff.updateOne({name:\"adam\"}, {$set:{FullTime:true}})\n      db.staff.updateOne({name:\"adam\"}, {$unset:{FullTime:\"\"}})\n\n      updateMany()\n      db.staff.updateMany({}, {$set:{FullTime:true}})\n      db.staff.updateMany({FullTime:{$exists:false}}, {$set:{FullTime:true}})\n      \n## Delete and import-export db\n      db.staff.deleteOne({name:\"adam\"})\n      db.staff.deleteMany({Fulltime:false})\n      db.staff.deleteMany({RegisterDate:{$exists:false}})\n      \n## comparison operators\n        $eq : Values are equal.\n        $ne : Values are not equal.\n        $lt : Value is less than another value.\n        $lte : Value is less than or equal to another value.\n        $gt : Value is greater than another value.\n        $gte : Value is greater than or equal to another value.\n        $in : Value is matched within an array.\n        \n## logical operators\n       $and: Returns documents where both queries match\n       $or: Returns documents where either query matches\n       $nor: Returns documents where both queries fail to match\n       $not: Returns documents where the query does not match\n       \n## indexes\n## collections\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalidabazo%2Flearn-mongodb-in-1-hour","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalidabazo%2Flearn-mongodb-in-1-hour","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalidabazo%2Flearn-mongodb-in-1-hour/lists"}