title
MongoDB Tutorial
description
Get the Code Here : http://goo.gl/yb7k5x
Best MongoDB Book : http://amzn.to/1Qcaqcf
Support me on Patreon : https://www.patreon.com/derekbanas
Welcome to my MongoDB Tutorial. In this tutorial, I'll show you how to install MongoDB on both Windows and Mac. We'll also cover how to use Mongo, Mongod, executing JavaScript, creating databases, creating documents, insert, update, find, remove, data types, executing external JS scripts, the mongorc.js file and much more.
detail
{'title': 'MongoDB Tutorial', 'heatmap': [{'end': 490.376, 'start': 433.441, 'weight': 0.779}, {'end': 530.909, 'start': 505.465, 'weight': 0.769}], 'summary': "The 'mongodb tutorial' video covers in-depth tutorials on installation, running javascript in the shell, commands, data types, configuration, setup of servers, and usage with node.js, with specific instructions for both windows and macintosh, including path setup, shell usage, and configuration of mongodb and javascript for both operating systems.", 'chapters': [{'end': 70.446, 'segs': [{'end': 33.997, 'src': 'embed', 'start': 0.134, 'weight': 0, 'content': [{'end': 2.996, 'text': 'Well hello internet and welcome to my MongoDB tutorial.', 'start': 0.134, 'duration': 2.862}, {'end': 8.72, 'text': "Over the course of this tutorial series you're going to learn pretty much everything you could ever want to know about MongoDB.", 'start': 3.116, 'duration': 5.604}, {'end': 12.062, 'text': "I'm going to show you how to install it on both Windows as well as Macintosh.", 'start': 8.94, 'duration': 3.122}, {'end': 14.284, 'text': "I'm going to show you how to run JavaScript in the shell.", 'start': 12.082, 'duration': 2.202}, {'end': 17.246, 'text': "I'm going to cover pretty much every command you could ever want to know about.", 'start': 14.344, 'duration': 2.902}, {'end': 20.588, 'text': "I'm going to show you how to insert, update, and delete pretty much anything.", 'start': 17.266, 'duration': 3.322}, {'end': 28.133, 'text': "I'm going to cover math, array functions, querying, aggregation, replication, sharding, and using MongoDB with Node.js.", 'start': 20.608, 'duration': 7.525}, {'end': 33.997, 'text': "So I'm going to jump over and show you how to install everything on Windows as well as on OS X.", 'start': 28.453, 'duration': 5.544}], 'summary': 'Comprehensive mongodb tutorial covering installation, commands, and usage with node.js.', 'duration': 33.863, 'max_score': 0.134, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew134.jpg'}], 'start': 0.134, 'title': 'Mongodb tutorial', 'summary': 'Covers an in-depth mongodb tutorial including installation on windows and macintosh, running javascript in the shell, covering various commands, insertion, updating, and deletion, array functions, querying, aggregation, replication, sharding, and using mongodb with node.js.', 'chapters': [{'end': 70.446, 'start': 0.134, 'title': 'Mongodb tutorial', 'summary': 'Covers an in-depth mongodb tutorial including installation on windows and macintosh, running javascript in the shell, covering various commands, insertion, updating, and deletion, array functions, querying, aggregation, replication, sharding, and using mongodb with node.js.', 'duration': 70.312, 'highlights': ['Covering various commands and queries The tutorial covers pretty much every command and query you could ever want to know about MongoDB.', 'Installation guide for Windows and Macintosh The chapter provides a guide on how to install MongoDB on both Windows and Macintosh systems.', 'Usage of MongoDB with Node.js The tutorial includes guidance on using MongoDB with Node.js, showcasing its versatility and compatibility.']}], 'duration': 70.312, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew134.jpg', 'highlights': ['The tutorial covers pretty much every command and query you could ever want to know about MongoDB.', 'The chapter provides a guide on how to install MongoDB on both Windows and Macintosh systems.', 'The tutorial includes guidance on using MongoDB with Node.js, showcasing its versatility and compatibility.']}, {'end': 325.852, 'segs': [{'end': 98.543, 'src': 'embed', 'start': 70.506, 'weight': 2, 'content': [{'end': 75.19, 'text': "It's probably not on your desktop but open up your command prompt from the start menu down here.", 'start': 70.506, 'duration': 4.684}, {'end': 78.092, 'text': "And you're going to want to change to your regular C directory.", 'start': 75.45, 'duration': 2.642}, {'end': 80.313, 'text': 'And you need to make a data directory.', 'start': 78.332, 'duration': 1.981}, {'end': 82.874, 'text': "So you're going to type in md data.", 'start': 80.353, 'duration': 2.521}, {'end': 88.457, 'text': "And then you're going to type in md data backslash db to create all those directories you're going to need.", 'start': 83.054, 'duration': 5.403}, {'end': 92.94, 'text': "Now you're going to want to work your way through to find the actual MongoDB server.", 'start': 88.698, 'duration': 4.242}, {'end': 95.381, 'text': "And it's more than likely in your program files.", 'start': 93.28, 'duration': 2.101}, {'end': 98.543, 'text': "So you're going to go to that part of your website.", 'start': 95.481, 'duration': 3.062}], 'summary': 'Creating a data directory and navigating to the mongodb server in the program files through the command prompt.', 'duration': 28.037, 'max_score': 70.506, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew70506.jpg'}, {'end': 192.861, 'src': 'embed', 'start': 162.851, 'weight': 0, 'content': [{'end': 167.733, 'text': "click on advanced system settings and then you're going to want to get this directory name.", 'start': 162.851, 'duration': 4.882}, {'end': 168.654, 'text': "that's over here.", 'start': 167.733, 'duration': 0.921}, {'end': 174.597, 'text': "so it's program files mongodb server 3.0 and this guy over here, which is your advanced tab.", 'start': 168.654, 'duration': 5.943}, {'end': 178.159, 'text': "make sure you click on that and you're going to want to click on environment variables.", 'start': 174.597, 'duration': 3.562}, {'end': 185.643, 'text': "then, from the environment variable section, you're going to click on path user variables for Derek Banas, as well as path,", 'start': 178.559, 'duration': 7.084}, {'end': 192.861, 'text': "which would be system variables and then you're going to want to paste inside of there C colon backslash program files slash.", 'start': 185.643, 'duration': 7.218}], 'summary': 'Access advanced system settings, navigate to environment variables, and paste c:\\', 'duration': 30.01, 'max_score': 162.851, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew162851.jpg'}, {'end': 302.445, 'src': 'embed', 'start': 275.294, 'weight': 1, 'content': [{'end': 278.635, 'text': "And whenever you do, you're going to type in Mongo and your shell is going to be ready to go.", 'start': 275.294, 'duration': 3.341}, {'end': 282.237, 'text': "And that's all you need to do to install on Windows as well as Macintosh.", 'start': 278.856, 'duration': 3.381}, {'end': 284.478, 'text': "Now I'm going to jump over and start writing some code.", 'start': 282.277, 'duration': 2.201}, {'end': 292.441, 'text': "And if you wondered how you would open up a new tab, you're just going to go in here inside the terminal and shell and new tab and there we are.", 'start': 285.378, 'duration': 7.063}, {'end': 297.183, 'text': 'And everything is exactly the same that I do here on Macintosh as well as on Windows.', 'start': 292.681, 'duration': 4.502}, {'end': 302.445, 'text': "And in the situations in which things are not the same, I'm going to show you how to change them so that they are the same.", 'start': 297.363, 'duration': 5.082}], 'summary': 'Instructions for installing and using mongo on windows and macintosh, with the demonstration of opening new tabs and ensuring consistency across platforms.', 'duration': 27.151, 'max_score': 275.294, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew275294.jpg'}], 'start': 70.506, 'title': 'Setting up mongodb servers and executables', 'summary': 'Covers the process of setting up mongodb servers, including creating directories and navigating to executables, setting up mongodb using mongo.exe and mongod.exe, including path setup for windows and homebrew for macintosh, and installing mongodb on mac and windows, creating data directory, setting up the server, and accessing mongodb shell in the terminal, with specific commands and instructions for both operating systems.', 'chapters': [{'end': 123.27, 'start': 70.506, 'title': 'Setting up mongodb server', 'summary': 'Explains the process of setting up mongodb server, including creating necessary directories and navigating to the server and executable files.', 'duration': 52.764, 'highlights': ["To set up MongoDB server, create a 'data' directory by typing 'md data' in the command prompt.", "Navigate to the MongoDB server directory, typically in the program files, and then to the 'bin' directory to access the executables.", "Open the command prompt, change to the regular C directory, and create the necessary 'data' and 'db' directories using 'md data' and 'md data\\db' commands."]}, {'end': 220.386, 'start': 123.27, 'title': 'Setting up mongodb with mongo.exe and mongod.exe', 'summary': 'Explains how to set up mongodb using mongo.exe and mongod.exe, including setting up the path for windows users and using homebrew for macintosh users.', 'duration': 97.116, 'highlights': ['Setting up MongoDB using mongo.exe and mongod.exe The chapter explains how to set up MongoDB using mongo.exe and mongod.exe to run the database and work with the shell.', 'Setting up path for Windows users Instructions for setting up the path for MongoDB on Windows by adding the directory to the environment variables.', 'Using Homebrew for Macintosh users Instructions for Macintosh users to use Homebrew for installing MongoDB.']}, {'end': 325.852, 'start': 220.386, 'title': 'Installing and using mongodb on mac and windows', 'summary': 'Explains the process of installing and using mongodb on mac and windows, including creating the data directory, setting up the server, and accessing the mongodb shell in the terminal, with specific commands and instructions provided for both operating systems.', 'duration': 105.466, 'highlights': ['The chapter explains the process of installing and using MongoDB on Mac and Windows, including creating the data directory, setting up the server, and accessing the MongoDB shell in the terminal, with specific commands and instructions provided for both operating systems.', "In order to install MongoDB, users need to type 'brew install MongoDB' on Mac, and for Windows, they must ensure that they are logged in as the administrator to create the data directory.", "To ensure that MongoDB can be used by any user, the command 'WhoAmI' is used to display the username, followed by 'sudo change owner' to assign ownership to the user and change the data directory, requiring password input.", "The process of starting the MongoDB server involves typing 'MongoD' and opening a new terminal tab to access the MongoDB shell by typing 'Mongo', which is applicable for both Mac and Windows.", 'A cautionary note is provided to avoid including spaces, forward slashes, or backslashes in database names on both Windows and Mac when creating databases in MongoDB.']}], 'duration': 255.346, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew70506.jpg', 'highlights': ['Instructions for setting up the path for MongoDB on Windows by adding the directory to the environment variables.', "The process of starting the MongoDB server involves typing 'MongoD' and opening a new terminal tab to access the MongoDB shell by typing 'Mongo', which is applicable for both Mac and Windows.", "To set up MongoDB server, create a 'data' directory by typing 'md data' in the command prompt.", 'The chapter explains the process of installing and using MongoDB on Mac and Windows, including creating the data directory, setting up the server, and accessing the MongoDB shell in the terminal, with specific commands and instructions provided for both operating systems.']}, {'end': 608.468, 'segs': [{'end': 386.77, 'src': 'embed', 'start': 347.807, 'weight': 0, 'content': [{'end': 352.81, 'text': "And let's say we have times two and we receive a number for this function.", 'start': 347.807, 'duration': 5.003}, {'end': 360.074, 'text': 'And in exchange, we return whatever the number is that they pass inside of here times two and close that off.', 'start': 353.37, 'duration': 6.704}, {'end': 363.896, 'text': "We're then going to be able to directly in our shell go times two.", 'start': 360.434, 'duration': 3.462}, {'end': 365.891, 'text': 'Pass in 5, for example.', 'start': 364.309, 'duration': 1.582}, {'end': 366.892, 'text': 'Close that off.', 'start': 366.151, 'duration': 0.741}, {'end': 368.774, 'text': "And you're going to see that it gives you a result.", 'start': 367.092, 'duration': 1.682}, {'end': 370.335, 'text': 'Just something neat to know about.', 'start': 368.854, 'duration': 1.481}, {'end': 375.26, 'text': "We're also going to be able to show all of our databases by going Show DBS, like that.", 'start': 370.515, 'duration': 4.745}, {'end': 378.043, 'text': "And it's going to show all of the databases we currently have installed.", 'start': 375.32, 'duration': 2.723}, {'end': 382.208, 'text': 'We should also show our current database by just typing DB.', 'start': 378.284, 'duration': 3.924}, {'end': 386.77, 'text': "And there you can see we're using the test database, and that's always going to be true unless we change it.", 'start': 382.628, 'duration': 4.142}], 'summary': 'A function multiplies input by 2; shell commands show databases and current database.', 'duration': 38.963, 'max_score': 347.807, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew347807.jpg'}, {'end': 430.018, 'src': 'embed', 'start': 405.659, 'weight': 3, 'content': [{'end': 414.002, 'text': "In this first one, however, what I'm going to do here is I'm going to create a MongoDB document and then insert it into our database.", 'start': 405.659, 'duration': 8.343}, {'end': 418.703, 'text': "And I'm going to set it up kind of like you would set it up inside of JavaScript.", 'start': 414.122, 'duration': 4.581}, {'end': 422.084, 'text': "I'm going to go colon and I'm going to type in a name here.", 'start': 419.003, 'duration': 3.081}, {'end': 426.075, 'text': "And don't worry about skipping to different lines if you want to keep everything neat.", 'start': 422.492, 'duration': 3.583}, {'end': 430.018, 'text': "So let's just go and create like an employee type of database here.", 'start': 426.315, 'duration': 3.703}], 'summary': 'Creating a mongodb document for an employee database.', 'duration': 24.359, 'max_score': 405.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew405659.jpg'}, {'end': 490.376, 'src': 'heatmap', 'start': 433.441, 'weight': 0.779, 'content': [{'end': 441.807, 'text': "So if I wanted to have this be the current date that I'm entering this document, I would just type in new date like that and then close that off.", 'start': 433.441, 'duration': 8.366}, {'end': 442.608, 'text': 'And there we go.', 'start': 442.008, 'duration': 0.6}, {'end': 443.629, 'text': 'You can see it right there.', 'start': 442.748, 'duration': 0.881}, {'end': 454.307, 'text': "Now to insert it into my database, I'm going to type in db test1, which is the name of my database, and insert and Derek, and that is inserted.", 'start': 444.065, 'duration': 10.242}, {'end': 455.807, 'text': 'As you can see, it returned 1.', 'start': 454.387, 'duration': 1.42}, {'end': 462.309, 'text': "And then if I want to find all the information I have inside of my database, I'm going to type in db test1.", 'start': 455.807, 'duration': 6.502}, {'end': 464.389, 'text': 'Once again, test1 is the name of the database.', 'start': 462.469, 'duration': 1.92}, {'end': 469.65, 'text': 'And then find, and you can see right there that it pops back Derek Banas and all that other information.', 'start': 464.749, 'duration': 4.901}, {'end': 473.111, 'text': 'We could also come in here and type in pretty at the end.', 'start': 469.75, 'duration': 3.361}, {'end': 476.551, 'text': 'you can see that it lays everything out a little bit nicer on our screen.', 'start': 473.59, 'duration': 2.961}, {'end': 484.414, 'text': "now let's say that I decided I wanted to have my employee, Derek Banas, have a list of references in an array installed inside of it.", 'start': 476.551, 'duration': 7.863}, {'end': 490.376, 'text': 'well, I can just go to Derek Banas like this and references and say that this is a array.', 'start': 484.414, 'duration': 5.962}], 'summary': 'Demonstration of inserting and finding data in a database using new date, insert, and find commands, with a returned count of 1.', 'duration': 56.935, 'max_score': 433.441, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew433441.jpg'}, {'end': 566.635, 'src': 'heatmap', 'start': 505.465, 'weight': 4, 'content': [{'end': 512.472, 'text': "I can do that and say that I want to update based off of the changes in the Derek Banas object that I've created right here.", 'start': 505.465, 'duration': 7.007}, {'end': 517.056, 'text': 'You can see that it matched one and it modified one so you know that that all went through.', 'start': 512.732, 'duration': 4.324}, {'end': 523.623, 'text': 'Now what I can do is do another find on this and you can see that the references array is also there as well.', 'start': 517.297, 'duration': 6.326}, {'end': 530.909, 'text': 'We would also, of course, be able to come in here and delete information by going again, test one, and remove.', 'start': 524.005, 'duration': 6.904}, {'end': 534.651, 'text': 'And then specifically, we have to find a document to remove.', 'start': 531.349, 'duration': 3.302}, {'end': 539.354, 'text': "So we're going to say we want to remove the document that has a name of Derek Banas.", 'start': 534.671, 'duration': 4.683}, {'end': 545.338, 'text': "And you can see that it did remove, but if we want to verify, you can go and type in find and see that nothing's there.", 'start': 539.755, 'duration': 5.583}, {'end': 551.503, 'text': "and it's also important to know that there are numerous different data types that we can save into our documents.", 'start': 545.678, 'duration': 5.825}, {'end': 559.289, 'text': 'so we have null, and null could be something like name, and this is automatically going to be done for us.', 'start': 551.503, 'duration': 7.786}, {'end': 563.232, 'text': "you have name and null, which means it doesn't have a value at all.", 'start': 559.289, 'duration': 3.943}, {'end': 566.635, 'text': "so that's one type of data that we can store in a document.", 'start': 563.232, 'duration': 3.403}], 'summary': 'Demonstrating updating, finding, and deleting documents in a database with specific examples and results.', 'duration': 61.17, 'max_score': 505.465, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew505465.jpg'}], 'start': 326.093, 'title': 'Using javascript and mongodb documents', 'summary': 'Discusses using javascript code directly inside the mongodb shell, demonstrating the usage of functions and database commands. it also explains creating, inserting, updating, and deleting mongodb documents, including various data types, with practical demonstrations and explanations.', 'chapters': [{'end': 386.77, 'start': 326.093, 'title': 'Using javascript in mongodb shell', 'summary': 'Discusses using javascript code directly inside the mongodb shell, including creating functions, running queries, and viewing databases, with an emphasis on the ability to run javascript code directly inside the shell and demonstrating the usage of functions and database commands.', 'duration': 60.677, 'highlights': ["JavaScript code can be run directly inside the MongoDB shell, allowing for the creation and execution of functions like 'times two' that can be used to perform calculations, such as multiplying a number by 2.", "The 'Show DBS' command can be used to display all installed databases, providing an overview of the available databases for the user to interact with.", "The 'DB' command displays the current database being used, which remains constant unless specifically changed, offering a convenient way to check and confirm the active database."]}, {'end': 608.468, 'start': 387.01, 'title': 'Working with mongodb documents', 'summary': 'Explains how to create, insert, update, and delete mongodb documents, including examples of different data types, such as null, booleans, numbers, and strings, with practical demonstrations and explanations.', 'duration': 221.458, 'highlights': ['The chapter demonstrates creating a new database, inserting a MongoDB document, and finding all information inside the database, with practical examples and the result of the insert operation returning 1.', 'It explains updating an existing document by matching and modifying it, with a demonstration showing one match and one modification, providing clarity on the update process.', 'The transcript includes examples of different data types that can be stored in documents, including null, booleans, numbers, and strings, with clear demonstrations of how to store each data type and when to use quotes.', "It showcases the process of removing a document from the database and verifying its removal, demonstrating the deletion process and ensuring the verification of the removed document's absence.", 'The transcript emphasizes the importance of maintaining data integrity and provides practical demonstrations of storing different data types, including null, booleans, numbers, and strings, within MongoDB documents.']}], 'duration': 282.375, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew326093.jpg', 'highlights': ["JavaScript code can be run directly inside the MongoDB shell, allowing for the creation and execution of functions like 'times two' that can be used to perform calculations, such as multiplying a number by 2.", "The 'Show DBS' command can be used to display all installed databases, providing an overview of the available databases for the user to interact with.", "The 'DB' command displays the current database being used, which remains constant unless specifically changed, offering a convenient way to check and confirm the active database.", 'The chapter demonstrates creating a new database, inserting a MongoDB document, and finding all information inside the database, with practical examples and the result of the insert operation returning 1.', 'It explains updating an existing document by matching and modifying it, with a demonstration showing one match and one modification, providing clarity on the update process.', 'The transcript includes examples of different data types that can be stored in documents, including null, booleans, numbers, and strings, with clear demonstrations of how to store each data type and when to use quotes.', "It showcases the process of removing a document from the database and verifying its removal, demonstrating the deletion process and ensuring the verification of the removed document's absence.", 'The transcript emphasizes the importance of maintaining data integrity and provides practical demonstrations of storing different data types, including null, booleans, numbers, and strings, within MongoDB documents.']}, {'end': 995.269, 'segs': [{'end': 697.497, 'src': 'embed', 'start': 668.629, 'weight': 4, 'content': [{'end': 670.651, 'text': "I'm going to show you in a second how to put other dates in.", 'start': 668.629, 'duration': 2.022}, {'end': 672.774, 'text': 'We could also store regular expressions.', 'start': 670.671, 'duration': 2.103}, {'end': 680.362, 'text': "So let's say that we wanted to install a street regular expression that we plan on using for some reason or another.", 'start': 673.194, 'duration': 7.168}, {'end': 682.325, 'text': 'We could come in here and do just that.', 'start': 680.563, 'duration': 1.762}, {'end': 685.869, 'text': "And I'll get a little bit more into regular expressions here in a moment.", 'start': 682.585, 'duration': 3.284}, {'end': 690.592, 'text': "And there's just a basic regular expression for matching a street address.", 'start': 686.149, 'duration': 4.443}, {'end': 694.215, 'text': "And if you don't know anything about regular expressions, of course, I have a tutorial on them.", 'start': 691.073, 'duration': 3.142}, {'end': 697.497, 'text': "So that's how we would install a regular expression in a document.", 'start': 694.335, 'duration': 3.162}], 'summary': 'Tutorial on installing and using regular expressions for street addresses.', 'duration': 28.868, 'max_score': 668.629, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew668629.jpg'}, {'end': 747.788, 'src': 'embed', 'start': 720.936, 'weight': 0, 'content': [{'end': 726.198, 'text': "We're also going to have object IDs, which are going to be unique for every document that we have.", 'start': 720.936, 'duration': 5.262}, {'end': 730.74, 'text': 'Those are going to be automatically created for every single object you create inside of MongoDB.', 'start': 726.238, 'duration': 4.502}, {'end': 733.682, 'text': 'And just so you know, there are 12 byte IDs.', 'start': 730.98, 'duration': 2.702}, {'end': 735.763, 'text': "And I'll get a little bit more into that here in a moment.", 'start': 733.742, 'duration': 2.021}, {'end': 737.763, 'text': "And let's go in here and actually create one.", 'start': 735.943, 'duration': 1.82}, {'end': 740.905, 'text': "So let's go random data is equal to.", 'start': 737.823, 'duration': 3.082}, {'end': 743.466, 'text': 'And we could come in and say name.', 'start': 740.925, 'duration': 2.541}, {'end': 747.788, 'text': "And let's put a null value inside of there just so you can see that null value.", 'start': 743.886, 'duration': 3.902}], 'summary': 'Object ids in mongodb are 12-byte unique identifiers automatically created for every document.', 'duration': 26.852, 'max_score': 720.936, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew720936.jpg'}, {'end': 814.418, 'src': 'embed', 'start': 785.082, 'weight': 1, 'content': [{'end': 790.547, 'text': "And if we jump back here and do a find, you're going to see all that information was inserted into our database.", 'start': 785.082, 'duration': 5.465}, {'end': 799.034, 'text': "Another thing that's kind of helpful is you'll be able to type in help And you'll be able to receive a list of MongoDB commands that you can go and play around with.", 'start': 790.907, 'duration': 8.127}, {'end': 802.075, 'text': "I'm going to cover all of them though here so you don't need to worry about that right now.", 'start': 799.094, 'duration': 2.981}, {'end': 804.416, 'text': "But another thing that's kind of useful to know here.", 'start': 802.335, 'duration': 2.081}, {'end': 808.537, 'text': "let's say that, as I'm typing in these commands, you want to know a little bit more about those commands.", 'start': 804.416, 'duration': 4.121}, {'end': 814.418, 'text': 'If you type in the command without parentheses, like if you want to learn more about what the find function actually does,', 'start': 808.857, 'duration': 5.561}], 'summary': 'Information inserted into database, access mongodb commands, and learn more about commands.', 'duration': 29.336, 'max_score': 785.082, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew785082.jpg'}, {'end': 889.141, 'src': 'embed', 'start': 855.426, 'weight': 3, 'content': [{'end': 858.208, 'text': "And to get rid of that error, we're just going to go Ulimit.", 'start': 855.426, 'duration': 2.782}, {'end': 862.672, 'text': 'This is an error that only Mac users would have.', 'start': 858.548, 'duration': 4.124}, {'end': 867.797, 'text': "We're going to go Ulimit dash N 2048 and MongoDB like this.", 'start': 862.932, 'duration': 4.865}, {'end': 872.501, 'text': "And you're going to see that that error is going to go away if we come over here and go Mongo.", 'start': 868.437, 'duration': 4.064}, {'end': 873.742, 'text': 'See, no more error.', 'start': 872.781, 'duration': 0.961}, {'end': 875.604, 'text': "So that's a quick way to get rid of that.", 'start': 874.002, 'duration': 1.602}, {'end': 877.566, 'text': "And that's, once again, just for Mac users.", 'start': 875.684, 'duration': 1.882}, {'end': 882.51, 'text': "Now you're also going to be able to execute JavaScript scripts inside of MongoDB.", 'start': 877.846, 'duration': 4.664}, {'end': 889.141, 'text': 'inside of the directory that I am currently inside of, which you can find, by the way,', 'start': 883.86, 'duration': 5.281}], 'summary': "Executing 'ulimit -n 2048' resolves mac-specific mongodb error.", 'duration': 33.715, 'max_score': 855.426, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew855426.jpg'}], 'start': 608.468, 'title': 'Mongodb data types and shell basics', 'summary': 'Discusses mongodb data types such as strings, arrays, date objects, and object ids, providing examples and insights. it also covers working with mongodb shell, including creating documents, inserting data, using commands, executing javascript scripts, and resolving errors, with a focus on mac users.', 'chapters': [{'end': 740.905, 'start': 608.468, 'title': 'Mongodb data types and storage', 'summary': 'Discusses the various data types that can be stored in mongodb documents, including strings, arrays, date objects, regular expressions, embedded documents, and object ids, providing examples and key insights into the storage capabilities.', 'duration': 132.437, 'highlights': ['MongoDB allows storage of various data types in documents, such as strings, arrays, date objects, regular expressions, embedded documents, and object IDs.', 'Examples are provided, showing how to store arrays, date objects, regular expressions, and embedded documents in MongoDB.', 'Object IDs, which are unique 12-byte identifiers automatically created for each document, are explained and demonstrated.', 'The tutorial on regular expressions is mentioned, providing additional resources for understanding their usage.', 'The chapter emphasizes the practical demonstration of creating and storing different data types in MongoDB documents.']}, {'end': 995.269, 'start': 740.925, 'title': 'Working with mongodb shell', 'summary': 'Covers the basics of working with mongodb shell, including creating documents, inserting data, using commands, executing javascript scripts, and resolving errors, with a focus on mac users.', 'duration': 254.344, 'highlights': ["Creating and inserting documents into MongoDB, such as inserting 'test one' document and finding all the information inserted into the database, showcasing practical usage (e.g., test1.insert, finding data)", "Resolving the 'number of files is 256' soft R limits error specific to Mac users by using the 'ulimit -n 2048' command, providing a quick solution for the error (e.g., Ulimit -n 2048 command to resolve error)", "Executing JavaScript scripts inside MongoDB by creating a function called 'selectdb' to establish database connections and demonstrating how to load and use the script in the shell, enabling users to work with JavaScript scripts in MongoDB (e.g., creating selectdb function, loading and using JavaScript script in the shell)", "Explaining the functionality of the 'help' command to receive a list of MongoDB commands and the method to uncover the inner workings of commands by typing the command without parentheses, illustrating how to explore MongoDB commands and their functionalities (e.g., using 'help' command to get a list of MongoDB commands, exploring inner workings of commands)", "Showing the process to log into different databases and port numbers using the 'selectdb' function in MongoDB, offering a demonstration of how to log into different databases and ports using the selectdb function (e.g., logging into different databases and ports using selectdb function)"]}], 'duration': 386.801, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew608468.jpg', 'highlights': ['MongoDB allows storage of various data types in documents, such as strings, arrays, date objects, regular expressions, embedded documents, and object IDs.', "Creating and inserting documents into MongoDB, such as inserting 'test one' document and finding all the information inserted into the database, showcasing practical usage (e.g., test1.insert, finding data)", 'Object IDs, which are unique 12-byte identifiers automatically created for each document, are explained and demonstrated.', "Resolving the 'number of files is 256' soft R limits error specific to Mac users by using the 'ulimit -n 2048' command, providing a quick solution for the error (e.g., Ulimit -n 2048 command to resolve error)", 'Examples are provided, showing how to store arrays, date objects, regular expressions, and embedded documents in MongoDB.']}, {'end': 1245.618, 'segs': [{'end': 1060.772, 'src': 'embed', 'start': 1036.615, 'weight': 0, 'content': [{'end': 1045.404, 'text': 'That is because I forced normal hidden files to show on my Macintosh, and if I want to show you how to do that inside your terminal,', 'start': 1036.615, 'duration': 8.789}, {'end': 1047.646, 'text': "let's go and just open up a new tab.", 'start': 1045.404, 'duration': 2.242}, {'end': 1050.008, 'text': 'and to show hidden files.', 'start': 1048.047, 'duration': 1.961}, {'end': 1059.412, 'text': "on a Macintosh, you're going to type in defaults, write com apple finder, apple, show all files yes and hit enter,", 'start': 1050.008, 'duration': 9.404}, {'end': 1060.772, 'text': "and that's going to show hidden files.", 'start': 1059.412, 'duration': 1.36}], 'summary': "For mac, use terminal to show hidden files by typing 'defaults write com.apple.finder appleshowallfiles yes' and hitting enter.", 'duration': 24.157, 'max_score': 1036.615, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew1036615.jpg'}, {'end': 1106.283, 'src': 'embed', 'start': 1080.668, 'weight': 1, 'content': [{'end': 1086.771, 'text': "And pretty much what you're gonna do is create a new function inside of here called protectdb, and just type out everything that we have here.", 'start': 1080.668, 'duration': 6.103}, {'end': 1088.952, 'text': 'I have a link to all the code in the directory.', 'start': 1086.791, 'duration': 2.161}, {'end': 1093.715, 'text': "And that's going to allow our database to be protected so that the database isn't droppable or whatever.", 'start': 1089.372, 'duration': 4.343}, {'end': 1098.258, 'text': "And I'm also going to show you how to customize your prompt inside of MongoDB.", 'start': 1093.995, 'duration': 4.263}, {'end': 1101.12, 'text': "All you're going to do is you're going to type in prompt equal to.", 'start': 1098.518, 'duration': 2.602}, {'end': 1106.283, 'text': 'And here I created a function that is going to check whether my database is undefined.', 'start': 1101.44, 'duration': 4.843}], 'summary': "Create 'protectdb' function to secure database, and customize prompt in mongodb.", 'duration': 25.615, 'max_score': 1080.668, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew1080668.jpg'}, {'end': 1163.976, 'src': 'embed', 'start': 1129.079, 'weight': 2, 'content': [{'end': 1139.383, 'text': "I am inside a Mongo and it's going to show my current database right there with a space between it and then the current operation or line inside of my shell as it executes.", 'start': 1129.079, 'duration': 10.304}, {'end': 1141.563, 'text': "So that's how easy it is to customize your prompt.", 'start': 1139.403, 'duration': 2.16}, {'end': 1146.105, 'text': 'And once again, those commands are exactly the same on Windows as well as on Macintosh.', 'start': 1141.824, 'duration': 4.281}, {'end': 1152.149, 'text': "Now, if you'd like to be able to edit shell operations in an external editor, which is really awesome,", 'start': 1146.465, 'duration': 5.684}, {'end': 1157.072, 'text': "once again in your Mongo or C file on a Macintosh, you're just going to type in.", 'start': 1152.149, 'duration': 4.923}, {'end': 1160.974, 'text': "editor is equal to vim like that, and I'll show you how to use that in a second.", 'start': 1157.072, 'duration': 3.902}, {'end': 1163.976, 'text': "And if you're on Windows, we're going to use Sublime Text instead.", 'start': 1161.234, 'duration': 2.742}], 'summary': 'Customize prompt in mongo shell, use vim editor on mac, sublime text on windows', 'duration': 34.897, 'max_score': 1129.079, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew1129079.jpg'}], 'start': 995.652, 'title': 'Configuring mongodb for windows and mac', 'summary': 'Covers configuring the mongorc.js file for windows and mac, including its location, showing hidden files, setting up an editor, creating protectdb function, customizing mongodb prompt to display database name and operation count, and editing shell operations with external editors like vim and sublime text.', 'chapters': [{'end': 1080.508, 'start': 995.652, 'title': 'Configuring mongorc.js for windows and mac', 'summary': 'Discusses the configuration of the mongorc.js file for windows and mac users, including its location and how to show hidden files, and also covers setting up an editor to work with mongodb.', 'duration': 84.856, 'highlights': ['The location of the mongorc.js file is different for Windows and Mac users. ', 'Instructions on how to show hidden files on a Macintosh using terminal commands are provided. ', 'Guidance on setting up an editor to work with MongoDB is given. ']}, {'end': 1146.105, 'start': 1080.668, 'title': 'Customizing mongodb prompt', 'summary': 'Explains the process of creating a function called protectdb to secure the database and customizing the mongodb prompt to display the database name and operation count, which works universally on both windows and macintosh.', 'duration': 65.437, 'highlights': ['Creating a function called protectdb to secure the database by preventing it from being droppable or compromised, with the code provided. Link to all the code available in the directory.', 'Customizing the MongoDB prompt to display the database name and operation count, with the option to show the number of executions in the terminal, applicable on both Windows and Macintosh.']}, {'end': 1245.618, 'start': 1146.465, 'title': 'Editing shell operations with external editor', 'summary': 'Explores how to edit shell operations with an external editor, demonstrating the use of vim on mac and sublime text on windows, enabling users to edit and update data in the mongodb shell.', 'duration': 99.153, 'highlights': ['Demonstrates how to use Vim on Mac and Sublime Text on Windows for editing shell operations Shows how to set the editor to Vim on Mac and Sublime Text on Windows for editing shell operations, providing platform-specific instructions.', 'Illustrates the process of editing and updating data in the MongoDB shell using an external editor Explains the process of using an external editor to edit and update data in the MongoDB shell, including creating and editing a new document and saving the changes.', 'Teases the upcoming tutorial on inserting, updating, and deleting documents in MongoDB Mentions the next part of the tutorial, which will cover inserting, updating, deleting documents, and invites questions and comments from the audience.']}], 'duration': 249.966, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/-0X8mr6Q8Ew/pics/-0X8mr6Q8Ew995652.jpg', 'highlights': ['Instructions on how to show hidden files on a Macintosh using terminal commands are provided.', 'Creating a function called protectdb to secure the database by preventing it from being droppable or compromised, with the code provided. Link to all the code available in the directory.', 'Customizing the MongoDB prompt to display the database name and operation count, with the option to show the number of executions in the terminal, applicable on both Windows and Macintosh.', 'Demonstrates how to use Vim on Mac and Sublime Text on Windows for editing shell operations Shows how to set the editor to Vim on Mac and Sublime Text on Windows for editing shell operations, providing platform-specific instructions.', 'Illustrates the process of editing and updating data in the MongoDB shell using an external editor Explains the process of using an external editor to edit and update data in the MongoDB shell, including creating and editing a new document and saving the changes.']}], 'highlights': ['The tutorial covers pretty much every command and query you could ever want to know about MongoDB.', 'The chapter provides a guide on how to install MongoDB on both Windows and Macintosh systems.', 'The tutorial includes guidance on using MongoDB with Node.js, showcasing its versatility and compatibility.', 'Instructions for setting up the path for MongoDB on Windows by adding the directory to the environment variables.', "The process of starting the MongoDB server involves typing 'MongoD' and opening a new terminal tab to access the MongoDB shell by typing 'Mongo', which is applicable for both Mac and Windows.", "To set up MongoDB server, create a 'data' directory by typing 'md data' in the command prompt.", 'The chapter explains the process of installing and using MongoDB on Mac and Windows, including creating the data directory, setting up the server, and accessing the MongoDB shell in the terminal, with specific commands and instructions provided for both operating systems.', "JavaScript code can be run directly inside the MongoDB shell, allowing for the creation and execution of functions like 'times two' that can be used to perform calculations, such as multiplying a number by 2.", "The 'Show DBS' command can be used to display all installed databases, providing an overview of the available databases for the user to interact with.", "The 'DB' command displays the current database being used, which remains constant unless specifically changed, offering a convenient way to check and confirm the active database.", 'The chapter demonstrates creating a new database, inserting a MongoDB document, and finding all information inside the database, with practical examples and the result of the insert operation returning 1.', 'It explains updating an existing document by matching and modifying it, with a demonstration showing one match and one modification, providing clarity on the update process.', 'The transcript includes examples of different data types that can be stored in documents, including null, booleans, numbers, and strings, with clear demonstrations of how to store each data type and when to use quotes.', "It showcases the process of removing a document from the database and verifying its removal, demonstrating the deletion process and ensuring the verification of the removed document's absence.", 'The transcript emphasizes the importance of maintaining data integrity and provides practical demonstrations of storing different data types, including null, booleans, numbers, and strings, within MongoDB documents.', 'MongoDB allows storage of various data types in documents, such as strings, arrays, date objects, regular expressions, embedded documents, and object IDs.', "Creating and inserting documents into MongoDB, such as inserting 'test one' document and finding all the information inserted into the database, showcasing practical usage (e.g., test1.insert, finding data)", 'Object IDs, which are unique 12-byte identifiers automatically created for each document, are explained and demonstrated.', "Resolving the 'number of files is 256' soft R limits error specific to Mac users by using the 'ulimit -n 2048' command, providing a quick solution for the error (e.g., Ulimit -n 2048 command to resolve error)", 'Examples are provided, showing how to store arrays, date objects, regular expressions, and embedded documents in MongoDB.', 'Instructions on how to show hidden files on a Macintosh using terminal commands are provided.', 'Creating a function called protectdb to secure the database by preventing it from being droppable or compromised, with the code provided. Link to all the code available in the directory.', 'Customizing the MongoDB prompt to display the database name and operation count, with the option to show the number of executions in the terminal, applicable on both Windows and Macintosh.', 'Demonstrates how to use Vim on Mac and Sublime Text on Windows for editing shell operations Shows how to set the editor to Vim on Mac and Sublime Text on Windows for editing shell operations, providing platform-specific instructions.', 'Illustrates the process of editing and updating data in the MongoDB shell using an external editor Explains the process of using an external editor to edit and update data in the MongoDB shell, including creating and editing a new document and saving the changes.']}