Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the sakila databse. Answer in c + + . This program will modify the program you created for M 0 5 Programming Assignment 2

Using the sakila databse. Answer in c++. This program will modify the program you created for M05 Programming Assignment 2. Take the program and add a menu option for adding a rental. This should call a function that sets up to run a transaction that will insert everything needed for the rental. You should start by asking which customer the rental is for by using a printed menu. The menu should allow the user to choose from a list of customers, displayed as id - first_name last_name. Next, you will need to find out which movie is being rented, and which staff member is entering the rental. You should again use printed menus to gather this information. Once the user has entered all the information, you will need to insert the rental record and payment record using a transaction sent to the database. Sample Output
Welcome to Sakila
Please choose an option (enter -1 to quit):
1. View the rentals for a customer
2. View Customer Information
3. Enter a Rental
Please choose the customer for the rental (enter 0 to go to the next page):
1.1- MARY SMITH
2.2- PATRICIA JOHNSON
Please choose the film you want to rent (enter 0 to go to the next page):
1.1- ACADEMY DINOSAUR
2.1- ACADEMY DINOSAUR
Please choose the staff member logging the transaction:
1.1- Mike Hillyer
2.2- Jon Stephens
Rental and Payment entered successfully. Rental Id: Payment Id:

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago