This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “A Simple Transaction Model”.
1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction?
a) CREATE PACKAGE
b) CREATE SCHEMA
c) CREATE CLUSTER
d) All of the mentioned
View Answer
Explanation: A database schema of a database system is its structure described in a formal language supported by the database management system and refers to the organization of data as a blueprint of how a database is constructed.
2. In SQL, the CREATE TABLESPACE is used
a) To create a place in the database for storage of scheme objects, rollback segments, and naming the data files to comprise the tablespace
b) To create a database trigger
c) To add/rename data files, to change storage
d) All of the mentioned
View Answer
Explanation: Triggers are used to initialize the actions for an activity.
3. Which character function can be used to return a specified portion of a character string?
a) INSTR
b) SUBSTRING
c) SUBSTR
d) POS
View Answer
Explanation: SUBSTR are used to match the particular characters in a string.
4. Which of the following is TRUE for the System Variable $date$?
a) Can be assigned to a global variable
b) Can be assigned to any field only during design time
c) Can be assigned to any variable or field during run time
d) Can be assigned to a local variable
View Answer
Explanation: A database schema of a database system is its structure described in a formal language supported by the database management system and refers to the organization of data as a blueprint of how a database is constructed.
5. What are the different events in Triggers?
a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) Select, Commit
View Answer
Explanation: A database trigger is a procedural code that is automatically executed in response to certain events on a particular table or view in a database.
6. Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables?
a) Data Definition Language
b) Data Manipulation Language
c) Data Described Language
d) Data Retrieval Language
View Answer
Explanation: DDL are used to define schema and table characters.
7. The SQL statement SELECT SUBSTR(‘123456789’, INSTR(‘abcabcabc’,’b’), 4) FROM EMP; prints
a) 6789
b) 2345
c) 1234
d) 456789
View Answer
Explanation: SUBSTR are used to match the particular characters in a string.
8. Which of the following SQL command can be used to modify existing data in a database table?
a) MODIFY
b) UPDATE
c) CHANGE
d) NEW
View Answer
Explanation: Syntax : UPDATE table_name
SET column1=value1,column2=value2,…
WHERE some_column=some_value; .
9. When SQL statements are embedded inside 3GL, we call such a program as
a) Nested query
b) Nested programming
c) Distinct query
d) Embedded SQL
View Answer
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
10. _______________ provides option for entering SQL queries as execution time, rather than at the development stage.
a) PL/SQL
b) SQL*Plus
c) SQL
d) Dynamic SQL
View Answer
Explanation: Dynamic SQL enables you to write programs that reference SQL statements whose full text is not known until runtime.
Sanfoundry Global Education & Learning Series – Database Management System.
- Check DBMS Books
- Practice RDBMS MCQ
- Check Computer Science Books
- Practice Programming MCQs
- Check Programming Books