Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

The collections on which aggregate functions can operate are called as __________(a) Multisets(b) Multivalues(c) Multicollections(d) MultivariablesThe question was asked in final exam.I would like to ask this question from The Relational Algebra topic in section Intermediate and Advanced Sql of RDBMS

Answer»

The correct OPTION is (a) Multisets

Best explanation: The COLLECTIONS on which aggregate functions can operate are called as multisets. Sets are a special CASE of multisets.

2.

State true or false: There exists a division operator in Relational Algebra(a) True(b) FalseThis question was posed to me in my homework.My question is from The Relational Algebra in portion Intermediate and Advanced Sql of RDBMS

Answer»

The correct choice is (a) True

To ELABORATE: The DIVISION is a binary OPERATION that is labeled as R ÷ S. The result CONSISTS of the restrictions of tuples in R to the attributes unique to R, i.e., in the relation R but not in the relation S.

3.

Updating, Deleting and Inserting in relational algebra is done using the ________ operator(a) Assignment(b) Modification(c) Alteration(d) InclusionThis question was addressed to me in an online interview.The above asked question is from The Relational Algebra in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Right ANSWER is (a) Assignment

Explanation: UPDATING, DELETING and Inserting in relational ALGEBRA is done using the assignment operator.

4.

How is the right outer join symbol represented in relational algebra?(a) ⟕(b) ⟖(c) ⟗(d) ⋈I have been asked this question in unit test.The question is from The Relational Algebra in division Intermediate and Advanced Sql of RDBMS

Answer»

The correct OPTION is (b) ⟖

Best explanation: The SYMBOL of the right OUTER JOIN is similar to the symbol of the natural join but it has two dashes on the top and bottom right side.

5.

How is the left outer join symbol represented in relational algebra?(a) ⟕(b) ⟖(c) ⟗(d) ⋈The question was asked in semester exam.I want to ask this question from The Relational Algebra topic in division Intermediate and Advanced Sql of RDBMS

Answer»

The correct OPTION is (a) ⟕

To ELABORATE: The symbol of the left outer JOIN is similar to the symbol of the NATURAL join but it has two dashes on the top and bottom left side.

6.

The project operation’s function in relational algebra is identical to the _______ clause in SQL(a) where(b) from(c) select(d) none of the mentionedThe question was asked in examination.This intriguing question originated from The Relational Algebra topic in section Intermediate and Advanced Sql of RDBMS

Answer»

Correct choice is (C) select

To ELABORATE: The project operation’s function in relational algebra is identical to the select CLAUSE in SQL STANDARD. It is used to LIST the attributes that are to be displayed.

7.

The select operation’s function in relational algebra is identical to the _______ clause in SQL(a) where(b) from(c) select(d) none of the mentionedThe question was asked during an interview for a job.My question is from The Relational Algebra topic in chapter Intermediate and Advanced Sql of RDBMS

Answer» CORRECT CHOICE is (a) where

Easiest explanation: The select operation’s function in relational algebra is IDENTICAL to the where CLAUSE in SQL standard. It is therefore used to check for a particular condition.
8.

Which of the following is not a relational algebra function?(a) Select(b) Project(c) Manipulate(d) UnionThe question was posed to me in class test.This question is from The Relational Algebra topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (c) Manipulate

Explanation: There does not exist any OPERATION named as manipulate operation in RELATIONAL algebra. The union gives the union of two sets. Project is SIMILAR to SELECT in SQL and select is similar to where in SQL.

9.

State true or false: In OLAP, analysts cannot view a dimension in different levels of detail.(a) True(b) FalseThis question was posed to me at a job interview.This key question is from OLAP topic in section Intermediate and Advanced Sql of RDBMS

Answer»

The correct choice is (B) False

To elaborate: In OLAP, ANALYSTS cannot view a dimension in DIFFERENT levels of detail. The different levels of detail are classified into a hierarchy.

10.

The operation of moving from coarser granular data to finer granular data is called _______(a) Reduction(b) Increment(c) Roll back(d) Drill downThis question was posed to me in a national level competition.The question is from OLAP topic in portion Intermediate and Advanced Sql of RDBMS

Answer»

Correct answer is (d) DRILL down

To explain: OLAP systems permit USERS to VIEW the data at any LEVEL of granularity. The process of moving from finer granular data to coarser granular data is called as drill-down.

11.

State true or false: OLAP systems can be implemented as client-server systems(a) True(b) FalseI got this question by my school teacher while I was bunking the class.My doubt stems from OLAP in division Intermediate and Advanced Sql of RDBMS

