Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As a newly hired software engineer for a financial services startup, you are tasked with creating a reporting service for basic stock market securities information.

As a newly hired software engineer for a financial services startup, you are tasked with creating a reporting service for basic stock market securities information. This reporting service will be used by other software engineers in the company for creating interactive web reports and dashboards. Knowing that your service needs to be easily accessible, you have chosen to use the RESTful application programming interface (API) web-based protocol. Also knowing that your startup will more than likely focus in the future on various types of securities other than company stock, you decide to use MongoDB, a NoSQL document-storage system. MongoDB is supported by many languages, including Java and Python, via driver APIs. And since the RESTful API is already a part of many web application server frameworks using either Java or Python, you will only need to code and test the uniform resource identifier (URI) paths for the following functionality: 1 Enable CRUD (create, read, update, and delete) operations specialized for stock market securities information. Select and present specific stock summary information info by a user-derived list of ticker symbols. Report a portfolio of five top stocks by a user-derived industry selection. Report a portfolio of possible stock investments for a selected company by similar industries. To verify and test your RESTful web service, you will use a simple command line tool, such as curl, with a set of example URIs. Although the startup is a fast- moving organization, documentation is still a critical element for communication. Therefore, along with your RESTful API, you will provide user documentation in the form of explanations and screenshots. Specifically, the following critical elements must be addressed: I. Collection Management: In this section, you will create a database and create single or compound indexes. The database data set collections are preloaded in your final project tool. A. Utilize the mongoimport tool to create a database named market and a collection named stocks, loaded with documents from the stocks.json file. Provide screenshots of the statements and the results of their execution. B. Assess the need for indexing as you formulate queries and, using the MongoDB shell, create any needed single or compound indexes. Provide screenshots of the statements and the results of their execution. C. For all of your screenshots, explain in detail each part of the associated MongoDB statements and their results to internal stakeholders. Be sure your explanations are logically organized and clearly communicated to meet the needs of the internal stakeholders. II. Document Manipulation: In this section, you will add, update, and delete documents, making changes to the collection you created in the previous section. Provide source code in a text file for the functions you will create below. A. Insert new key-value pairs into documents using appropriate MongoDB statements. Specifically, create a function or method in Python or Java that will read from a file or standard input stream a value pair stream in JSON notation and insert this document into the stocks collection. You will also need to create a simple application scaffold for testing your function or method. Provide screenshots of the results of their execution. B. Update existing documents using appropriate MongoDB statements. Specifically, create a function or method in Python or Java that will update the document Volume key-value pair identified by the string input stock ticker symbol Ticker and numerical input Volume value of your choice greater than zero. The function or method will update the document Volume key-value pair identified by the given ticker symbol and a new Volume value of your choice greater than zero. You will also need to create a simple main application to call your function. Provide screenshots of the results of their execution. C. Delete existing documents using appropriate MongoDB statements. Specifically, create a function or method in Python or Java that will take as input a stock ticker symbol Ticker. The function or method will remove the document identified by the given ticker symbol. For example, use the ticker symbol BRLI. You will also need to create a simple application scaffold for testing your function or method. Provide screenshots of the results of their execution. 2 D. For all your screenshots, provide explanations of each part of the associated MongoDB statements and their results. Be sure your explanations are logically organized and clearly communicated to meet the needs of the internal stakeholders. III. Document Retrieval: In this section, you will create code to query the collection to retrieve information about the application. Provide source code in a text file for the functions you will create below. A. Retrieve documents from collections by using the appropriate find statement arguments. i. Specifically, create a function or method in Python or Java that will take as inputs numerical values for low and high. The function or method will find documents for which the 50-Day Simple Moving Average is between the low and high values and return the count of the number of documents found. You will also need to create a simple main application to call your function. Provide screenshots of the results of their execution. ii. Additionally, create a function or method in Python or Java that will take as input a string. The function or method will find documents for which the input string matches the document key Industry and returns the list of ticker symbols found to match that industry. For example, use the industry string Medical Laboratories & Research. Again, you will also need to create a simple main application to call your function. Provide screenshots of the results of their execution. B. Write MongoDB aggregation pipeline statements that transform documents into aggregated results using multiple pipeline stages as appropriate. Specifically create a function or method in Python or Java that will take as input a string. The function or method will find documents for which the input string matches the document key Sector and returns the total outstanding shares grouped by document key Industry. Examples of sector string inputs are Healthcare, Basic Materials, and so on. You will also need to create a simple main application to call your function. Provide screenshots of the results of their execution. C. For all of your screenshots, provide explanations of each part of the associated MongoDB statements and their results. Be sure your explanations are logically organized and clearly communicated to meet the needs of the internal stakeholders. IV. AdvancedProgrammingProject:Inthissection,youwilldevelopawebserviceapplicationtoimplementaRESTfulapplicationprogramminginterface (API) for a MongoDB database. Provide source code in a text file (either .java or .py) for your complete web service application that encompasses all of the functionality below. A. Develop a RESTful API using a Python or Java web services framework for a MongoDB collection of stock market summary data, ensuring your code is functional, reusable, concise, and commented. B. Enable specific CRUD functionality in a developed RESTful API framework. Use the example URIs linked in the prompt to test and validate your framework. Provide screenshots of the code and its execution, ensuring your code is functional, reusable, concise, and commented. C. In your RESTful API, enable the following functionality (advanced querying), ensuring your code is functional, reusable, concise, and commented: i. Select and present specific stock summary information by a user-derived list of ticker symbols. Provide screenshots of the code and its execution. ii. Report a portfolio of five top stocks by a user-derived industry selection. Provide screenshots of the code and its execution.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

2. Do the easy questions first.

Answered: 1 week ago

Question

7-16 Compare Web 2.0 and Web 3.0.

Answered: 1 week ago