0% found this document useful (0 votes)
14 views

exam

The document contains multiple-choice and descriptive questions related to SQL concepts. Key topics include types of joins, window functions, normalization and denormalization, and definitions of SQL Server and RDBMS. It also briefly mentions the ORDER BY clause.

Uploaded by

nishita6978
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

exam

The document contains multiple-choice and descriptive questions related to SQL concepts. Key topics include types of joins, window functions, normalization and denormalization, and definitions of SQL Server and RDBMS. It also briefly mentions the ORDER BY clause.

Uploaded by

nishita6978
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

MCQ :

ANSWER 1 - C. to aggregate data based on a column

ANSWER 2 - A .

ANSWER 3 - B. EXISTS OPERATOR

ANSWER 4 – A. Truncate frees the table space while delete does not

ANSWER 5 - D. 4

--------------------------------------------------------------------------------------------------------------------------------------

DESCRIPTIVE QUESTIONS :

ANSWER 1 -

Joins is used to combine rows from two or more tables based on a related column between them .

Types of Joins :

1.INNER JOIN

2.OUTER JOIN

3.LEFT JOIN

4.RIGHT JOIN

5.SELF JOIN

INNER JOIN :

Inner join returns only those rows that have matching values in both the tables . If there is no match ,
the row is not included (excluded) from the result .

Example :

we have table Employees with column

EmployeeID Name DepartmentID

1 A 101

2 B 102

3 C 103

4 D NULL
Departments with column

DepartmentID DepartmentName

101 IT

102 HR

103 MARKETING

QUERY -

SELECT e.Name , d.DepartmentName FROM

EMPLOYEES AS e INNER JOIN DEPARTMENTS AS d ON e.DepartmentID = d.DepartmentID

RESULT -

Name DepartmentName

A IT

B HR

C MARKETING

---------------------------------

ANSWER 2 -

Window functions: These functions perform calculations across a set of rows related to the current
row. They are different from aggregate functions (like SUM, AVG) because they return a result for
each row in the partition.

Row number: This function assigns a sequential number to each row within a partition.

------------------------------

ANSWER 3 -

Normalization: This is a database design technique that aims to organize data in a way that reduces
redundancy and improves data integrity. It involves breaking down a large table into smaller, related
tables.

Denormalization: This is the process of adding redundancy to a database by combining multiple


tables into a single table. This can improve performance in some cases but can lead to data
inconsistencies.
Types of Normalization:

First Normal Form (1NF): Each column should contain only one value and should not have repeating
groups.

Second Normal Form (2NF): Every non-key column must depend on the whole primary key.

Third Normal Form (3NF): Every non-key column must depend only on the primary key and not on
any other non-key column.

--------------------------------

ANSWER 4 -

SQL SERVER :

SQL Server is a relational database management system (RDBMS) developed by Microsoft. It is used
for storing and retrieving data in a structured format.

RDBMS :

RDBMS stands for Relational Database Management System. It is a type of database management
system that organizes data into tables with rows and columns. Relationships between tables are
defined using keys.

NESTED QUERIES :

----------------------

ANSWER 5 -

ORDER BY CLAUSE :

Order by clause

You might also like