Oracle Constraints By Blue Blaze

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By S_rajalakshmi8
S
S_rajalakshmi8
Community Contributor
Quizzes Created: 1 | Total Attempts: 132
| Attempts: 132 | Questions: 20
Please wait...
Question 1 / 20
0 %
0/100
Score 0/100
1. _________  constraint is used to limit the value range that can be placed in a column.

Explanation

The "Check" constraint is used to limit the value range that can be placed in a column. This constraint allows you to specify a condition that must be met in order for a value to be inserted or updated in the column. If the condition is not met, the database will throw an error and the operation will be rejected. This constraint is commonly used to enforce data integrity by ensuring that only valid values are stored in the column.

Submit
Please wait...
About This Quiz
Oracle Constraints By Blue Blaze - Quiz

Explore the intricacies of Oracle constraints with the 'ORACLE CONSTRAINTS BY BLUE BLAZE' quiz. Assess your understanding of SQL constraints, including check constraints, transaction control commands, and more, enhancing database management skills.

Personalize your quiz and earn a certificate with your name on it!
2. Check constraint can be used for self refential integrity

Explanation

A check constraint is a rule that is applied to a column or a set of columns in a table to enforce the data integrity. It allows you to specify a condition that must be met for the data to be inserted or updated in the table. In the context of self-referential integrity, a check constraint can be used to ensure that a column referencing another column in the same table is valid. This means that the value in the referencing column must exist in the referenced column. Therefore, the statement "Check constraint can be used for self-referential integrity" is true.

Submit
3.  Which of the following is valid SQL for an Index?

Explanation

The correct answer is "CREATE INDEX ID;". This is valid SQL syntax for creating an index in a database. The other options, "CHANGE INDEX ID;", "ADD INDEX ID;", and "REMOVE INDEX ID;", do not exist in SQL syntax and are therefore not valid.

Submit
4. What mechamisn does Oracle use in the background to enforce uniqueness in Primary and Unique key constraints? 

Explanation

Oracle uses unique indexes in the background to enforce uniqueness in Primary and Unique key constraints. When Primary and Unique constraints are created or enabled, Oracle automatically creates unique indexes to ensure that the values in the specified columns are unique. These indexes help Oracle enforce the uniqueness constraint efficiently by providing a fast lookup mechanism for duplicate values.

Submit
5. Zero is equivalent to null?

Explanation

Zero is not equivalent to null. Zero is a numerical value that represents the absence of quantity or value, while null is a special value that represents the absence of any object or reference. They are different concepts and cannot be considered equivalent.

Submit
6. Constraints are classified into _________ and __________ constraints.

Explanation

Constraints in a database are rules or conditions that are applied to the data to ensure its integrity and consistency. In this context, column level constraints are rules that are applied to individual columns in a table, such as data type, nullability, and uniqueness constraints. On the other hand, table level constraints are rules that are applied to the entire table, such as primary key, foreign key, and check constraints. Therefore, constraints are classified into column level and table level constraints based on the scope of their application.

Submit
7. To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.

Explanation

To remove duplicate rows from the results of an SQL SELECT statement, the "DISTINCT" qualifier must be included. This qualifier ensures that only unique values are returned, eliminating any duplicate rows in the result set.

Submit
8. All of a user's constraints can be viewed in the Oracle Data Dictionary view called: 

Explanation

The correct answer is USER_CONSTRAINTS. The Oracle Data Dictionary view called USER_CONSTRAINTS allows users to view all of their constraints. This view provides information about the constraints defined on tables owned by the current user. It includes details such as constraint name, type, table name, and the columns involved in the constraint. By querying this view, users can easily access and manage their constraints in the Oracle database.

Submit
9. The command to 'switch off' a constraint is: 

Explanation

The correct answer is "ALTER TABLE DISABLE CONSTRAINT (*)". This command is used to disable a constraint in a table. The asterisk (*) represents the name of the constraint that needs to be disabled. By using this command, the constraint will no longer be enforced, allowing for modifications to be made to the table without the constraint being checked.

Submit
10. Which are the types of locks?

Explanation

The types of locks can be categorized as either automatic or manual. Automatic locks are those that operate electronically or automatically, such as keyless entry systems or smart locks. On the other hand, manual locks require physical manipulation, such as turning a key or sliding a bolt, to lock or unlock a door. Therefore, the correct answer is "automatic and manual" as it includes both types of locks.

Submit
11. You can drop a column in a table with a simple ALTER TABLE DROP COLUMN statement, even if the column is referenced in a constraint.

Explanation

The given statement is false. If a column is referenced in a constraint, you cannot drop that column directly using the ALTER TABLE DROP COLUMN statement. You would need to first drop or modify the constraint that references the column before being able to drop the column itself.

Submit
12. The SQL WHERE clause:

Explanation

The SQL WHERE clause is used to filter rows based on a specified condition. It allows you to specify a condition that must be met for a row to be included in the result set. Therefore, it limits the row data that is returned, not the column data. So, the correct answer is "limits the row data are returned."

Submit
13. WHERE  clauses allows alias names.

Explanation

WHERE clauses in SQL do not allow alias names. Alias names can only be used in SELECT statements to give columns or tables alternative names. The WHERE clause is used to filter rows based on specific conditions, and it does not support the use of alias names.

Submit
14. Which statement cannot be rolled back and committed automatically

Explanation

DDL stands for Data Definition Language and is used to define and manage the structure of a database. It includes commands like CREATE, ALTER, and DROP. These commands are used to create, modify, or delete database objects like tables, indexes, and views. Unlike DML (Data Manipulation Language) and TCL (Transaction Control Language), DDL statements cannot be rolled back and committed automatically. Once a DDL statement is executed, the changes made to the database structure are permanent and cannot be undone using a rollback operation.

Submit
15. Syntax for Referential integrity?

Explanation

The correct answer is "foreign key(field_name)references table_name(field_name),foreign key(field_name)references table_name(field_name) on delete cascade". This is because the syntax for referential integrity includes the "foreign key" keyword followed by the name of the field, then the "references" keyword followed by the name of the table and the name of the field that the foreign key references. The second part of the answer includes the "on delete cascade" clause, which means that if a record in the referenced table is deleted, all the records in the table with the foreign key will also be deleted.

Submit
16. Select the statement which is collectively known as TCL?

Explanation

Commit, Savepoint, and Rollback are collectively known as Transaction Control Language (TCL) statements in database management systems.

Commit is used to permanently save the changes made in a transaction, making them a permanent part of the database. Savepoint allows for creating a point in a transaction where you can roll back to if needed. Rollback is used to undo the changes made in a transaction and restore the database to its previous state. Grant, on the other hand, is a Data Control Language (DCL) statement used to grant privileges to users in a database.

Submit
17. When two users access the same table's specific row simultaneously , it is possible to update the data before one commits

Explanation

When two users access the same table's specific row simultaneously, it is not possible to update the data before one commits. This is because most database systems implement locking mechanisms to ensure that only one user can modify a specific row at a time. This prevents conflicts and maintains data integrity. Therefore, the statement is false.

Submit
18. Once constraints have been created on a table you will have to live with them as they are unless you drop and re-create the table.

Explanation

Constraints on a table can be altered or dropped using the ALTER TABLE statement in SQL. This allows for modifications to the existing constraints without having to drop and recreate the entire table. Therefore, the statement that once constraints have been created on a table, they cannot be changed or modified is false.

Submit
19. There is a possibility to create more  than one primary key on a single table

Explanation

It is not possible to create more than one primary key on a single table. A primary key is a unique identifier for each record in a table, and by definition, there can only be one primary key. However, it is possible to have a composite primary key, which consists of multiple columns that together form a unique identifier. This is different from having multiple primary keys.

Submit
20. An automatic COMMIT occurs when:

Explanation

An automatic COMMIT occurs when a DDL statement is issued, a DCL statement is issued, or there is a normal exit from SQL*PLUS without issuing an explicit COMMIT or ROLLBACK.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 4, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 04, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 11, 2011
    Quiz Created by
    S_rajalakshmi8
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
_________  constraint is used to limit the value range that can...
Check constraint can be used for self refential integrity
 Which of the following is valid SQL for an Index?
What mechamisn does Oracle use in the background to enforce uniqueness...
Zero is equivalent to null?
Constraints are classified into _________ and __________ constraints.
To remove duplicate rows from the results of an SQL SELECT statement,...
All of a user's constraints can be viewed in the Oracle Data...
The command to 'switch off' a constraint is: 
Which are the types of locks?
You can drop a column in a table with a simple ALTER TABLE DROP COLUMN...
The SQL WHERE clause:
WHERE  clauses allows alias names.
Which statement cannot be rolled back and committed automatically
Syntax for Referential integrity?
Select the statement which is collectively known as TCL?
When two users access the same table's specific row simultaneously...
Once constraints have been created on a table you will have to live...
There is a possibility to create more  than one primary key...
An automatic COMMIT occurs when:
Alert!

Advertisement