Q.Write the full form of the following abbreviations:
🔒You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
🔒 Start your 14-day free trial to unlock the full solution →Concept understanding — SQL DDL and DML Command Categories
SQL commands are grouped into categories by their purpose. Data Definition Language (DDL) commands such as CREATE, ALTER and DROP define and modify the structure of database objects like tables. Data Manipulation Language (DML) commands such as INSERT, UPDATE, DELETE and SELECT work with the data stored inside those tables. Recog …
Concept: Database language categories in SQL
SQL commands are organized into sublanguages based on their function. Two fundamental categories handle different aspects of database management.
Essential reasoning:
- DDL stands for commands that define and modify the structure (schema) of database objects like tables, indexes, and constraints — operations such as
CREATE,ALTER,DROP. …
Database command languages are classified by their function: DDL stands for Data Definition Language and DML stands for Data Manipulation Language.
Database management systems organize commands into distinct categories based on what they do. Understanding these categories helps you grasp how databases are structured versus how data within them is actually used.
Data Definition Language (DDL) handles the skeleton of your database. It defines the structure—creating tables, altering their schema, setting up constraints, and establishing relationships. When you need to build or modify the architecture itself, you're working with DDL. Common DDL commands include CREATE, ALTER, DROP, and TRUNCATE.
Data Manipulation Language (DML), on the other hand, works with the actual data inside those structures. Once your tables exist, DML lets you insert records, update values, delete entries, and retrieve information. The classic DML commands are SELECT, INSERT, UPDATE, and DELETE. …
- CBSE 2026Set 91/41 markMCQQ.Which of the following SQL command can change the degree of the existing relation ? (A) DROP TABLE (B) ALTER TABLE (C) UPDATE…SET (D) DELETE
›Reveal solutionSolution
The degree of a relation is the number of attributes (columns) it has. To change the degree, you must add or remove a column. The SQL command that adds or drops columns is
ALTER TABLE. So the correct option is (B).
The concept: degree of a relation
In relational database terminology, the degree of a relation (table) is simply the number of attributes (columns) it contains. For example, a
Studenttable with columnsRollNo,Name,Agehas degree 3.If you want to change the degree, you must either add a new column (increasing the degree) or remove an existing column (decreasing the degree). This is a structural change to the table schema — not a change to the data inside the table.
Why each option does or doesn't change the degree
Let's examine each SQL command:
-
DROP TABLE— This removes the entire table from the database. It doesn't change the degree of an existing relation; it destroys the relation itself. So this is not about altering degree. -
ALTER TABLE— This command is specifically designed to modify the structure of an existing table. You can use it with clauses like:ADD column_name datatype— adds a new column, increasing the degree.DROP COLUMN column_name— removes an existing column, decreasing the degree.
Therefore,
ALTER TABLEcan directly change the degree of a relation. -
UPDATE…SET— This modifies the values of existing rows in a table. It changes the content of cells, but it never adds or removes columns. The degree remains exactly the same. -
DELETE— This removes rows (tuples) from a table. It changes the cardinality (number of rows), but not the degree. The column structure is untouched. …
-
- CBSE 2025Set 91/41 markMCQQ.Which of the following is a DML command in SQL ? (A) UPDATE (B) CREATE (C) ALTER (D) DROP
›Reveal solutionSolution
DML (Data Manipulation Language) commands handle data inside tables — UPDATE is the only DML command here; CREATE, ALTER, and DROP are DDL (Data Definition Language) commands that deal with the structure of the database itself.
The key to this question is understanding the four categories of SQL commands: DDL, DML, DCL, and TCL. Most exam questions test whether you can tell apart DDL (structure-changing) from DML (data-changing).
DDL (Data Definition Language) commands define or modify the schema — the structure of tables, databases, indexes, etc. They include
CREATE,ALTER,DROP,TRUNCATE,RENAME. These commands auto-commit and cannot be rolled back in most databases.DML (Data Manipulation Language) commands work on the data inside existing tables — inserting, updating, deleting, or retrieving rows. The classic DML commands are
SELECT,INSERT,UPDATE,DELETE. Some exams also includeMERGE(upsert) andCALL(for procedures) as DML, but the core four are what matter here.Watch outA very common mistake: students think
SELECTis not DML because it doesn't "change" data. But in standard SQL,SELECTis classified as DML — it manipulates (retrieves) data. However, for this question,SELECTisn't even an option, so the confusion doesn't arise.Now let's check each option:
- Option (A): UPDATE — This modifies existing rows in a table. It changes data values, not the table structure. This is a classic DML command. ✓ …
- CBSE 2024Set 91/41 markMCQQ.Which of the following is not a DDL command in SQL? (A) DROP (B) CREATE (C) UPDATE (D) ALTER
›Reveal solutionSolution
DDL (Data Definition Language) commands define database structure, not manipulate data. UPDATE modifies existing records and belongs to DML, making (C) the answer.
Understanding DDL vs DML in SQL
SQL commands fall into distinct categories based on their purpose. Data Definition Language (DDL) commands deal with the structure and schema of database objects—tables, indexes, views, and so on. They define what exists in the database, not the data itself.
When you create a table, drop it, or alter its columns, you're changing the blueprint. These structural operations are DDL. In contrast, Data Manipulation Language (DML) commands work with the actual data inside those structures—inserting rows, updating values, deleting records, or querying them.
The distinction matters because DDL commands typically auto-commit (changes are permanent immediately) and affect metadata, while DML commands operate on data and can be rolled back within transactions.
Examining each command
-
DROP – Removes an entire database object (table, view, index) from the schema. This is pure structure manipulation:
DROP TABLE employees;deletes the table definition itself, along with all its data. Clearly DDL. -
CREATE – Defines a new database object. Whether
CREATE TABLE,CREATE INDEX, orCREATE VIEW, you're building structure. The quintessential DDL command. …
-
- CBSE 2023Set 91/41 markMCQQ.Fill in the blank : _________ statement of SQL is used to insert new records in a table.(a) ALTER(b) UPDATE(c) INSERT(d) CREATE
›Reveal solutionSolution
The
INSERTstatement is used to add new records (rows) to a table in SQL, making option (c) the correct choice.The question asks about the specific SQL statement used to add new records into a table. To understand this, we need to recall the fundamental categories of SQL commands: Data Definition Language (DDL) and Data Manipulation Language (DML).
DDL commands are used to define and manage the database schema or structure. Think of them as commands that build or modify the "blueprint" of your database, like creating tables, altering their structure, or dropping them entirely.
DML commands, on the other hand, are used to manage the data within those defined structures. These are the commands you use to interact with the actual information stored in your tables—adding new data, changing existing data, or removing data.
The task of adding new records clearly falls under manipulating the data, not defining the structure. Therefore, we are looking for a DML command.
-
Understand the Goal: The objective is to add new rows or records to an existing table. This means we are dealing with the content of the table, not its structure.
-
Evaluate Option (a) ALTER:
The
ALTERstatement is a DDL command. It is used to modify the structure of an existing database object, such as adding a new column to a table, dropping an existing column, or changing the data type of a column. It does not insert new data rows.For example:
ALTER TABLE Employees ADD COLUMN Email VARCHAR(100); -
Evaluate Option (b) UPDATE:
The
UPDATEstatement is a DML command. It is used to modify existing records in a table. If you want to change the value in one or more columns for rows that already exist, you useUPDATE. It does not create new rows.For example:
UPDATE Employees SET Salary = 60000 WHERE EmployeeID = 101;Watch outA common mistake is to confuse
UPDATEwithINSERT. Remember,UPDATEchanges data in existing rows, whileINSERTadds new rows. -
Evaluate Option (c) INSERT: …
-
- CBSE 2020Set 91/D1 markQ.Which SQL command is used to add a new attribute in a table?
›Reveal solutionSolution
To add a new column (attribute) to an existing table, use the
ALTER TABLEcommand with theADDclause. The syntax isALTER TABLE table_name ADD column_name datatype;.Why ALTER TABLE?
When you create a table using
CREATE TABLE, you define its initial structure—the columns, their data types, constraints, and so on. But database schemas evolve. You might realize later that you need to store additional information: perhaps a phone number column in a customer table, or a timestamp for when records were last modified.SQL provides the
ALTER TABLEcommand specifically for modifying the structure of existing tables. Think of it as the "edit mode" for your table's blueprint. Among its various capabilities—renaming columns, dropping columns, changing data types—theADDclause lets you introduce new attributes without losing any existing data.The ADD Clause in Action
The basic syntax is straightforward:
ALTER TABLE table_name ADD column_name datatype [constraints];Here's what happens step by step:
-
Identify the table:
ALTER TABLEtargets the specific table you want to modify. -
Specify the operation: The
ADDkeyword tells the database you're introducing a new column, not removing or changing an existing one. -
Define the new attribute: You provide the column name, its data type (like
VARCHAR(50),INT,DATE), and optionally any constraints (NOT NULL,DEFAULT value, etc.). -
Execution: The database adds the column to every row. For existing rows, the new column is populated with
NULL(unless you specify aDEFAULTvalue).
Example …
-
- CBSE 2020Set 91/D1 markQ.Write the full form of the following abbreviations:(i) DDL(ii) DML
›Reveal solutionSolution
Database command languages are classified by their function: DDL stands for Data Definition Language and DML stands for Data Manipulation Language.
Database management systems organize commands into distinct categories based on what they do. Understanding these categories helps you grasp how databases are structured versus how data within them is actually used.
Data Definition Language (DDL) handles the skeleton of your database. It defines the structure—creating tables, altering their schema, setting up constraints, and establishing relationships. When you need to build or modify the architecture itself, you're working with DDL. Common DDL commands include
CREATE,ALTER,DROP, andTRUNCATE.Data Manipulation Language (DML), on the other hand, works with the actual data inside those structures. Once your tables exist, DML lets you insert records, update values, delete entries, and retrieve information. The classic DML commands are
SELECT,INSERT,UPDATE, andDELETE. …
🎓Unlock everything free for 14 days
- ✓Full step-by-step solutions
- ✓Concept-first explanations
- ✓Methods, shortcuts & mistakes
- ✓PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.