Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help in the last quetion for my Oracle homework: Make a type named xtraba

ID: 3867326 • Letter: I

Question

I need help in the last quetion for my Oracle homework:

Make a type named
xtrabases which will enable one to fine 3 things: the number
of doubles a retired player hit in his career, and the number
of triples, and the number of home runs.
Also make a variable sized array to hold the teams a player
has played for, e.g. St Louis Browns and Washington Senators

Create a table called stats with 4 fields: first name, last name,
xtrabases, and your array
Insert 5 rows, with accurate data for players in the baseball hall
of fame. Choose your players 'at random'. No two students should
come close to having the same set of players.
I'm going with: (Babe Ruth, Ty Cobb, Walter Johnson, Honus Wagner, Christy Mathewson)

Since home runs are the glamour statistic, write a memberi function
called dingers to output the number of career home runs.

Explanation / Answer

Following is the query for creating a table using oracle database and it is created based on the given requirement

CREATE TABLE stats(firstname varchar2(20), lastname varchar2(20), xtrabases number(20), array varchar2(20));

the data is inserted in to the table based on the given requirement and 5 values are inserted in to the oracle database
5 rows are inserted

INSERT INTO stats
VALUES('Babe','Ruth'21,1);
INSERT INTO stats
VALUES('Ty','cobb'22,2);
INSERT INTO stats
VALUES('walter','johnson'23,3);
INSERT INTO stats
VALUES('honus','wagner'24,4);
INSERT INTO stats
VALUES('christy','mathewson'25,5)
;

Hope This Helps

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote