logo

Web Application And MongoDB Analysis Report

16 Pages1108 Words23 Views
   

Added on  2022-09-01

Web Application And MongoDB Analysis Report

   Added on 2022-09-01

ShareRelated Documents
Web Application Report
Student’s name
Institution Affiliation(s)
Web Application And MongoDB Analysis Report_1
Table of Contents
5.2 Database Design.................................................................................................. 2
6.2 Backend API.......................................................................................................... 3
6.2.1 Login module.................................................................................................. 3
6.2.2 Student........................................................................................................... 4
6.2.2.1 API for viewing approved topics...............................................................6
6.2.2.2 API for selecting preferences....................................................................7
6.2.2.3 API for showing allocated topics and groups............................................9
6.2.3 Admin........................................................................................................... 10
6.2.3.1 API for adding topics..............................................................................10
6.2.3.2 API for publishing approved users..........................................................13
6.2.3.3 API for viewing preferences....................................................................14
6.2.3.4 API for viewing Allocations.....................................................................14
6.2.3.5 API for publishing allocations.................................................................14
6.2.4 Supervisor.................................................................................................... 14
References............................................................................................................... 15
1
Web Application And MongoDB Analysis Report_2
5.2 Database Design
The above code snippet is the code that was used to connect the JavaScript web application to
the mongo database. The try and catch block has been included where the try statement allows
the program to test a block of code for errors and the catch statement lets the program handle the
error. Everything done on mongoose database is based on a schema where each schema is
mapped to a mongoDB collection that is responsible for defining and shaping the documents
within that collection.
For this web application the try and catch block will try the code for errors and return ‘error’
while the catch block will handle the error and if successful the database will be connected to the
application. When the user logs out of the system, the status will change to ‘disconnected’.
Mongodb was used as the preferred database. MongoDB can be explained as a database program
that is both document-based and can be used in various platforms.
2
Web Application And MongoDB Analysis Report_3
MongoBd features such as ACID properties that allow for multi-document transactions,
MapReduce properties for JavaScript execution, sharding which allows MongoDB to scale
horizontally and replication are some of the main reasons why I choose to use MongoDB.
MongoDB is a NoSQL type of database.
NoSQL
6.2 Backend API
6.2.1 Login module
The login module recalls the user details for the already existing users from the database. Users
will be required to type in their email and their password after which the try and catch block will
3
Web Application And MongoDB Analysis Report_4

End of preview

Want to access all the pages? Upload your documents or become a member.