COP4521 Homework 6 Name: FSU login: 1 (10 points). A company wants to maintain the commissions for each employee when the employee sells a product. An employee has two attributes, employee ID (Eid) and name (Name). A product has two attributes, product ID (Pid) and maker (Maker). Draw the ER diagram to model the data for this task. 2. (10 points). Many real world relations are multiway. For example, in Question 1, the sells relation can have three parties: an employee sells a product to a customer (attributes: customer ID (Cid) and name (Name)). How does the ER model handle such cases? Update the ER diagram in Question 1 for this three-way relation. 3. (20 points) Write Python SQLite3 code to create three tables: Employee (Eid, Name) where Eid is the key, product (Pid, Name) where Pid is the key, and sells (Eid, Pid). Initialize each table with one entry. You can assume any appropriate data types for the attributes. 4. (20 points) Write Python SQLite3 code to query the database in Question 3 to find the names of all products sold by David. The code must also display the result of the query. 5. (20 points) Write the Python Flask code for the static web page http://127.0.0.1:50001/ and dynamic web-pages http://127.0.0.1:50001/user/{username} where username can be any string. The http://127.0.0.1:50001/ page displays "Welcome" while http://127.0.0.1:50001/user/{username} displays f"Hello {username}!". 6. (20 points) Let tableVar be a variable in python. For example, tableVar = [[1, 2, 3], ["one", "two", "three"]] Write the python Flask code (the combine of Python code and html template) to display the content of tableVar in an html table format in page http://127.0.0.1:50001/content.