Answer»

The correct choice is (a) True

Explanation: OLAP SYSTEMS can be IMPLEMENTED as client-server systems. In fact most of the current OLAP systems are implemented as client-server systems.

12.

Which of the following OLAP systems do not exist?(a) HOLAP(b) MOLAP(c) ROLAP(d) None of the mentionedI had been asked this question in an online interview.I'm obligated to ask this question of OLAP in section Intermediate and Advanced Sql of RDBMS

Answer»

Correct choice is (d) None of the mentioned

Easiest explanation: HOLAP means HYBRID OLAP, MOLAP means MULTIDIMENSIONAL OLAP, ROLAP means relational OLAP. This means all of the above OLAP SYSTEMS exist.

13.

The_______ function allows substitution of values in an attribute of a tuple(a) Cube(b) Unknown(c) Decode(d) SubstituteThe question was posed to me during a job interview.I'd like to ask this question from OLAP in section Intermediate and Advanced Sql of RDBMS

Answer»

The correct choice is (c) Decode

For EXPLANATION: The decode function allows substitution of values in an ATTRIBUTE of a tuple. The decode function does not always work as we MIGHT like for null values because predicates on null values EVALUATE to UNKNOWN.

14.

How many dimensions of multi-dimensional data do cross tabs enable analysts to view?(a) 1(b) 2(c) 3(d) None of the mentionedI had been asked this question in an interview.Enquiry is from OLAP topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

The correct option is (B) 2

The best explanation: Cross-tabs enable analysts to view two dimensions of multi-dimensional DATA, ALONG with the summaries of the data.

15.

The operation of moving from finer granular data to coarser granular data is called _______(a) Reduction(b) Increment(c) Roll up(d) Drill downThe question was asked by my college director while I was bunking the class.Enquiry is from OLAP topic in division Intermediate and Advanced Sql of RDBMS

Answer»

The CORRECT choice is (C) Roll up

The explanation is: OLAP systems PERMIT users to view the data at any LEVEL of granularity. The PROCESS of moving from finer granular data to coarser granular data is called as roll-up.

16.

The operation of changing a dimensions used in a cross-tab is called as ________(a) Alteration(b) Pivoting(c) Piloting(d) RenewingI have been asked this question by my school principal while I was bunking the class.Enquiry is from OLAP topic in division Intermediate and Advanced Sql of RDBMS

Answer» CORRECT CHOICE is (b) Pivoting

Easiest explanation: We can change the DIMENSIONS used in a cross tab. The operation of changing a dimensions used in a cross-tab is CALLED as pivoting.
17.

Data that can be modelled as dimension attributes and measure attributes are called ___________(a) Mono-dimensional data(b) Multi-dimensional data(c) Measurable data(d) Efficient dataThis question was addressed to me in an interview.My question is from OLAP topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Correct ANSWER is (B) Multi-dimensional data

Explanation: Data that can be MODELLED as dimension ATTRIBUTES and measure attributes are called multi-dimensional data.

18.

What is the full form of OLAP?(a) Online Application Programming(b) Online Application Processing(c) Online Analytical programming(d) Online Analytical ProcessingI had been asked this question by my school teacher while I was bunking the class.This key question is from OLAP in portion Intermediate and Advanced Sql of RDBMS

Answer»

Right CHOICE is (d) ONLINE Analytical Processing

To EXPLAIN: The full FORM of OLAP is Online Analytical Processing. It is an interactive system that gives various features to analysts.

19.

Which package comprises of the core JDBC API?(a) java.sql(b) java.database(c) sql.java(d) java.relationThis question was addressed to me during an internship interview.Enquiry is from Accessing SQL From a Programming Language in section Intermediate and Advanced Sql of RDBMS

Answer»

Right CHOICE is (a) java.sql

For explanation: The java.sql PACKAGE comprises of the core JDBC API. JDBC is an APPLICATION program INTERFACE which contains all the functions to link and execute database functions in Java.

20.

How many different types of drivers are present in JDBC?(a) 1(b) 2(c) 3(d) 4I got this question in semester exam.I want to ask this question from Accessing SQL From a Programming Language topic in section Intermediate and Advanced Sql of RDBMS

Answer»

The correct CHOICE is (d) 4

To EXPLAIN: There are four types of JDBC drivers which are named JDBC TYPE 1,2,3,4 drivers respectively.

21.

State true or false: Recursive queries are permitted in SQL(a) True(b) FalseI have been asked this question in an interview for internship.I'm obligated to ask this question of Accessing SQL From a Programming Language in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Right CHOICE is (a) True

Easiest explanation: Recursive QUERIES can be used in SQL in ORDER to verify a condition repeatedly. SQL ALLOWS recursive queries.

22.

A _________ is a statement that the system executes whenever a database is modified(a) Trigger(b) Function(c) Package(d) ProtocolThis question was addressed to me during a job interview.Question is from Accessing SQL From a Programming Language topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

The CORRECT option is (a) Trigger

Best EXPLANATION: A trigger is a STATEMENT that the SYSTEM executes whenever a database is modified. Immediately after the specified modification of the database is complete, the trigger statement GETS executed and then the execution is continued.

23.

The part of SQL that deals with the SQL supports constructs is called as _______(a) Persistent construct dealer(b) Persistent storage module(c) Persistent supports center(d) Primary storage mediumThe question was asked in exam.This key question is from Accessing SQL From a Programming Language topic in section Intermediate and Advanced Sql of RDBMS

Answer»

Right answer is (b) PERSISTENT storage module

To explain I would SAY: The part of SQL that DEALS with the SQL SUPPORTS constructs is called as Persistent Storage Module (PSM). The SQL supports construct give it almost all the power of a general purpose programming language.

24.

Which of the following are not a part of PL/SQL(a) Triggers(b) Packages(c) Functions(d) None of the mentionedThe question was asked in exam.Query is from Accessing SQL From a Programming Language topic in portion Intermediate and Advanced Sql of RDBMS

Answer» RIGHT option is (d) None of the mentioned

Best explanation: All the three mentioned FEATURES i.e. TRIGGERS, functions, packages are a part of PL/SQL.
25.

State true or false: Developers cannot write their own functions into SQL(a) True(b) FalseThe question was posed to me by my college director while I was bunking the class.Origin of the question is Accessing SQL From a Programming Language in division Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (b) False

To EXPLAIN I would SAY: Developers can WRITE their own functions into SQL by using the create function STATEMENT.

26.

What is the full form of JDBC?(a) Java Database Connectivity(b) Java Database Co-Operation(c) JSP Database Committee(d) Java Database CreationI had been asked this question during an interview.I'm obligated to ask this question of Accessing SQL From a Programming Language in division Intermediate and Advanced Sql of RDBMS

Answer»

The correct choice is (a) JAVA DATABASE Connectivity

Explanation: The FULL form of JDBC is Java Database Connectivity. This full form is no longer widely used and the abbreviation is MOSTLY used everywhere.

27.

Which of the following is/are a function of dynamic SQL?(a) Allowing a program to construct an SQL query in a character string(b) Submitting the query(c) Retrieving the result into the program variables a tuple at a time(d) All of the mentionedThe question was posed to me in an interview for job.This interesting question is from Accessing SQL From a Programming Language in section Intermediate and Advanced Sql of RDBMS

Answer»

The CORRECT option is (d) All of the mentioned

Easy explanation: Dynamic SQL ALLOWS the PROGRAM to construct the queries in character STRING format, it submits them, and then retrieves the data into the program variables one tuple at a time.

28.

The _________ statement is used in SQL to confer authorization.(a) grant(b) confer(c) implement(d) permitThe question was asked by my school principal while I was bunking the class.I want to ask this question from SQL Data Types and Schemas in chapter Intermediate and Advanced Sql of RDBMS

Answer» CORRECT CHOICE is (a) grant

Easy EXPLANATION: The grant statement is used in SQL to CONFER authorization. It has the syntax

grant on to ;
29.

Which of the following is a privilege in SQL standard?(a) select(b) insert(c) update(d) All of the mentionedI got this question in quiz.My question comes from SQL Data Types and Schemas in section Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (d) All of the mentioned

Easy explanation: The SQL standard includes the privileges select, insert, UPDATE and delete. This privilege set can be granted or revoked among the USERS.

30.

State true or false: Users can define new data types in SQL(a) True(b) FalseI have been asked this question in unit test.I need to ask this question from SQL Data Types and Schemas in division Intermediate and Advanced Sql of RDBMS

Answer»

Correct ANSWER is (a) True

Easiest EXPLANATION: SQL allows the CREATION of new data types using the “create typeasfinal;” statement.

31.

Which of the following is an illegal data type in SQL(a) number(b) clob(c) blob(d) lintI had been asked this question in an interview for job.This interesting question is from SQL Data Types and Schemas topic in section Intermediate and Advanced Sql of RDBMS

Answer»

Correct CHOICE is (d) lint

Explanation: clob and blob are CALLED large object data types. They can be used to store values that can GO to the size of GIGABYTES. Number is used to store the BASIC integer data type.

32.

What is a default value?(a) It is a value that automatically creates a primary key(b) It is a value that cannot be altered during insertion of values in the tuple(c) It is a value that is initially loaded into the attribute(d) None of the mentionedI got this question by my college professor while I was bunking the class.My query is from SQL Data Types and Schemas in division Intermediate and Advanced Sql of RDBMS

Answer» CORRECT ANSWER is (C) It is a VALUE that is initially LOADED into the attribute

For explanation: A default value is a value that is initially loaded into the attribute. All the tuples have the default value in the attribute for which it is specified in case any value is not externally specified.
33.

What is a timestamp?(a) A combination of date and time with date first(b) A combination of date and time with time first(c) A combination of time and place with time first(d) A combination of time and place with place firstThe question was posed to me in quiz.The query is from SQL Data Types and Schemas topic in division Intermediate and Advanced Sql of RDBMS

Answer» RIGHT ANSWER is (a) A combination of date and TIME with date first

For explanation I WOULD say: A timestamp is a combination of date and time with date first.

Eg: ‘2002-04-25 10:20:04.43’.
34.

Which of the following is not a valid Date and Time data type?(a) date(b) time(c) datestamp(d) timestampI had been asked this question in semester exam.My question comes from SQL Data Types and Schemas topic in chapter Intermediate and Advanced Sql of RDBMS

Answer» RIGHT option is (C) datestamp

Explanation: datestamp is not a valid Date and Time DATA TYPE. Timestamp exists but datestamp does not exist in SQL.
35.

State true or false: Oracle does not support complex check conditions(a) True(b) FalseI got this question in homework.My query is from Integrity Constraints in chapter Intermediate and Advanced Sql of RDBMS

Answer»

The correct answer is (a) True

Easiest EXPLANATION: Most of the widely used database management systems including oracle CURRENTLY do not support complex CHECK CONDITIONS.

36.

________is a predicate that we expect the database to always satisfy(a) Assertion(b) Reason(c) Mandate(d) VerifyThis question was posed to me at a job interview.Question is from Integrity Constraints topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Right answer is (a) Assertion

For EXPLANATION I WOULD SAY: An assertion is a predicate that we expect the DATABASE to always SATISFY. Domain constraints and referential integrity constraints are special forms of assertions.

37.

Referential integrity constraints are also called as _________(a) Functional dependencies(b) Subset dependencies(c) Superset dependencies(d) Primary dependenciesI got this question by my college director while I was bunking the class.The question is from Integrity Constraints topic in section Intermediate and Advanced Sql of RDBMS

Answer»

Correct choice is (b) Subset dependencies

The BEST explanation: Referential integrity constraints are also called as subset dependencies. It is called so because the set of foreign KEY values in R1 of R2 must be a subset of the set of primary key values in r2.

38.

What is the functions of on delete cascade?(a) It is used to delete a tuple in a table(b) It is used to specify the precise attribute that needs to be deleted in a single relation.(c) It is used to preserve referential integrity in a relation(d) It is used to execute sub-queries in the from clause.The question was asked by my college professor while I was bunking the class.Question is from Integrity Constraints in section Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (C) It is used to preserve referential integrity in a RELATION

The EXPLANATION is: It is used to preserve referential integrity in the relation. When an attribute of a relation is the foreign key in another relation, deleting it causes referential integrity problems. The on delete CASCADE solves this problem by forcing us to delete the foreign key FIRST.

39.

What is the function of the unique constraint?(a) It ensures that no two values under an attribute are identical(b) It ensures that all the attributes are perfectly unique in their data type(c) It ensures that all the relations in the database have a unique set of attributes(d) It does not have any function in SQLI got this question in an international level competition.The doubt is from Integrity Constraints in chapter Intermediate and Advanced Sql of RDBMS

Answer»

The CORRECT option is (a) It ENSURES that no two values under an attribute are identical

Explanation: The purpose of the UNIQUE clause is to ensure that no two values under the same attribute are identical. PRIMARY KEYS are unique by default.

40.

What is the function of the not null constraint?(a) It prevents illegal data from being entered into the database(b) It ensures that data is entered into the database(c) It ensures that the data entered is unique(d) None of the mentionedI got this question in homework.My doubt is from Integrity Constraints in chapter Intermediate and Advanced Sql of RDBMS

Answer»

The correct answer is (b) It ensures that DATA is entered into the database

