Unit2 - Subjective Questions

INT306 • Practice Questions with Detailed Answers

1

What is Data Definition Language (DDL)? Explain its primary commands with their syntax.

2

Differentiate between the DROP and TRUNCATE commands in SQL.

3

Explain the ALTER TABLE command and discuss how it can be used to add, modify, and drop columns.

4

Define Data Manipulation Language (DML). Distinguish between procedural and non-procedural DML.

5

Describe the core DML commands (INSERT, UPDATE, DELETE) with examples.

6

Compare and contrast the DELETE and TRUNCATE commands in SQL.

7

What is Data Control Language (DCL)? Explain its two main commands.

8

Discuss Transaction Control Language (TCL) and explain its primary commands: COMMIT, ROLLBACK, and SAVEPOINT.

9

Explain the concept of database integrity. What are the three main types of integrity constraints?

10

Define Referential Integrity and explain how it is enforced in SQL using Foreign Keys.

11

Explain the CHECK and DEFAULT constraints with SQL syntax examples.

12

What is the difference between the UNIQUE and NOT NULL constraints? Can they be used together?

13

Define and differentiate between Super Key, Candidate Key, and Primary Key in a relational database.

14

What is a Foreign Key? Explain its significance with an example.

15

Differentiate between a Primary Key and a Unique Key constraint.

16

Explain the concepts of Alternate Key and Composite Key.

17

Describe the basic structure of an SQL query using SELECT, FROM, and WHERE. Explain the logical order of execution.

18

Discuss the five basic aggregate functions in SQL with their purposes.

19

Explain the use of GROUP BY and HAVING clauses in SQL with a practical example.

20

What are SQL aliases? Explain column aliases and table aliases with syntax.