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.

A ___________________ is an explicit numeric, character, string or Boolean value not represented by an identifier.(a) Comments(b) Literals(c) Delimiters(d) IdentifiersI have been asked this question by my college professor while I was bunking the class.Query is from Advanced Query Optimization topic in section Query Processing Techniques of Database Management

Answer»

Correct answer is (b) Literals

The explanation is: The TERMS LITERAL and constant value are SYNONYMOUS and REFER to a FIXED data value.

2.

_______________ has made PL/SQL code run faster without requiring any additional work on the part of the programmer.(a) SQL Server(b) My SQL(c) Oracle(d) SQL LiteI got this question during an online exam.My doubt is from Advanced Query Optimization topic in chapter Query Processing Techniques of Database Management

Answer»

Right CHOICE is (C) Oracle

The explanation is: An Oracle database is a collection of DATA treated as a unit. The purpose of a database is to store and retrieve RELATED information.

3.

Which of the following is TRUE?(a) Every relation in 2NF is also in BCNF(b) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R(c) Every relation in BCNF is also in 3NF(d) No relation can be in both BCNF and 3NFThe question was posed to me in a national level competition.My doubt stems from Materialized Views topic in section Query Processing Techniques of Database Management

Answer»

Correct answer is (c) Every relation in BCNF is ALSO in 3NF

The best I can explain: A relational database table is often DESCRIBED as “normalized” if it is in the THIRD Normal FORM because most of the 3NF tables are free of insertion, UPDATE, and deletion anomalies.

4.

___________ refers to the ability of the system to recover committed transaction updates if either the system or the storage media fails.(a) Isolation(b) Atomicity(c) Consistency(d) DurabilityI had been asked this question in an interview for job.I need to ask this question from Transformation of Relational Expressions topic in chapter Query Processing Techniques of Database Management

Answer» RIGHT option is (d) Durability

Easy explanation - In database systems, durability is the ACID PROPERTY which GUARANTEES that transactions that have COMMITTED will survive permanently.
5.

Tuples are generated ___________ in producer-driven pipelining, they are generated ________ on demand, in demand-driven pipelining.(a) Lazily, Eagerly(b) Eagerly, Lazily(c) Slowly, Eagerly(d) Eagerly, SlowlyThis question was addressed to me by my school principal while I was bunking the class.Enquiry is from Evaluation of Expressions topic in division Query Processing Techniques of Database Management

Answer» CORRECT ANSWER is (B) Eagerly, Lazily

The EXPLANATION is: Producer-driven pipelining is very USEFUL in parallel processing systems.
6.

Pipelines can be executed in(a) 4(b) 3(c) 2(d) 5This question was posed to me in class test.My doubt is from Evaluation of Expressions in chapter Query Processing Techniques of Database Management

Answer»

Correct option is (c) 2

For explanation: DEMAND driven and producer driven PIPELINES are the TWO ways.

7.

Pictorial representation of an expression is called(a) Expression tree(b) Operator tree(c) Expression flow(d) Expression chartI got this question during a job interview.This intriguing question comes from Evaluation of Expressions in portion Query Processing Techniques of Database Management

Answer»

Right option is (b) Operator TREE

To EXPLAIN: The operator tree has a tree like FORMAT where the evaluation STARTS from root of the tree.

8.

_______________ is a procedural extension of Oracle – SQL that offers language constructs similar to those in imperative programming languages.(a) SQL(b) PL/SQL(c) Advanced SQL(d) PQLThe question was asked in semester exam.The above asked question is from Advanced Query Optimization topic in chapter Query Processing Techniques of Database Management

Answer»

Correct choice is (b) PL/SQL

Easiest EXPLANATION - PL/SQL is an imperative 3GL that was designed SPECIFICALLY for the seamless PROCESSING of SQL commands.

9.

Stored procedures are safe from SQL injection attacks(a) True(b) False(c) Depends on the result(d) Always safeI had been asked this question during an online interview.This question is from Estimating Statistics of Expression Results topic in portion Query Processing Techniques of Database Management

Answer»

Correct ANSWER is (a) True

For explanation: Injection attack is not POSSIBLE in SP.

10.

Which statement is used to define a cursor?(a) OPEN(b) FETCH(c) DECLARE CURSOR(d) FETCH_STATUSI have been asked this question by my school principal while I was bunking the class.I need to ask this question from Estimating Statistics of Expression Results topic in portion Query Processing Techniques of Database Management

Answer»

The correct answer is (c) DECLARE CURSOR

Explanation: A DATABASE cursor is a control structure that enables traversal over the RECORDS in a database.

11.

A_____ is a query that retrieves rows from more than one table or view:(a) Start(b) End(c) Join(d) All of the mentionedThe question was posed to me in an online interview.My enquiry is from Join Operations topic in chapter Query Processing Techniques of Database Management

Answer»

Correct answer is (c) Join

The best explanation: An SQL join clause combines records from TWO or more tables in a DATABASE. It creates a SET that can be saved as a table or used as it is. A JOIN is a means for combining fields from two tables by using VALUES common to each.

12.

If access paths are available on all the conditions of a disjunctive selection, each index is scanned for pointers to tuples that satisfy the individual condition. This is satisfied by(a) A10(b) A7(c) A9(d) A6I got this question in class test.Query is from Selection Operation in division Query Processing Techniques of Database Management

Answer»

Right answer is (a) A10

To explain: A10 – Disjunctive SELECTION by union of IDENTIFIERS.

13.

The strategy can retrieve a single record if the equality condition is on a key; multiple records may be retrieved if the indexing field is not a key is(a) A2(b) A4(c) A5(d) A6I had been asked this question in a national level competition.Question is from Selection Operation in section Query Processing Techniques of Database Management

Answer» CORRECT answer is (B) A4

Explanation: A4 – Secondary INDEX, EQUALITY.
14.

Relation R with an associated set of functional dependencies, F, is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set of relations is(a) Zero(b) More than zero but less than that of an equivalent 3NF decomposition(c) Proportional to the size of F+(d) IndeterminateThis question was addressed to me in an interview for internship.My question is based upon Materialized Views topic in portion Query Processing Techniques of Database Management

Answer»

The CORRECT option is (B) More than ZERO but less than that of an equivalent 3NF decomposition

To EXPLAIN: Redundancy in BCNF is low when compared to 3NF.

15.

Which global variables can be used to determine if a transaction is still open?(a) NESTLEVEL(b) FETCH_STATUS(c) TRANCOUNT(d) CONNECTIONSThis question was addressed to me in an online quiz.The doubt is from Estimating Statistics of Expression Results topic in portion Query Processing Techniques of Database Management

Answer»

The correct choice is (C) @@TRANCOUNT

Easy EXPLANATION - PRINT @@TRANCOUNT — The BEGIN TRAN STATEMENT will increment the — TRANSACTION COUNT by 1.

16.

Which of the following case does not exist in complexity theory(a) Best case(b) Worst case(c) Average case(d) Null caseThis question was posed to me in an international level competition.My question is based upon Sorting in division Query Processing Techniques of Database Management

Answer» RIGHT ANSWER is (d) Null case

The explanation is: Null case cannot be counted as the factor for COMPLEXITY.
17.

A line of PL/SQL text contains groups of characters known as(a) Lexical Units(b) Literals(c) Textual Units(d) IdentifiersThe question was asked in homework.I need to ask this question from Advanced Query Optimization in portion Query Processing Techniques of Database Management

Answer»

The correct ANSWER is (a) Lexical Units

The explanation is: Lexical items can be GENERALLY understood to convey a single MEANING, MUCH as a lexeme, but are not LIMITED to single words.

18.

In a _________ the system makes repeated requests for tuples from the operation at the top of the pipeline.(a) Demand-driven pipeline(b) Producer-driven pipeline(c) Demand pipeline(d) All of the mentionedThe question was asked in exam.This is a very interesting question from Evaluation of Expressions topic in section Query Processing Techniques of Database Management

Answer» RIGHT OPTION is (a) Demand-driven pipeline

Explanation: Each time that an operation receives a REQUEST for tuples, it computes the next tuple (or tuples) to be RETURNED, and then returns that tuple.
19.

Index structures are referred to as __________ since they provide a path through which data can be located and accessed.(a) Index Search(b) Linear search(c) File scan(d) Access pathsThis question was posed to me in final exam.Asked question is from Selection Operation in division Query Processing Techniques of Database Management

Answer»

The correct OPTION is (d) Access paths

The best explanation: A PRIMARY index is an index that allows the records of a FILE to be READ in an order that corresponds to the physical order in the file.

20.

Capabilities of RAISERROR(a) It can be logged in the error log(b) It can print a message to the application(c) It can assign an error number, state and severity(d) All of the mentionedI had been asked this question in an interview for job.I'm obligated to ask this question of Estimating Statistics of Expression Results in chapter Query Processing Techniques of Database Management

Answer»

Correct CHOICE is (d) All of the mentioned

The best explanation: A relational database table is often described as “normalized” if it is in the Third Normal Form because most of the 3NF tables are FREE of insertion, UPDATE, and DELETION anomalies.

21.

Which feature converts row data to a column for better analytical view?(a) Views(b) Join(c) Pivot(d) TriggerThe question was posed to me in a national level competition.This is a very interesting question from Estimating Statistics of Expression Results in chapter Query Processing Techniques of Database Management

Answer»

The correct choice is (c) Pivot

The best explanation: Pivot table is very POWERFUL and very EASY to USE.

22.

Which operation are allowed in a join view:(a) UPDATE(b) INSERT(c) DELETE(d) All of the mentionedThe question was asked during an interview.My query is from Join Operations topic in division Query Processing Techniques of Database Management

Answer»

The correct choice is (d) All of the mentioned

Best EXPLANATION: The DELETE statement is used to delete ROWS in a table. The UPDATE statement is used to update existing records in a table. The INSERT INTO statement is used to insert NEW records in a table.

23.

The complexity of the average case of an algorithm is(a) Much more complicated to analyze than that of worst case(b) Much more simpler to analyze than that of worst case(c) Sometimes more complicated and some other times simpler than that of worst case(d) None of the mentionedI have been asked this question in exam.This interesting question is from Sorting in chapter Query Processing Techniques of Database Management

Answer»

The correct answer is (a) MUCH more complicated to ANALYZE than that of worst case

Explanation: Algorithmic complexity is CONCERNED about how fast or slow particular algorithm PERFORMS.

24.

The relationship between DEPARTMENT and EMPLOYEE is a(a) One-to-one relationship(b) One-to-many relationship(c) Many-to-many relationship(d) Many-to-one relationshipThe question was posed to me in final exam.Question is taken from Query Processing topic in division Query Processing Techniques of Database Management

Answer»

The CORRECT answer is (B) One-to-many relationship

The best explanation: One entity department is related to several EMPLOYEES.

25.

_________________ is a sequence of zero or more characters enclosed by single quotes.(a) Integers literal(b) String literal(c) String units(d) String labelI had been asked this question in an online quiz.Question is taken from Advanced Query Optimization in portion Query Processing Techniques of Database Management

Answer»

Correct CHOICE is (b) String LITERAL

For explanation: The TERMS literal and constant VALUE are SYNONYMOUS and refer to a fixed data value.

26.

Consider a schema R(A, B, C, D) and functional dependencies A -> B and C -> D. Then the decomposition of R into R1 (A, B) and R2(C, D) is(a) dependency preserving and lossless join(b) lossless join but not dependency preserving(c) dependency preserving but not lossless join(d) not dependency preserving and not lossless joinThe question was asked in semester exam.My query is from Materialized Views topic in portion Query Processing Techniques of Database Management

Answer»

Right answer is (d) not dependency PRESERVING and not lossless join

To EXPLAIN: While decomposing a relational table we MUST VERIFY the FOLLOWING properties:

i) Dependency Preserving Property

ii) Lossless-Join Property.

27.

______________ allows the algorithm to execute more quickly by performing CPU activity in parallel with I/O activity.(a) Buffering(b) Double buffering(c) Multiple buffering(d) Double readingThe question was asked by my school teacher while I was bunking the class.Query is from Evaluation of Expressions topic in division Query Processing Techniques of Database Management

Answer»

The correct choice is (a) BUFFERING

Easy explanation - Double buffering using two buffers, with one CONTINUING EXECUTION of the algorithm while the other is being WRITTEN out.

28.

The Average case occur in linear search algorithm(a) When Item is somewhere in the middle of the array(b) When Item is not in the array at all(c) When Item is the last element in the array(d) When Item is the last element in the array or is not there at allI have been asked this question in homework.I need to ask this question from Sorting in portion Query Processing Techniques of Database Management

Answer»

The correct option is (a) When Item is SOMEWHERE in the middle of the array

Explanation: ALGORITHMIC COMPLEXITY is concerned about how fast or slow particular algorithm performs.

29.

The relation EMPDT1 is defined with attributes empcode(unique), name, street, city, state, and pincode. For any pincode, there is only one city and state. Also, for any given street, city and state, there is just one pincode. In normalization terms EMPDT1 is a relation in(a) 1NF only(b) 2NF and hence also in 1NF(c) 3NF and hence also in 2NF and 1NF(d) BCNF and hence also in 3NF, 2NF and 1NFThe question was asked during an interview for a job.My question is based upon Materialized Views topic in division Query Processing Techniques of Database Management

Answer»

Right choice is (b) 2NF and hence also in 1NF

The best explanation: Empcode is unique, therefore it is the PRIMARY key. Since the primary key CONSISTS of a single attribute there will be no partial DEPENDENCY, hence the relation is in 2NF.

From the QUESTION we get the FDs as below:

 pincode -> city, state

 street,city,state -> pincode

From the FDs we can see that there are TRANSITIVE dependencies, hence the table is not in 3NF.

30.

Which of the following is/are false for RAW mode of FOR XML?(a) XMLSCHEMA option does not returns an in-line XSD schema(b) BINARY BASE32 returns the binary data in base32-encoded format(c) Each row in the query result is transformed into an XML element(d) None of the mentionedI got this question at a job interview.This intriguing question originated from Transformation of Relational Expressions topic in portion Query Processing Techniques of Database Management

Answer»

Right ANSWER is (B) BINARY BASE32 RETURNS the binary data in base32-encoded format

Easiest explanation - XML was designed to transport and STORE data.

31.

Which join refers to join records from the write table that have no matching key in the left table are include in the result set:(a) Left outer join(b) Right outer join(c) Full outer join(d) Half outer joinThis question was addressed to me in an online interview.The query is from Join Operations in chapter Query Processing Techniques of Database Management

Answer»

Right choice is (b) Right OUTER join

The EXPLANATION is: A right outer join will return all the rows that an inner join returns plus one row for each of the other rows in the SECOND table that did not have a match in the first table. It is the same as a left outer join with the TABLES SPECIFIED in the opposite order.

32.

A condition is referred to as __________(a) Join in SQL(b) Join condition(c) Join in SQL & Condition(d) None of the mentionedThe question was asked in exam.This is a very interesting question from Join Operations topic in portion Query Processing Techniques of Database Management

Answer»

Right CHOICE is (b) JOIN condition

Best explanation: An SQL join CLAUSE combines RECORDS from two or more tables in a database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining fields from two tables by using values COMMON to each.

33.

In query processing, the ___________ is the lowest-level operator to access data.(a) Index Search(b) Linear search(c) File scan(d) Access pathsI have been asked this question at a job interview.Question is from Selection Operation topic in division Query Processing Techniques of Database Management

Answer»

Right choice is (C) File scan

Explanation: File scans are search algorithms that LOCATE and retrieve RECORDS that fulfill a selection CONDITION.

34.

If the state of the database no longer reflects a real state of the world that the database is supposed to capture, then such a state is called(a) Consistent state(b) Parallel state(c) Durable state(d) Inconsistent stateI got this question during an internship interview.I need to ask this question from Query Processing in portion Query Processing Techniques of Database Management

Answer»

Right choice is (d) INCONSISTENT state

The best explanation: SQL data consistency is that WHENEVER a TRANSACTION is PERFORMED, it sees a consistent DATABASE.

35.

In _______________ the management of the password for the account can be handled outside of oracle such as operating system.(a) Database Authentication(b) Operating System Authentication(c) Internal Authentication(d) External AuthenticationI have been asked this question in homework.Enquiry is from Advanced Query Optimization topic in chapter Query Processing Techniques of Database Management

Answer»

The CORRECT ANSWER is (b) Operating System Authentication

Easiest explanation - DATABASE MANAGEMENT involves the monitoring, administration, and MAINTENANCE of the databases and database groups in your enterprise.

36.

Which of the following connection type supports application role permissions and password encryption?(a) OLE DB(b) DBLib(c) ODBC(d) OLE DB and ODBCThe question was posed to me by my college professor while I was bunking the class.My question comes from Estimating Statistics of Expression Results topic in portion Query Processing Techniques of Database Management

Answer»

The correct option is (d) OLE DB and ODBC

Easy explanation - Open DATABASE CONNECTIVITY (ODBC) is Microsoft’s strategic interface for ACCESSING DATA in a heterogeneous environment of relational.

37.

Problems occurs if we don’t implement a proper locking strategy(a) Dirty reads(b) Phantom reads(c) Lost updates(d) Unrepeatable readsThe question was asked during an interview.My enquiry is from Transformation of Relational Expressions topic in portion Query Processing Techniques of Database Management

Answer»

Right choice is (b) Phantom READS

To explain: Phantom reads occur when an INSERT or delete action is PERFORMED against a row that belongs to a RANGE of rows being read by a transaction.

38.

You have a column that will only contain values from 0 to 256. What is the most economical data type to use for the column?(a) TINYINT(b) SMALLINT(c) INT(d) DECIMAL(1)I had been asked this question in an interview for job.This interesting question is from Transformation of Relational Expressions topic in portion Query Processing Techniques of Database Management

Answer»

The CORRECT choice is (b) SMALLINT

Explanation: The bcp utility bulk copies data between an INSTANCE of Microsoft SQL Server and a data FILE in a user-specified FORMAT.

39.

Which utilities can we use to export data from sql server to a text file?(a) DTS export wizard(b) BCP(c) ISQL(d) DTS export wizard and BCPI had been asked this question during an internship interview.This key question is from Transformation of Relational Expressions topic in chapter Query Processing Techniques of Database Management

Answer» RIGHT choice is (d) DTS export wizard and BCP

Easy explanation - The bcp utility BULK COPIES data between an instance of Microsoft SQL Server and a data file in a user-specified FORMAT.
40.

How many join types in join condition:(a) 2(b) 3(c) 4(d) 5The question was asked in semester exam.This interesting question is from Join Operations in division Query Processing Techniques of Database Management

Answer»

Right OPTION is (d) 5

Easiest explanation - INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN.

41.

The Worst case occur in linear search algorithm when(a) Item is somewhere in the middle of the array(b) Item is not in the array at all(c) Item is the last element in the array(d) Item is the last element in the array or is not there at allI have been asked this question in class test.My enquiry is from Sorting in chapter Query Processing Techniques of Database Management

Answer» CORRECT ANSWER is (d) ITEM is the last element in the array or is not there at all

Explanation: Algorithmic complexity is concerned about how fast or SLOW particular algorithm performs.
42.

