Chat with us, powered by LiveChat Database Science | WriteDemy

Question Description

Page 1 of 3

CMPSC 321 Relational Database Theory and Design Lab 6: Forms and reports
Task 0: Install pymysql: A connector to the MySQL server 1. If you are using your own computer, you will have to install the connector as follows: 2. Make sure you have Python 3.7.1 on your PC or Mac. IF you do not have it, install this version for your laptop from https://www.python.org/downloads/release/python-37… 3. Once you have Python 3.7.1 installed: If you have a Mac, open a Terminal For Windows, open a Command Prompt 4. Type: pip install pymysql 5. Open the file Lab6_Task_1.py with a text editor (Notepad++, Sublime, Python’s IDLE) and hard-code your username and password: Just replace the strings for “user” and “passwd” with your userid and password. 6. Run it. (Use Python’s IDLE) Task 1: Forms 1. Run the Lab6_Examples.py program on Canvas. 2. Modify the program so that it asks the user for a client name and uses that in the query instead of always using "SkyJet". 3. Run the program. Test to make sure you can get the ID of any client. 4. What happens if you enter a nonexistent manager ID? 5. In this case the result of fetchone is None. Modify the code so that the program displays a message like “There is no client matching that name.” 6. Show the result to the instructor. 7. Try a new result that asks the user for a manager ID and displays the first and last name of that manager. When you get that working, move on to the next task Task 2: Reports 8. We will create a report that displays information about a manager. 9. Modify the code from the end of Task 1 so that the manager’s salary is also displayed. 10. Modify the code so that the bonus is displayed next to the salary, if there is a bonus. If bonus is null, just display the salary. Hint: you can test if the item is not None to test if mbonus is not NULL. 11. Modify the code so that all the manager’s phone numbers are also displayed. This will require changing the SQL in the query, or executing a second query. You will also need a loop to print the rest of the phone numbers. 12. The output should look like this:
Please enter a manager ID: M23 Manager: Austin Lee Salary: 50000.0+5000.0 Phone numbers: 555-9988

Please enter a manager ID: M12 Manager: Boris Grant Salary: 60000.0 Phone numbers: 555-2

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order