SQL interview questions and answers for SQL developers and administrators

Below are the interview questions for SQL basic and intermediate level SQL Developers, Administrators, and Testers. These questions are about SQL usages, SQL language elements, SQL process and programming and SQL Database Management systems.

1) What is SQL?
Structured Query Language, an ANSI (American National Standards Institute) standard language for accessing databases.
Using SQL we can Access Oracle, Sybase, DB2, SQL Server, MySQL, DB/400 and other Database Management Systems

2) When SQL was appeared ?
Structured Query Language was first appeared by IBM in 1974 and it is Free Software(any body can use with free of cost).

3) Who should learn SQL?
  • Database Developers
  • Database Testers
  • Database Administrators

4) What are the Usages of SQL?
  • Creating new databases
  • Creating new tables in a database
  • Inserting records in a database
  • Updating records in a database
  • Deleting records from a database
  • Retrieving data from a database
  • Executing queries against a database
  • Creating stored procedures in a database
  • Creating views in a database
  • Setting permissions on tables, procedures, and views

5) What are important SQL Language Elements?
  • Identifiers: Names of Database objects such as tables, views, columns, and databases etc...
  • Data Types: Define the type of data that is contained by a column.
  • Constants: Symbols that represent specific data types.
  • Operators: Perform Arithmetic, Comparison, and Logical Operations.
  • Functions: Built-in Functions to perform specific operations.
  • Clauses: Constituent components of statements and queries.
  • Expressions: Produce either scalar values, or tables consisting of columns and rows of data.
  • Queries: Retrieve the data based on specific criteria. This is an important element of SQL.
  • Statements:

6) What is SQL Process?
When we are executing an SQL command for any RDBMS, the system determines the best way to carry out our request and SQL engine figures out how to interpret the task. There are various components included in the process. These components are Query Dispatcher, Optimization engines, Classic Query Engine and SQL query engine etc. Classic query engine handles all non-SQL queries but SQL query engine won't handle logical files.

7) Is SQL supports Programming?
No, SQL doesn’t have Conditional and Loop statements, using SQL Commands we can access databases.

8) What are the sub sets of SQL?
  • Data Definition Language
  • Data Manipulation Language
  • Data Control Language

9) What is Data Definition Language?
Data Definition Language (DDL) allows us to create, alter, and delete database objects such as schemas, tables, views, sequences, catalogs, indexes, and aliases.

10) What is Data Manipulation Language?
DML is a language which enables users to access and manipulate data. Data Manipulation Language is used to Perform below Operations:
  • Insertion of data into the database
  • Retrieval of data from the database
  • Updating data in the database
  • Deletion of data in the database

11) What is Data Control Language?
Data Control Language (DCL) allows us to control access to the database. 'DCL' commands include-
'GRANT' to allow specific users to perform specified tasks
'REVOKE' to cancel previously denied or granted permissions

12) What is Database?
A database is a systematic collection of data, Databases support storage and manipulation of data, and Databases make data management easy.

13) What is Table?
A Table in a Relational Database is a predefined format of rows and columns that define an entity. Each column contains a different type of attribute and each row corresponds to a single record. Each table is provided with a name.

14) What is Database Management System?

A database management system, or DBMS, is software designed to assist in maintaining and utilizing large collection of data.

The alternative to using a DBMS is to store the data in files and write application-specific code to manage it. Using a DBMS to manage data has many advantages like:
  • Data independence
  • Efficient data access
  • Data integrity and security
  • Data administration
  • Concurrent access and data recovery

15) What is Database Engine?

Software that stores and retrieves data in a database. It may be self-contained program or the part of DBMS that performs the storage and retrieval operations.

0 Comment to "SQL interview questions and answers for SQL developers and administrators"

Post a Comment