To explain: The not NULL constraint ensures that data is entered into the database. It DISPLAYS an error message whenever a data FIELD mentioned is left empty.

41.

Which of the following is not an integrity constraint?(a) not null(b) unique(c) identical(d) checkThe question was asked at a job interview.The above asked question is from Integrity Constraints in portion Intermediate and Advanced Sql of RDBMS

Answer»

Correct choice is (c) identical

The best I can explain: Identical is not an ALLOWED integrity CONSTRAINT in SQL. Not null prevents null VALUES and unique only allows unique values to be entered. Check CHECKS for a given condition.

42.

The _______ statement causes the statements to undo all the updates performed on the transaction(a) Undo work(b) Rollback work(c) Commit work(d) Replace workI had been asked this question in my homework.The origin of the question is Views and Transactions topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Correct choice is (b) ROLLBACK work

For EXPLANATION I WOULD say: The Rollback work statement causes the statements to undo all the updates performed on the transaction. The DATABASE is then restored to the state of what it was before the first statement of the transaction was executed.

43.

The _______ statement makes the updates performed by the transaction permanent.(a) Finalize work(b) Finish work(c) Commit work(d) None of the mentionedThis question was addressed to me by my school teacher while I was bunking the class.I want to ask this question from Views and Transactions in division Intermediate and Advanced Sql of RDBMS

Answer» RIGHT option is (c) COMMIT work

The BEST explanation: The Commit work statement MAKES the updates performed by the transaction permanent. After a transaction is committed, a new transaction is automatically STARTED.
44.

State true or false: We can update a view if it has multiple database relations in the from clause(a) True(b) FalseThe question was asked in exam.Enquiry is from Views and Transactions topic in section Intermediate and Advanced Sql of RDBMS

Answer»

The CORRECT choice is (B) False

Explanation: We can update a VIEW only if it has a single database relation in the “from” clause.

45.

The process of maintaining views up to date is called _________(a) View maintenance(b) View updating(c) View materialization(d) View isolationI got this question during an interview.My query is from Views and Transactions topic in division Intermediate and Advanced Sql of RDBMS

Answer» CORRECT option is (a) View maintenance

To explain I WOULD SAY: The process of maintaining VIEWS up to date is called View maintenance. View maintenance can be done immediately when any of the views is UPDATED.
46.

If the actual relations used in the view definition change, the view is updated immediately. Such views are called _________(a) Instant views(b) Instantaneous views(c) Materialistic views(d) Materialized viewsI got this question in an interview.Question is from Views and Transactions in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Correct option is (d) MATERIALIZED views

The EXPLANATION is: If the actual RELATIONS used in the view DEFINITION change, the view is updated immediately. Such views are CALLED Materialized views. Materialized views help to keep the database up-to-date.

47.

State true or false: One view can be used in the expression defining another view(a) True(b) FalseI have been asked this question in an interview for internship.Asked question is from Views and Transactions in division Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (a) True

For explanation I would say: ONE view can be used to define another view in its EXPRESSION. This further improves the writability of the code as we are reducing the ENTIRE logical model.

48.

What is the result of the above query?(a) It creates a view named studentdet with 3 attributes(b) It creates a view named studentdet with 1 attribute(c) It creates a view named ID with 2 attributes(d) It is syntactically wrong and does not give a resultI have been asked this question during an online interview.The doubt is from Views and Transactions topic in chapter Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (d) It is syntactically wrong and does not give a result

Best EXPLANATION: immediately after specifying the NAME of the VIEW, we have to WRITE the “as” keyword. So this query does not give any result as it is syntactically incorrect.

49.

What is the command used to define view in SQL?(a) define view(b) new view(c) create view(d) none of the mentionedThis question was addressed to me at a job interview.Origin of the question is Views and Transactions in division Intermediate and Advanced Sql of RDBMS

Answer»

The correct option is (c) CREATE VIEW

To explain: We use the create view command to DEFINE a view in SQL.

50.

What is a view?(a) An brief description of the schema diagram.(b) A relation that is not a part of the schema but is a virtual relation(c) Any relation that is a part of the schema(d) A relation that is a part of the schema but which needs to be specified in every operation made on that particular relation.The question was posed to me in an online interview.This intriguing question originated from Views and Transactions topic in portion Intermediate and Advanced Sql of RDBMS

Answer»

Correct option is (b) A relation that is not a PART of the schema but is a virtual relation

Explanation: A relation that is not a part of the schema but is a virtual relation is called as VIEW. Views improve writability as viewing the entire LOGICAL MODEL is not feasible.