Best 100+ SQL Interview Questions and Answers 2020-21 - 1

Question: 1

Describe the three levels of data abstraction?

The are three levels of abstraction:

Physical level: The lowest level of abstraction describes how data are stored.

Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.

View level: The highest level of abstraction describes only part of entire database.

Question: 2

What is DDL (Data Definition Language)?

A data base schema which is specified by a set of definitions expressed by a special language is called DDL.

Data Definition Language (DDL) is used to define and manage all the objects in an SQL database.

Question: 3

What is a clustered index?

The data rows are stored in order based on the clustered index key. Data stored is in a sequence of the index.

In a clustered index, the physical order of the rows in the table is the same as the logical (indexed) order of the key values.

A table can contain only one clustered index. A clustered index usually provides faster access to data than does a non-clustered index

Question: 4

What is a non-clustered index?

The data rows are not stored in any particular order, and there is no particular order to the sequence of the data pages. In a clustered index, the physical order of the rows in the table is not same as the logical (indexed) order of the key values.

Question: 5

What is a stored procedure?

A stored procedure is a set of pre-compiled SQL commands (query statements), which are stored in the server. It is faster then the loose SQL statements processed on client, as it is pre-compiled.

It can execute more then one SQL commands once as they are bundled in a single entity. We can use control statements within the stored procedure, which will allow us to repeat some SQL command. It can send return values depending upon the result.

Stored procedures are used to reduce network traffic.

Related Questions