Write MyOwnJDBCProgram.

java using JDBC APIs reflecting the following SQL script as following: • •

Create CD and LOCATION tables Insert rows to CD and LOCATION tables Display rows of CD and LOCATION tables under column names like Figure presented below.

create table "LOCATION" ( "LOCATION_ID" INTEGER NOT NULL PRIMARY KEY, "LOCATION" VARCHAR(40) ); create table "CD" ( "CD_ID" INTEGER NOT NULL PRIMARY KEY, "TITLE" VARCHAR(40), "AUTHOR" VARCHAR(40), "YEAR_CREATED" INTEGER, "LOCATION" INTEGER, "RATING" INTEGER, CONSTRAINT FK_CD_LOCATION FOREIGN KEY (LOCATION) REFERENCES LOCATION(LOCATION_ID) ); INSERT INTO LOCATION VALUES (0,'Cha Cha Cha bar'); INSERT INTO LOCATION VALUES (1,'Limon Restaurant'); INSERT INTO LOCATION VALUES (2,'Taqueria el Balazo'); INSERT INTO LOCATION VALUES (3,'Office'); INSERT INTO LOCATION VALUES (4,'Home'); INSERT INTO CD VALUES ( 0, 'Rock and Roll Aint Noise Pollution', 'AC/DC', INSERT INTO CD VALUES ( 1, 'Shake a Leg', 'AC/DC', 1980, INSERT INTO CD VALUES ( 2, 'Have a Drink on Me', 'AC/DC', 2, 6); 2, 5); 1980, 1, 8);

1980,

0,

9);

1980,

INSERT INTO CD VALUES ( 3, 'You Shook Me All Night Long', 'AC/DC', INSERT INTO CD VALUES (

4,

'Back in Black', 'AC/DC',

1980,

4,

9); 1980, 4, 9);

INSERT INTO CD VALUES ( 5, 'Let Me Put My Love into You',

'AC/DC',

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.