Tag: databases

Questions Related to databases

  1. Same value of Primary Key can appear in more than one row in the table

  2. A Primary key defined column can be of type LONG

  3. A column that is defined as Primary Key cannot contain NULL value.

  4. Both A. and B.


Correct Option: C
  1. Using a view to access the table

  2. Using a referential constraint on the table

  3. Revoking access from the phone_number column

  4. Defining a table check constraint on the table


Correct Option: A

Target table T1 is getting deleted. Table T2 has the foreign key. We require that whenever a row from T1 is deleted, the corresponding row from T2 also be deleted. Which option can be used?

  1. ON DELETE RESTRICT

  2. ON DELETE CASCADE

  3. ON DELETE SET NULL

  4. ON DELETE CHILD

  5. ON DELETE MATCH


Correct Option: B
  1. forces cursor to close after commit

  2. Keeps cursor open after commit

  3. Does not allow cursor to close till all rows are fetched

  4. Locks the cursor

  5. None of the above


Correct Option: B
  1. EQUI-JOIN

  2. NON EQUI-JOIN

  3. Both A. and B.

  4. None of the Above


Correct Option: C
  1. Clusters

  2. Synonym

  3. Views

  4. Sequences


Correct Option: D
Explanation:

To solve this question, the user needs to have a basic understanding of databases and the different methods used to assign unique numbers to columns in a database.

Now, let's go through each option and explain why it is right or wrong:

A. Clusters: Clusters are used to group related data together in a database. They are not used to assign unique numbers to columns in a database. Therefore, this option is incorrect.

B. Synonym: Synonyms are used to provide an alternative name for a table or view in a database. They are not used to assign unique numbers to columns in a database. Therefore, this option is incorrect.

C. Views: Views are virtual tables that are created by combining data from one or more tables in a database. They are not used to assign unique numbers to columns in a database. Therefore, this option is incorrect.

D. Sequences: Sequences are used to generate unique numbers for a column in a database. They are often used to assign primary keys to tables in a database. Therefore, this option is correct.

The Answer is: D