Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASAP Please, and thank you Would prefer JAVA as back end language (REFER TO TASK #1, DO NOT ANSWER TASK #1) (USE TASKS 4-8 as

ASAP Please, and thank you

Would prefer JAVA as back end language (REFER TO TASK #1, DO NOT ANSWER TASK #1) (USE TASKS 4-8 as reference to answer question, DO NOT ANSWER PLEASE)

Build a music recommendation service.

You are given a template database with genres, regions, and bands. See template database below.

CREATE TABLE Sub_Genre ( sgid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, gname CHAR(20) NOT NULL, sgname CHAR(20) NOT NULL );

CREATE TABLE Region ( rid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, rname CHAR(20) NOT NULL ); CREATE TABLE Country ( rid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, rname CHAR(20) NOT NULL, cname CHAR(20) NOT NULL );

CREATE TABLE Bands ( bid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, bname CHAR(20) NOT NULL ); CREATE TABLE Band_Origins ( boid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, bname CHAR(20) NOT NULL, cname CHAR(20) NOT NULL ); CREATE TABLE Band_Styles ( boid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, bname CHAR(20) NOT NULL, sgname CHAR(20) NOT NULL );

task#1 db user called api with limited access of read only of initially given tables in the template, and read/write/update permissions for all additional tables created for this project in the next steps.

task 4: a query to determine which sub_genres come from which regions.

task 5: a query to determine what other bands, not currently in their favorites, are of the same sub_genres as those which are.

task 6: a query to determine what other bands, not currently in their favorites, are of the same genres as those which are.

task 7: a query which finds other users who have the same band in their favorites, and list their other favorite bands.

task 8: a query to list other countries, excluding the users home country, where they could travel to where they could hear the same genres as the bands in their favorites.

Question 1.: Write an application in the back end language of your choice to access the database using the created user in task # 1 with a function to run each query in tasks 4-8 with the user ID passed as a parameter. (would prefer Java as back end language) (REFER TO TASK #1, DO NOT ANSWER TASK #1) (USE TASKS 4-8 as reference to answer question, DO NOT ANSWER PLEASE)

Question 2: Create functions to insert users and insert & delete favorites. Insert at least 3 users and 4 favorites for each user. You may use static data in the program to call these functions programmatically so long as SQL calls are still properly parameterized. Note that a user may only add existing bands to favorites list and function should return an error if they add a band not in the database. (You may add your favorite bands to the template provided, just remember to add matching genre/sub_genre and region/country.)

Question3: Create a User with "Paul Pena" and "The Hu" in their favorites list. Create 2 other Users, each with only one of those in their favorites, (1 each) as well as both users with "Tengger Cavalry", "Sade", and "Battuvshin" in their favorites. Modify query #7 so that Tengger Cavalry will be ranked first in the results order. Hint: consider country, genre, and/or sub_genre.

*Please answer just the questions posted, don't just put any answer that doesn't answer the questions, please and thank you.

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

Step: 3

blur-text-image

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

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions

Question

how to find the number of letrons of a monoatomic ion

Answered: 1 week ago

Question

5. Discuss the key components of behavior modeling training.

Answered: 1 week ago

Question

4. Develop a self-directed learning module.

Answered: 1 week ago

Question

2. Provide recommendations for effective on-the-job training.

Answered: 1 week ago