Database Questions and Answers – Rapid Application Development

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Rapid Application Development”.

1. Which schema object instructs Oracle to connect to a remotely access an object of a database?
a) Sequence
b) Remote link
c) Database link
d) Data link
View Answer

Answer: d
Explanation: A database link (DBlink) is a definition of how to establish a connection from one Oracle database to another.

2. DML changes are
a) Insert
b) Update
c) Create
d) Both Insert and Update
View Answer

Answer: d
Explanation: Create is a DDL operation.

3. Which of the following object types below cannot be replicated?
a) Data
b) Trigger
c) View
d) Sequence
View Answer

Answer: d
Explanation: Sequence is a series of items which is like a unique index.
advertisement
advertisement

4. How to force a log switch?
a) By using ALTER SYSTEM LOG
b) By using ALTER SYSTEM SWITCH LOGFILE
c) By using ALTER SYSTEM SWITCH LOGS
d) By using ALTER SYS LOGFILES
View Answer

Answer: b
Explanation: ALTER SYSTEM ARCHIVE LOG CURRENT is the best practice for production backup scripts with RMAN. .

5. In the following query, which expression is evaluated first?

Note: Join free Sanfoundry classes at Telegram or Youtube
SELECT id_number, (quantity - 100 / 0.15 - 35 * 20) FROM inventory

a) 100 / 0.15
b) quantity – 100
c) 35*20
d) 0.15-35
View Answer

Answer: a
Explanation: According to the precedence of expression as in BODMAS the expression evaluated.
advertisement

6. The ORDER BY clause can only be used in
a) SELECT queries
b) INSERT queries
c) GROUP BY queries
d) HAVING queries
View Answer

Answer: a
Explanation: SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;.

7. Which of the following rule below are categories of an index?
a) Column and Functional
b) Multiple Column and functional
c) Column, Multiple Column and functional
d) None of the mentioned
View Answer

Answer: a
Explanation: The CREATE INDEX statement is used to create indexes in tables.
advertisement

8. What is the purpose of SMON background process?
a) Performs crash recovery when a failed instance starts up again
b) Performs recovery when a user process fails
c) Writes redo log entries to disk
d) None of the mentioned
View Answer

Answer: a
Explanation: SMON (System MONitor) is an Oracle background process created when you start a database instance.

9. Which of the following queries are legal?
a) SELECT deptno, count(deptno) FROM emp GROUP BY ename;
b) SELECT deptno, count(deptno), job FROM emp GROUP BY deptno;
c) SELECT deptno, avg(sal) FROM emp;
d) SELECT deptno, avg(sal) FROM emp GROUP BY deptno;
View Answer

Answer: d
Explanation: For aggregate functions group by clause is necessary.

10. Which of the following queries displays the sum of all employee salaries for those employees not making commission, for each job, including only those sums greater than 2500?
a) select job, sum(sal) from emp where sum(sal) > 2500 and comm is null;
b) select job, sum(sal) from emp where comm is null group by job having sum(sal) > 2500;
c) select job, sum(sal) from emp where sum(sal) > 2500 and comm is null group by job;
d) select job, sum(sal) from emp group by job having sum(sal) > 2500 and comm is not null;
View Answer

Answer: b
Explanation: For aggregate functions group by clause is necessary.

Sanfoundry Global Education & Learning Series – Database Management System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.