Description of this paper

Loading

Problem: (a) Write SQL statements to create the following tables-(Answered)

Description

Instant Solution ? Click "Buy button" to Download the solution File


Question

Problem:

(a) Write SQL statements to create the following tables as user SCOTT for an order entry system that you are implementing. The tables and the columns are shown below:

Use tablespace USER5.



(b) How do you find out which files and blocks contain the rows for the orders table? [Hint: use DBA_EXTENTS view]

(c) You are now considering creating indexes on the NAME and REGION columns of the CUSTOMERS table. Suppose there are many distinct values for column NAME, but only a few distinct values for column REGION. What types of index are appropriate for the two columns? Write SQL to create the indexes, naming them CUST_ NAME_IDX and CUST_REGION_IDX, respectively, and placing them in tablespace indx05.



(d) Write a command to move the CUST_REGION_IDX index to another tablespace indx06.

(e) Write a SQL statement to find out the files and blocks used by the extents by CUST_REGION_IDX.


Homework #2

 

Student Number

 

Family Name

 

First Name

 

Section

 


 

ITU SWE 562 DBA

 

To: Prof D. Liang

 


 

Problem:

 

(a) Write SQL statements to create the following tables as user SCOTT for an order entry

 

system that you are implementing. The tables and the columns are shown below:

 


 

Use tablespace USER5.

 


 

(b) How do you find out which files and blocks contain the rows for the orders table?

 

[Hint: use DBA_EXTENTS view]

 


 

(c) You are now considering creating indexes on the NAME and REGION columns of

 

the CUSTOMERS table. Suppose there are many distinct values for column NAME, but

 

only a few distinct values for column REGION. What types of index are appropriate for

 

the two columns? Write SQL to create the indexes, naming them CUST_NAME_IDX

 

and CUST_REGION_IDX, respectively, and placing them in tablespace indx05.

 


 

(d) Write a command to move the CUST_REGION_IDX index to another tablespace

 

indx06.

 


 

(e) Write a SQL statement to find out the files and blocks used by the extents by

 

CUST_REGION_IDX.

 


 

 

Paper#9209861 | Written in 27-Jul-2016

Price : $19
SiteLock