- Home
- All Blogs
-
SQL Introduction Interview Questions
SQL Introduction Interview Questions
Published On:
4/26/2023
Author:
Admin
Interview questions on Introduction of SQL. These questions and answers will help in preparation of SQL interview for freshers as well as experienced candidates.
Q. 1 What is SQL ?
SQL stands for Structured Query Language. SQL was developed in the 1970s by IBM Computer Scientists.
SQL is a database computer language designed for the retrieval and management of data in a relational databases like MySQL, MS Access, SQL Server, MS Access, Oracle, Sybase, Informix, Postgres etc. SQL is not a database management system, but it is a query language which is used to store and retrieve the data from a database or in simple words SQL is a language that communicates with databases.
Q. 2 What is Application of SQL ?
SQL is one of the most widely used Query Language over the databases. SQL provides following functionality to the database programmers:
- Execute different database queries against a database.
- Define the data in a database and manpulate that data.
- Create data in a relational database management system.
- Access data from the relational database management system.
- Create and drop databases and tables.
- Create and maintain database users.
- Create view, stored procedure, functions in a database.
- Set permissions on tables, procedures and views.
Q. 3 What can SQL do ?
• SQL can execute queries against a database
- SQL can retrieve data from a database
- SQL can insert records in a database
- SQL can update records in a database
- SQL can delete records from a database
- SQL can create new databases
- SQL can create new tables in a database
- SQL can create stored procedures in a database
- SQL can create views in a database
- SQL can set permissions on tables, procedures, and views
Q. 4 What are the Advantages of SQL ?
SQL is widely popular because it offers the following advantages −
- Allows users to access data in the relational database management systems.
- Allows users to describe the data.
- Allows users to define the data in a database and manipulate that data.
- Allows to embed within other languages using SQL modules, libraries & pre-compilers.
- Allows users to create and drop databases and tables.
- Allows users to create view, stored procedure, functions in a database.
- Allows users to set permissions on tables, procedures and views.
Q. 5 How SQL work ?
When you are executing an SQL command for any RDBMS, the system determines the best way to carry out your request and SQL engine figures out how to interpret the task.There are various components included in this process. These components are −
- Query Dispatcher
- Optimization Engines
- Classic Query Engine
- SQL Query Engine, etc.
Q. 6 What is RDBMS ?
RDBMS stands for Relational Database Management System.
RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
The data in RDBMS is stored in database objects called tables. A table is a collection of related data entries and it consists of columns and rows.
Q. 7 What is a Table ?
The data in an RDBMS is stored in database objects which are called as tables. This table is basically a collection of related data entries and it consists of numerous columns and rows.A table is the most common and simplest form of data storage in a relational database
Q. 8 What is a Field ?
A field is a column in a table that is designed to maintain specific information about every record in the table.
Every table is broken up into smaller entities called fields.
Q. 9 What is a record or a row ?
A record is also called as a row of data is each individual entry that exists in a table.
Q. 10 What is Column ?
A column is a vertical entity in a table that contains all information associated with a specific field in a table.
Q. 11 What is Null Value ?
A NULL value in a table is a value in a field that appears to be blank, which means a field with a NULL value is a field with no value.
NULL value is different than a zero value or a field that contains spaces. A field with a NULL value is the one that has been left blank during a record creation.
Q. 12 What are Constraints in SQL?
Constraints are the rules enforced on data columns on a table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Q. 13 How SQL constraints can be applied?
Constraints can either be column level or table level. Column level constraints are applied only to one column whereas, table level constraints are applied to the entire table.
Q. 14 Write down categories of Data Integrity
The following categories of data integrity exist with each RDBMS −
Entity Integrity , Domain Integrity , Referential integrity and User-Defined Integrity
Q. 15 What is Entity Integrity in RDBMS?
Entity Integrity ensures that there are no duplicate rows in a table
Q. 16 What are the rules of entity integrity?
Every table must has a primary key.
Every entity is unique. The relations Primary Key must have unique values for each row.
Primary Key cannot have NULL value and must be unique.
Q. 17 What is Domain Integrity in RDBMS?
Domain Integrity Enforces valid entries for a given column by restricting the type, the format, or the range of values.
Domain Integrity ensures that every column in a relational database is in a defined domain.
Q. 18 What is Referential integrity in RDBMS?
In Referential integrity Rows cannot be deleted, which are used by other records. This is called as Foreign Key.
Q. 19 What is User-Defined Integrity in RDBMS?
User-Defined IntegrityEnforces some specific business rules that do not fall into entity, domain or referential integrity
Q. 20 Are Sql keyword case sensitive?
SQL keywords are NOT case sensitive: select is the same as SELECT
Q. 21 What is Database Normalization?
Database normalization is the process of efficiently organizing data in a database.
Q. 22 Why Database Normalization is required?
Database normalization helps in Eliminating redundant data, for example, storing the same data in more than one table.
Normalization helps in Ensuring data dependencies make sense and reduce the amount of space a database consumes and ensures that data is logically stored.
#SQL #Interview #SQL_Preparation #SQL_Interview #SQL_Questions #SQL_QnA
Your Comment:
(0) Comments: