This is the thirdin the series of assignments for building movie database website. In the first of these assignments, you built an interface mock-up of the site. For the second one, youusedJavaScript to implement the form validation and to support other types of interaction. In this assignment, you will design and implement the database in MySQL (Assignment #4). In the subsequent assignments, you willimplement the back-end programming in PHP (Assignment #5), and implement AJAX-based updating (Assignment #6). Because theassignments build upon each other, you may wish to make modifications to your previous assignment submission before starting this assignment. A critical element of many Web-based applications is the ability to store and query data. As a result, it is necessary to design an appropriate database for storing the data, construct the database in MySQL, and write the queries to store and retrieve the data.This assignment is divided into three different components:1.ERD and database specificationYour task here is to create an appropriate Entity Relationship Diagram (ERD) for thedata associatedwith your movie database system. This ERD must document the data modelfor the entire system, andshould conform to the second normal form (2nf)specification for the data model.Your ERD diagram should also show relationships between entities.Based on this ERD, provide the SQL statements that build the table structure for yourdatabase.Note: You should think carefully what entities and attributesthe Movie Database system will contain.Read through the previous assignment and the next twosections of this assignmentso that you fully understand what data is to be stored andretrieved. This will help you to make important design decisions for the database.Note: There should be no many-to-many relationshipin your ERD. If there is one, add a new table and break the relationship into one-to-many and many-to-one relationships.2.Data Storage Queries
CS 215 (Fall2020): Assignment #42There are a number offorms in this web application that will require that data be stored in the database. Your task here is to write sample queries to verify that the data storage is working correctly.a.Login / logout status•Save the fact that the userhas logged in•Save the fact that the user has logged outb.Login page•Signup form collects details about the user. Insert them in the database. You can assume the URL for the avatar is known at the point of executing this query.c.Movie details page•Save the user’s ratingfor a movie. (rating and date-time rated)•Save the fact the user viewedthe movie. (time viewed) Note: Viewed a movie means the user saw the movie’sdetailpage, not watching the movie. d.Watchlist page•When a new watchlistis created, you need to save the watchlist’sname in the database.Write a query to save the watchlist’s name and date-time created in the database.e.Watchlist details page•Save a movie as an entryto a watchlist(movie and date-time added).3.Data Retrieval QueriesThere are a number of pages in this web application that require that data be extracted from the database. Your task here is to write sample queries to verify that the data is being extracted correctly.Note that some queries require you perform a join operation