Engineering Questions with Answers - Multiple Choice Questions
Home » MCQs » Engineering MCQs » Database MCQ – A Simple Transaction Model
Database MCQ – A Simple Transaction Model
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
Answer: b
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.
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
Answer: a
Explanation: Triggers are used to initialize the actions for an activity.
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
Answer: c
Explanation: SUBSTR are used to match the particular characters in a string.
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
Answer: b
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.
What are the different events in Triggers?
a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) Select, Commit
View Answer
Answer: c
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.
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
Answer: a
Explanation: DDL are used to define schema and table characters.
The SQL statement SELECT SUBSTR(‘123456789’, INSTR(‘abcabcabc’,’b’), 4) FROM EMP; prints
a) 6789
b) 2345
c) 1234
d) 456789
View Answer
Answer: b
Explanation: SUBSTR are used to match the particular characters in a string.
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
Answer: b
Explanation: Syntax : UPDATE table_name
SET column1=value1,column2=value2,…
WHERE some_column=some_value; .
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
Answer: d
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
______________ 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
Answer: d
Explanation: Dynamic SQL enables you to write programs that reference SQL statements whose full text is not known until runtime.