8.3 Data Definition Language (DDL) and Data Manipulation Language (DML) (3)

Resources | Revision Questions | Computer Science

Login to see all questions

Click on a question to view the answer

1.

Question 1

Consider a database for a library. You need to design a table to store information about books. Write the SQL DDL statements to create a table named Books with the following attributes:

  • BookID: An integer, primary key, and auto-incrementing.
  • Title: A string, with a maximum length of 255 characters.
  • Author: A string, with a maximum length of 100 characters.
  • PublicationYear: An integer.
  • Genre: A string, with a maximum length of 50 characters.
2.

Question 1: Explain why Structured Query Language (SQL) is considered the industry standard for both Data Definition Language (DDL) and Data Manipulation Language (DML). Your answer should discuss the benefits of a standardized approach.

3.

Question 2: Describe the role of SQL in Data Definition (DDL) and Data Manipulation (DML). Provide specific examples of SQL commands for each category. Explain how the standardization of SQL facilitates database management.