Database [3i Infotech Placement]: Sample Questions 195 - 196 of 294

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 195

Database
Edit

Describe in Detail

Essay▾

What command is used to create a table by copying the structure of another table?

Explanation

Define Create Table as Select
  • CREATE TABLE … . AS SELECT command creates a table by copying the structure of another table.
  • If WHERE clause of the SELECT command contains a FALSE statement- the statement only copies structure:

    CREATE TABLE NEWTABLE AS SELECT ⚹ FROM EXISTING TABLE WHERE 1 = 2;

  • The where condition is true, then all the rows satisfying the condition will be copied to the new table.
  • SQL SELECT statement retrieves data from a table in the database.
  • Query may retrieve information from specified columns or from all rows in the table.

Question 196

Database
Edit

Describe in Detail

Essay▾

What is Oracle Block? Can two Oracle Blocks have the same address?

Explanation

Given Oracle Data Block and Operating System Blocks
  • Oracle “formats” the database files into a number of Oracle blocks when they are first created making it easier for the RDBMS software to manage the files and easier to read data into the memory areas
  • The block size should be a multiple of the operating system block size.
  • Regardless of the block size, the entire block is not available for holding data; Oracle takes up some space to manage the contents of the block.
  • This block header has a minimum size, but it can grow.
  • These Oracle blocks are the smallest unit of storage.
  • Increasing the Oracle block size can improve performance, but it should be done only when the database is first created.
  • Two blocks can have the same block address if they are in different database files.

Developed by: