ITSE2309 – Database Programming: Oracle Lab 3 – Table Creation And Management Solved

35.00 $

Description

5/5 - (2 votes)
  1. Create a new table containing the category code and description for the categories of books sold by JustLee Books. The table should be called CATEGORY, and the columns should be CatCode and CatDesc. The CatCode column should store a maximum of 2 characters, and the CatDesc column should store a maximum of 10 characters.

 

  1. Create a new table containing these four columns: Emp#, Lastname, Firstname, and Job_class. The table name should be EMPLOYEES. The Job_class column should be able to store character strings up to a maximum length of four, but the column values shouldn’t be padded if the value has less than four characters. The Emp# column contains a numeric ID and should allow a five-digit number. Use column sizes you consider suitable for the Firstname and Lastname columns.

 

  1. Add two columns to the EMPLOYEES table. One column, named EmpDate, contains the date of employment for each employee, and its default value should be the system date. The second column, named EndDate, contains employees’ date of termination.

 

  1. Modify the Job_class column of the EMPLOYEES table so that it allows storing a maximum width of two characters.

 

  1. Delete the EndDate column from the EMPLOYEES table.

 

  1. Rename the EMPLOYEES table as JL_EMPS.

 

  1. Create a new table containing these four columns from the existing BOOKS table: ISBN, Cost, Retail, and Category. The name of the ISBN column should be ID, and the other columns should keep their original names. Name the new table BOOK_PRICING.

 

  1. Mark the Category column of the BOOK_PRICING table as unused. Verify that the column is no longer available.

 

  1. Truncate the BOOK_PRICING table, and then verify that the table still exists but no longer contains any data.

 

  1. Delete the BOOK_PRICING table permanently so that it isn’t moved to the recycle bin. Delete the JL_EMPS table so that it can be restored. Restore the JL_EMPS table and verify that it’s available again.

 

 

Upload only the SQL Statements to Blackboard.

ITSE 2309 – Database Programming: Oracle Lab 3 – Table Creation And Management

 

 

  1. Create a new table containing the category code and description for the categories of books sold by JustLee Books. The table should be called CATEGORY, and the columns should be CatCode and CatDesc. The CatCode column should store a maximum of 2 characters, and the CatDesc column should store a maximum of 10 characters.

 

  1. Create a new table containing these four columns: Emp#, Lastname, Firstname, and Job_class. The table name should be EMPLOYEES. The Job_class column should be able to store character strings up to a maximum length of four, but the column values shouldn’t be padded if the value has less than four characters. The Emp# column contains a numeric ID and should allow a five-digit number. Use column sizes you consider suitable for the Firstname and Lastname columns.

 

  1. Add two columns to the EMPLOYEES table. One column, named EmpDate, contains the date of employment for each employee, and its default value should be the system date. The second column, named EndDate, contains employees’ date of termination.

 

  1. Modify the Job_class column of the EMPLOYEES table so that it allows storing a maximum width of two characters.

 

  1. Delete the EndDate column from the EMPLOYEES table.

 

  1. Rename the EMPLOYEES table as JL_EMPS.

 

  1. Create a new table containing these four columns from the existing BOOKS table: ISBN, Cost, Retail, and Category. The name of the ISBN column should be ID, and the other columns should keep their original names. Name the new table BOOK_PRICING.

 

  1. Mark the Category column of the BOOK_PRICING table as unused. Verify that the column is no longer available.

 

  1. Truncate the BOOK_PRICING table, and then verify that the table still exists but no longer contains any data.

 

  1. Delete the BOOK_PRICING table permanently so that it isn’t moved to the recycle bin. Delete the JL_EMPS table so that it can be restored. Restore the JL_EMPS table and verify that it’s available again.

 

 

Upload only the SQL Statements to Blackboard.

 

  • Lab3-8ijwb8.zip