Preparing the MongoDB database for the data
We prepare the database as follows:
- Start the database server and give it the path to where we want to store our data.
- Starting the mongo shell.
- Creating the database.
- Creating a collection called events and inserting a dummy record into it.
- Create an index on fields "Time","SourceUser", "SourceComputer", "TargetComputer". We create those indexes to make conditional and range querying very efficient because we will perform many of those.