Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

iv. To remove any inserted data and destroy all created tables in the farmer database, write appropriate SQL DML and DDL statements in a text

image text in transcribed
iv. To remove any inserted data and destroy all created tables in the farmer database, write appropriate SQL DML and DDL statements in a text file called userid_farmerdroptable.sql to first delete all data in the tables and then drop the tables. (2.5 marks) V. Using Oracle Sqlplus, implement this database design by creating all the tables with the integrity constraints using the SQL DDL you defined in (ii) above. You can create all these SQL DDL for creating the 4 tables by running your .sql file at the SQL prompt with the command: @userid_farmerschema.sql. After creating your tables successfully, you load your data with the .sql file you created in (iii) above by running @userid_farmerdata.sql. If there are errors and you need to correct them, you might want to delete the tuples and drop the tables first using the .sql file you created in (iv) above as with @userid_farmerdroptable.sql before re-creating the schema and re-loading the data. Then, using a script file, show the contents of all 4 tables in the database by running: select *from each of the tables and saving on script file called username_assn3que1.txt. You can do this using the following sequence of Unix/Linux commands after you have created the database and inserted data.

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

Numerical Analysis

Authors: Richard L. Burden, J. Douglas Faires

9th edition

538733519, 978-1133169338, 1133169333, 978-0538733519

More Books

Students also viewed these Mathematics questions