Question: 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

 iv. To remove any inserted data and destroy all created tables

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!