Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Executing SQL statements from an application program

This gives you an opportunity to practice writing code that connects to a MySQL database and executes queries from a command line application program driven by input from a user. We prefer you code this  assignment in one of the supported host languages but will accept application code written in any of the languages approved for the project.

Coding connectivity to a MySQL database is an important initial step in programming your project. The host languages that can be used for this assignment are: R, java and python.

Submission Details :

1. Application code

2.   Dump your database for the assignment using the course naming protocol.

3. A txt file describing the installation process for building your application, as well as the necessary steps to run your application e.g for python (`python application_name.py`).

4. When submitting the assignment, add a note to the submission stating the programming language used to code the assignment.

Evaluation Criteria :

1) Prompt the user for the MySQL username and password.

2) Use the user provided username and password values to connect to the Music database you modified in homework seven.

3)   Prompt the user to enter a particular music genre. Store the result in a host language variable.

4)   Have your application code do data validation on the input provided by the user. We expect your data validation will be driven by the music genre values stored in the genre  table in the database. You should retrieve the list of genres  and display the list to the user before prompting the user for a genre in

order to simplify the data entry process. You should verify that the user entered data is on the retrieved list of genres.

5)   Generate an error message to standard output and re-prompt the user for input, if the user provides invalid input.

6)   Use the genre  as an argument to the song_has_genre(genre_p) . Call the procedure. 7)     Print the result set of song_has_genre()  to standard output.

8)  Once the records are written to standard output, close the connection to the database and end the application program.

9)  README text file provided for running the application as well as canvas note provided identifying the host language.

10)  Database dump provided.