Which of the following terms does refer to the correctness and completeness of the data in a database?(a) Data security(b) Data constraint(c) Data independence(d) Data integrityI got this question by my school principal while I was bunking the class.My question is taken from Query Processing topic in portion Query Processing Techniques of Database Management

Answer»

Correct choice is (d) DATA integrity

Best explanation: ACID property is SATISFIED by TRANSACTION in database.

43.

Which one of the following statements about normal forms is FALSE?(a) BCNF is stricter than 3NF(b) Lossless, dependency-preserving decomposition into 3NF is always possible(c) Lossless, dependency-preserving decomposition into BCNF is always possible(d) Any relation with two attributes is in BCNFThe question was asked during a job interview.I want to ask this question from Materialized Views in chapter Query Processing Techniques of Database Management

Answer»

The CORRECT answer is (C) Lossless, dependency-preserving decomposition into BCNF is ALWAYS possible

For explanation: ACHIEVING Lossless and dependency-preserving decomposition property into BCNF is difficult.

44.

The complexity of Binary search algorithm is(a) O(n)(b) O(log )(c) O(n2)(d) O(n log n)The question was posed to me in exam.This interesting question is from Sorting in chapter Query Processing Techniques of Database Management

Answer» CORRECT answer is (b) O(LOG )

EASIEST EXPLANATION - This shows that it has a standard complexity in addressing.
45.

In a _____________ operations do not wait for requests to produce tuples, but instead generate the tuples eagerly.(a) Demand-driven pipeline(b) Producer-driven pipeline(c) Demand pipeline(d) All of the mentionedThis question was addressed to me during an internship interview.This interesting question is from Evaluation of Expressions topic in portion Query Processing Techniques of Database Management

Answer»

Correct answer is (b) Producer-driven pipeline

To explain: Each operation in a producer-driven pipeline is modeled as a SEPARATE PROCESS or thread within the system that TAKES a stream of tuples from its pipelined INPUTS and GENERATES a stream of tuples for its output.

46.

Two main measures for the efficiency of an algorithm are(a) Processor and memory(b) Complexity and capacity(c) Time and space(d) Data and spaceI got this question in an interview for internship.This is a very interesting question from Sorting topic in section Query Processing Techniques of Database Management

Answer» RIGHT answer is (c) Time and SPACE

Easy explanation - Depending on the time and space COMPLEXITY only the ALGORITHM for sorting will be CHOSEN.
47.

The algorithm that uses a secondary ordered index to guide retrieval for comparison conditions involving is(a) A2(b) A4(c) A5(d) A6The question was posed to me in my homework.I'd like to ask this question from Selection Operation in portion Query Processing Techniques of Database Management

Answer»

The correct answer is (d) A6

Easiest explanation - A6 – Secondary index, COMPARISON.

48.

Which of the following is the oldest database model?(a) Relational(b) Deductive(c) Physical(d) NetworkI have been asked this question during a job interview.Origin of the question is Query Processing in division Query Processing Techniques of Database Management

Answer»

The correct ANSWER is (d) NETWORK

The best I can explain: The network model is a database model CONCEIVED as a flexible WAY of representing OBJECTS and their relationships.

49.

By default sql server has ___________ isolation level(a) READ COMMITTED(b) READ UNCOMMITTED(c) SERIALIZABLE(d) REPEATABLE READI got this question by my college director while I was bunking the class.I want to ask this question from Transformation of Relational Expressions in section Query Processing Techniques of Database Management

Answer»

The CORRECT OPTION is (a) READ COMMITTED

To explain: READ UNCOMMITTED is the most optimistic concurrency ISOLATION option AVAILABLE in SQL Server.

50.

What is the default “SORT” order for a SQL?(a) Ascending(b) Descending(c) As specified by the user(d) None of the mentionedThe question was asked during an online exam.The question is from Estimating Statistics of Expression Results topic in portion Query Processing Techniques of Database Management

Answer»

The correct ANSWER is (a) ASCENDING

Best explanation: Default is ascending order.