SQL is a standard language for accessing and manipulating databases.

What is SQL?
SQL stands for Structured Query Language
SQL lets you access and manipulate databases
SQL is an ANSI (American National Standards Institute) standard

Top SQL Interview QA

Top 20 SQL Interview Questions and Answers for freshers and experienced are below are below:


1. What is DBMS?
Database Management System (DBMS)

2. What is RDBMS?
Relational Database Management System (RDBMS)
Example: SQL Server.

3. What is SQL?
SQL (pronounced "ess-que-el") stands for Structured Query Language.

4. What is a Database?
A database is an organized collection of data. The data is typically organized to model aspects of reality in a way that supports processes requiring information.

Example: School Management Database, Bank Management Database.

5. What is a primary key?
The PRIMARY KEY constraint uniquely identifies each record in a database table.
Primary keys must contain UNIQUE values.
A primary key column cannot contain NULL values.
Most tables should have a primary key, and each table can have only ONE primary key.


6. What is a unique key?
The UNIQUE constraint uniquely identifies each record in a database table.

The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns.

7. What is a foreign key?
A foreign key is a column (or columns) that references a column (most often the primary key) of another table.

The purpose of the foreign key is to ensure referential integrity of the data. In other words, only values that are supposed to appear in the database are permitted.

8. What is a join?
An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.

9. What are the types of join?
Inner join.
Right Join.
Left Join.
Full Join.

10. What is normalization?
Database normalization is the process of organizing the attributes and tables of a relational database to minimize data redundancy.


11. What is Denormalization.
Denormalization is the process of attempting to optimize the read performance of a database by adding redundant data or by grouping data. In some cases, denormalization is a means of addressing performance or scalability in relational database software.

12. What are all the different normalizations?
The normal forms can be divided into 5 forms, and they are explained below -.
First Normal Form (1NF):.
Second Normal Form (2NF):.
Third Normal Form (3NF):.
Fourth Normal Form (3NF):.
Meeting all the requirements of third normal form and it should not have multi- valued dependencies.

13. What is a View?
A view is a virtual table.
This chapter shows how to create, update, and delete a view.

15. What is an Index?
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and storage space to maintain the index data structure.


16. What are all the different types of indexes?
There are three types of indexes -.
Unique Index.
Clustered Index.
NonClustered Index.

17. What is a Cursor?
 A cursor is the position indicator on a computer display screen where a user can enter text

18. What is a query?
Queries are the primary mechanism for retrieving information from a database and consist of questions presented to the database in a predefined format.

19. What is subquery?
A subquery is a query that is nested inside a SELECT, INSERT, UPDATE, or DELETE statement, or inside another subquery.

A subquery can be used anywhere an expression is allowed. In this example a subquery is used as a column expression named MaxUnitPrice in a SELECT statement.

20. What is a trigger?
Triggers are stored programs, which are automatically executed or fired when some events occur.

Triggers are, in fact, written to be executed in response to any of the following events:

  • A database manipulation (DML) statement (DELETE, INSERT, or UPDATE).
  • A database definition (DDL) statement (CREATE, ALTER, or DROP).
  • A database operation (SERVERERROR, LOGON, LOGOFF, STARTUP, or SHUTDOWN).


21. What is Datawarehouse?
Data warehouse (DW or DWH), also known as an enterprise data warehouse (EDW), is a system used for reporting and data analysis. DWs are central repositories of integrated data from one or more disparate sources.

Post a Comment

 
Top