0

databases Online Quiz - 120

Description: databases Online Quiz - 120
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

A table called EMPLOYEE has the following columns: name, department, and phone_number. Which of the following can limit read access to the phone_number column?

  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

DB2 WITH HOLD option What does WITH HOLD option do ?

  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

The tables can be combined together in SQL using the concept of

  1. Normalization

  2. Indexing

  3. Sequence

  4. Join


Correct Option: D

If the value is null in order to place a value in it the function used is

  1. Substitute( )

  2. Place value ( )

  3. NVL ( )

  4. Place( )


Correct Option: C

Which of the following joins is possible in SQL

  1. EQUI-JOIN

  2. NON EQUI-JOIN

  3. Both A. and B.

  4. None of the Above


Correct Option: C

Unique numbers can be assigned to columns in a database using

  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

A table T1 having 100 rows is joined with a table T2 with 50 rows without specifying the joined column in the where clause then result will have

  1. 100 rows

  2. 50 rows

  3. 150 rows

  4. 5000 rows


Correct Option: D

Which of the following is FALSE about a ALTER TABLE command of SQL?

  1. ALTER TABLE command is used to create a table

  2. ALTER TABLE command is used to change the column elements in a table

  3. ALTER TABLE command is used to delete a table

  4. Both A. and C.


Correct Option: D

Which one of the following does not help to maintain referential integrity?

  1. Unique constraints

  2. Primary keys

  3. Cascading actions

  4. Foreign keys


Correct Option: A

AI Explanation

To answer this question, we need to understand the concept of referential integrity.

Referential integrity is a database constraint that ensures the relationships between tables are maintained correctly. It ensures that foreign key values in a table match primary key values in another table, or are null.

Let's go through each option to understand why it does or does not help to maintain referential integrity:

Option A) Unique constraints - This option is incorrect because unique constraints help to maintain referential integrity. They ensure that no two rows in a table have the same values in the specified columns.

Option B) Primary keys - This option is correct because primary keys help to maintain referential integrity. They uniquely identify each record in a table and are used as foreign keys in other tables to establish relationships.

Option C) Cascading actions - This option is incorrect because cascading actions help to maintain referential integrity. They define what happens to related records in other tables when the referenced record is updated or deleted.

Option D) Foreign keys - This option is incorrect because foreign keys help to maintain referential integrity. They establish relationships between tables by referencing the primary key of another table.

Based on the explanations above, the correct answer is A) Unique constraints. Unique constraints do not directly help to maintain referential integrity; instead, they ensure that no duplicate values are present in specified columns.

What are the memory structures used to handle multiple row selections at a time

  1. Cursors

  2. Host Variables

  3. Indicator Variable

  4. SQLCA


Correct Option: A

A control file contain information about

  1. Control file

  2. Redo Logfile and datafile

  3. Database

  4. Current SCN Number

  5. All of the above


Correct Option: E

Log switch is

  1. It is the point at which ORACLE starts writing to one online redo log file and begins writing to another at same time

  2. It is the point at which ORACLE ends writing to one online redo log file and begins writing to another

  3. It is the point at which ORACLE starts writing to one online redo log file and ends writing to another

  4. It is the point at which ORACLE ends writing to one online redo log file and starts writing to another


Correct Option: B

Which memory area is used to cache the data dictionary information?

  1. Database Buffer Cache

  2. Redo Log Buffer

  3. Shared Pool

  4. PGA


Correct Option: C
  1. To access the HR user account, the account should be unlocked first

  2. All accounts created by the Database Creation Assistant are locked

  3. The SYS and SYSTEM accounts use the same default password as in previous Oracle versions

  4. All accounts created by the Database Creation Assistant initially have expired passwords


Correct Option: A

What is a cluster Key

  1. The related columns of the tables are called the cluster key. The cluster key is indexed using a cluster index and its value is stored only once for multiple tables in the cluster.

  2. The related columns of the tables are called the cluster key. The cluster key is indexed using a b+ tree index and its value is stored only once for multiple tables in the cluster.

  3. The related columns of the tables are called the cluster key. The cluster key is indexed using a bitmap index and its value is stored only once for multiple tables in the cluster.

  4. The related columns of the tables are called the cluster key. The cluster key is indexed using a range index and its value is stored only once for multiple tables in the cluster.


Correct Option: A

What is Privilidge auditing

  1. It is the auditing of the use of normal system privileges with regard to specifically named objects

  2. It is the auditing of the use of powerful system privileges without regard to specifically named objects

  3. It is the auditing of the use of powerful system privileges with regard to specifically named objects

  4. None of these


Correct Option: B

What is a Two-Phase Commit

  1. Two-phase commit is mechanism that guarantees a distributed transaction that always commits on all involved nodes to maintain data consistency across the global distributed database.

  2. Two-phase commit is mechanism that guarantees a distributed transaction either commits on all involved nodes or rolls back on all involved nodes to maintain data consistency across the global distributed database. It has two phase, a Prepare Phase and a C

  3. Two-phase commit is mechanism that guarantees a distributed transaction that always rollback on all involved nodes to maintain data consistency across the global distributed database.

  4. Two-phase commit is mechanism that guarantees a distributed transaction that always commit on all involved nodes to maintain data consistency across the global heirarchical database.


Correct Option: B

When attempting to connect to an instance that is down, which Oracle Net feature or component facilitates automatic connect-time fail-over to another instance for the user?

  1. Heterogeneous Services

  2. Oracle Connection Manager

  3. Dynamic Service Registration

  4. Oracle Names Server


Correct Option: C

Which type of view is implemented as a subquery embedded in the FROM clause of a SELECT statement and is identified by an alias?

  1. Inline

  2. Simple

  3. Complex

  4. Nested


Correct Option: A
- Hide questions