Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with Java. I need to use MySQL to create a table for step 1 and use Java to acomplish the operations and steps

Need help with Java. I need to use MySQL to create a table for step 1 and use Java to acomplish the operations and steps 2-8.

image text in transcribed

image text in transcribed //Provided to create mma database: product-- create and select the database DROP DATABASE IF EXISTS mma; CREATE DATABASE mma; USE mma;

-- create the Product table CREATE TABLE Product ( ProductID INT PRIMARY KEY AUTO_INCREMENT, Code VARCHAR(10) NOT NULL UNIQUE, Description VARCHAR(255) NOT NULL, ListPrice DECIMAL(10,2) NOT NULL );

-- insert some rows into the Product table INSERT INTO Product VALUES (1, 'java', 'Murach''s Java Programming', '57.50'), (2, 'jsp', 'Murach''s Java Servlets and JSP', '57.50'), (3, 'mysql', 'Murach''s MySQL', '54.50'), (4, 'android', 'Murach''s Android Programming', '57.50'), (5, 'html5', 'Murach''s HTML5 and CSS3', '54.50'), (6, 'oracle', 'Murach''s Oracle and PL/SQL', '54.50'), (7, 'javascript', 'Murach''s JavaScript and jQuery', '54.50');

-- create a user and grant privileges to that user GRANT SELECT, INSERT, DELETE, UPDATE ON mma.* TO mma_user@localhost IDENTIFIED BY 'sesame';

Console Welcome to the Customer Manager COMMAND MENU list add del help -Show thi menu exit - Exit this application - List all customers -Add a customer -Delete customer Enter command : list CUSTOMER LIST frankjonesyahoo.coa johnsmithhotil.com seagreenlevi.com wendykwarners.com Frank John Cynthia Jones Smith Green Enter a command add Enter customer email address: testatest.com Enter tirst name: Mick Enter last name: Stipe ick Stipe was added to the database Enter a command 1ist CUSTOMER LIST frankjonesyahoo.coa johnsmithhotmail.cam seagreenlevi.com testtest.com wendykwarners.com Frank John Cynthia Mick Wendy Smith Green Stipe Enter a command: del Enter email for customer to delete: testetest.com Hick Stipe was deleted from the database Enter a command 1ist CUSTOMER LIST frankjonesyahoo.coa johnsmithhotmail.cam seagreenlevi.com wendykwarners.com Frank John Cynthia Smith Green Enter command : exit Bye

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

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago