Q13
1 markMCQSection A

Which of the following SQL command can change the degree of the existing relation ?

Structured Query Language (SQL)
SQL DDL - ALTER TABLE

Options

(A)DROP TABLE
(B)ALTER TABLE
(C)UPDATE...SET
(D)DELETE
Official Answer

Correct option: (B) ALTER TABLE


ALTER TABLE is the only DDL command among the options that can add or drop a column, thereby changing the degree (number of attributes) of an existing relation.

degree of relationALTER TABLEDDL commandsadd columndrop columnSQL schema modification

Marking Scheme

  • 11 mark: correct option (B) ALTER TABLE selected.

Hint

Degree = number of columns; only a structural (DDL) command that adds/removes a column changes it.

Quick Oral Answer

ALTER TABLE changes a table's structure by adding or dropping columns, which directly changes the degree (number of attributes) of the relation.

Analysis & Explanation

Degree of a relation refers to the number of attributes (columns) in it, so only a command that changes the table's structure — not just its data — can change the degree.


Why (B) is correct

  • ALTER TABLE ... ADD COLUMN increases the degree by one; ALTER TABLE ... DROP COLUMN decreases it by one.
  • It directly modifies the schema (structure) of the table.

Why the other options are wrong

  • (A) DROP TABLE removes the entire table (both structure and data) rather than changing its degree.
  • (C) UPDATE...SET modifies the values of existing rows; it is a DML command and does not touch the table's structure.
  • (D) DELETE removes rows (tuples), which changes the cardinality of the relation, not its degree.

Common Mistakes

  1. 1Confusing DELETE (removes rows, changes cardinality) with a command that changes degree (columns).
  2. 2Thinking DROP TABLE changes the degree instead of eliminating the table altogether.

Interesting Facts

The 'degree' and 'cardinality' of a relation are classic relational-algebra terms: degree = number of columns, cardinality = number of rows — CBSE frequently tests this pair together.

ALTER TABLE is part of SQL's Data Definition Language (DDL), the same category as CREATE TABLE and DROP TABLE, all of which modify database structure rather than data.

Spotted a mistake or something unclear?

Tell us — we fix reported answers fast.

Frequently Asked Questions

What is the difference between degree and cardinality of a relation?

Degree is the number of attributes (columns) in a relation, while cardinality is the number of tuples (rows). ALTER TABLE changes degree by adding/dropping columns; INSERT/DELETE change cardinality by adding/removing rows.

Is ALTER TABLE a DDL or DML command?

ALTER TABLE is a Data Definition Language (DDL) command because it modifies the structure (schema) of a database object, unlike DML commands such as INSERT, UPDATE, and DELETE which operate on data.