Question

Table: Artists ArtistID ArtName Elvis Ham Kool Kardash Make up a name heremake up popu Joe Nothingburger ArtPopu 62 200 0 Tab

4a) Create a new table that has one column called GoodID and 2 or 3 other columns with whatever names and data types you want. But set up a Primary Key Constraint on the

GoodID column. Use DESCRIBE to show the column definitions for your table, and paste that in here:

4b) INSERT one row into the table with GoodID equal to 13 and whatever other data (column values) you want.

4c) INSERT another row into the table with GoodID equal to something other than 13, and whatever other data you want. Do Select * and show the resulting output (two rows) here:

4d) Now INSERT one more row into the table with GoodID = 13. What happens? Show the resulting ORACLE error message here:

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:
4a) Table creation:


CREATE TABLE Testing
(
GoodID int NOT NULL,
Description varchar(30),
Quantity varchar(30),
PRIMARY KEY (GoodID)
); /*Used to create the table*/

Describe Table:
Name Null? Type NUMBER (38) VARCHAR2(30) VARCHAR2(30) GOODID NOT NULL DESCRIPTION QUANTITY

4b) Insert data into the table
Insert into Testing values(13,'Black box Testing',2);/*Inserts values into the table*/

4c)Insert into Testing values(14,'White box Testing',4);/*Inserts values to the table*/
Select * from Testing;/*Displays all the values in the table*/
GOODID DESCRIPTION QUANTITY 13 Black box Testing 14 white box Testing 4

4d)Insert into Testing values(13,'End to End Testing',5);
Below error received while trying to insert the above data.

Insert into Testing values (13, End to End Testing,5) ERROR at line 1: ORA-00001: unique constraint (SYSTEM.SYS_C0010214) vi
Let me know in case if you have any doubts. Thanks and All the best.

Add a comment
Know the answer?
Add Answer to:
4a) Create a new table that has one column called GoodID and 2 or 3 other...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • create a handler you can visit to set up your database table. It contains all the...

    create a handler you can visit to set up your database table. It contains all the fields needed to make a simple workout tracker. name - the name of the exercise reps - the number of times the exercise was performed weight - the weight of the weights used date - the date the exercise was performed lbs - a boolean indicating if the measurement is in lbs or kg. 1 indicates lbs, 0 indicates kgs. Requirements You need to...

  • Creating Graphs Create a pie chart for the variable Car Color: Select the column with the...

    Creating Graphs Create a pie chart for the variable Car Color: Select the column with the Car variable, including the title of Car Color. Click on Insert, and then Recommended Charts. It should show a clustered column and click OK. Once the chart is shown, right click on the chart (main area) and select Change Chart Type. Select Pie and OK. Click on the pie slices, right click Add Data Labels, and select Add Data Callouts. Add an appropriate title....

  • Type the following table, which has historical world population data, into sheet 2 in rows 1...

    Type the following table, which has historical world population data, into sheet 2 in rows 1 and 2. Year 1000 1650 1800 1850 1900 1920 1930 World population, in millions 200 545 924 1171 1635 1834 2170 10. Graph the above population data using the same steps as in Exercise 1. Add an exponential trendline, being sure to include the equation and R2 value in the chart. 11. In row 3 calculate the values for population predicted for each of...

  • Please show the steps BoyuQuCh7CaseStudy - Excel File Insert Page Layout Formulas Data Review View Add-ins...

    Please show the steps BoyuQuCh7CaseStudy - Excel File Insert Page Layout Formulas Data Review View Add-ins ACROBAT QuickBooks Tell me what you want to do Sign in Share Σ Autosum Calibri Fill Paste в ㅣ u . re. O . . _ Ξ_ 트트 분 Merge & Center. $. % , 'i..g Conditional Format as Cell Insert Delete Format Sort & Find & Filter Select Formatting Table Styles Clipboard Font Alignment Number Cells Editing E3 Input Area Calculations 2 Facility...

  • on matlab (1) Matrices are entered row-wise. Row commas. Enter 1 2 3 (2) Element A,...

    on matlab (1) Matrices are entered row-wise. Row commas. Enter 1 2 3 (2) Element A, of matrix A is accesser (3) Correcting an entry is easy to (4) Any submatrix of Ais obtained by d row wise. Rows are separated by semicolons and columns are separated by spaces ner A l 23:45 6. B and hit the return/enter kry matrix A is accessed as A Enter and hit the returnerter key an entry is easy through indesine Enter 19...

  • Question 2 If you read in a csv file using read.csv() function into R, what is the resulting datastructure in which R st...

    Question 2 If you read in a csv file using read.csv() function into R, what is the resulting datastructure in which R stores the read-in data? A. numeric B. matrix    C. data.frame    D. vector    Question 3 Suppose you have 4 integers, 4 characters, and 4 logical values. Which datastructure can you use to store all 12 values? Choose one or more options. A. a vector B. a matrix C. a list D. a data frame Question 4 Suppose you have...

  • please use Java!! We are storing the inventory for our fruit stand in a hash table....

    please use Java!! We are storing the inventory for our fruit stand in a hash table. The attached file shows all the possible key/fruit combinations that can be inserted into your hash table. These are the real price lookup values for the corresponding fruit. Problem Description In this programming assignment, you will implement a hash table class fruitHash. Your hash table must include the following methods: 1) hashFunction(key) This method takes a key as an argument and returns the address...

  • Artists Unlimited Company has provided the stockholders' equity section of the balance sheet as of December...

    Artists Unlimited Company has provided the stockholders' equity section of the balance sheet as of December 31. The Controller has asked you to calculate different distribution options to stockholders for management to consider. Use the information included in the Excel Simulation and the Excel functions described below to complete the task. • Cell Reference: Allows you to refer to data from another cell in the worksheet. From the Excel Simulation below, if in a blank cell, =B9" was entered the...

  • Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an...

    Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...

  • Mountain Ski Sports, a chain of ski-equipment shops in Colorado, purchases skis from a manufacturer each...

    Mountain Ski Sports, a chain of ski-equipment shops in Colorado, purchases skis from a manufacturer each summer for the coming winter season. The most popular intermediate model costs $150 and sells for $275. Any skis left over at the end of the winter are sold at the store's spring sale (for $100). Sales over the years are quite stable. Gathering data from all its stores, Mountain Ski Sports developed the following probability distribution for demand: Demand Probability 150 0.05 175...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT