7-1 Final CS340.docx - Brian Harley SNHU CS-340 7-1 Final...

This preview shows page 1 - 5 out of 14 pages.

Brian Harley SNHU: CS-340 7-1 Final Project Submission: RESTful API and User Documentation October 19, 2020
Part One: Collection Management. Question 1. Creating a database. A tool for constructing a database from a json file is provided to the MongoDB database. Too outside of the MongoDB shell, we have the name of the database, the name of the set and the json file path. The new directory would create a database. Sample Command for Creating Database When using this command it will create a market database with a loaded collection stocks with documents from the json file. Screenshot Importing Database
Mongo import has successfully imported, built and loaded a database with stock data in the above image. Checking Our Database In the mongo shell we enter show dbs to get the list of all the tables belight and pick the market database using the market details. This is achieved by testing whether our database has been developed. Upon choosing the database, we can use queries to receive information. To display the collection, we type show collections, All the collections in the selected database will be listed as shown in the image. Checking Available Documents . We may use basic query below to search whether mongo imports inserted material from json file.
Question 2. Creating and Using Indexes. Indexes are database methods for fast query execution. Both records can be searched while the database scans for a record, which fits the criteria of the given specification, in a clear manner when an index is used. In the context of the retrieval phase the database may use indexes

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture