Which of the following is used to create a database schema?

2021

Which of the following is used to create a database schema?

  1. A.

    DML

  2. B.

    DDL

  3. C.

    HTML

  4. D.

    XML

Attempted by 1670 students.

Show answer & explanation

Correct answer: B

Answer: Data Definition Language (DDL) is used to create and modify database schemas.

Key DDL commands:

  • CREATE TABLE — defines a new table and its columns, data types, and constraints.

  • ALTER TABLE — modifies an existing table structure (add/drop columns, change data types, add constraints).

  • DROP TABLE — removes a table and its schema from the database.

Why the other choices are incorrect:

  • DML is for working with the data inside tables (SELECT, INSERT, UPDATE, DELETE), not for defining table structures.

  • HTML is a markup language for web pages and does not define database schemas.

  • XML is a general-purpose data representation format. It can describe structured data but is not the DDL used to create schemas in relational database systems.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor