Database Modeling and Design MCQs with Answers
Practice important Database Modeling and Design MCQs with answers and explanations.
Multiple Choice Questions
Q221: What does DDL stand for in the context of databases?
- A: Data Definition Language
- B: Data Development Language
- C: Data Deployment Language
- D: Data Design Language
View Answer
A
Q222: Which statement is used to create a new table in a database?
- A: Alter Table
- B: Create Table
- C: Drop Table
- D: Modify Table
View Answer
B
Q223: Which datatype is used to store variable length character data?
- A: Number
- B: VarChar2
- C: Date
- D: Integer
View Answer
B
Q224: What is the syntax to create a table named "Building" with columns bname, address, and phone number?
- A: Create Table Building (bname varchar2 (30) primary key, address varchar2 (40), phone number number (10))
- B: Create Table Building (bname varchar2 (30), address varchar2 (40), phone number number (10))
- C: Create Table Building (bname varchar2 (30), address varchar2 (40), phone number varchar2 (10))
- D: Create Table Building (bname varchar2 (30) primary key, address varchar2 (40), phone number varchar2 (10))
View Answer
A
Q225: What is the purpose of the "Alter Table" command?
- A: To delete a table
- B: To create a table
- C: To modify an existing table
- D: To rename a table
View Answer
C
Q226: Which command is used to remove a table from a database?
- A: Drop Table
- B: Create Table
- C: Alter Table
- D: Modify Table
View Answer
A
Q227: To add a new column named "rent" to the "Building" table, which DDL command should be used?
- A: Alter Table Building add (rent number (10));
- B: Drop Table Building
- C: add Column Building (rent number (10));
- D: Create Table Building add (rent number (10));
View Answer
A
Q228: Which DDL command will modify the datatype of an existing column?
- A: Alter Table
- B: Create Table
- C: Drop Table
- D: Select Table
View Answer
A
Q229: In a table creation statement, what does the "primary key" constraint ensure?
- A: Unique values for the column
- B: No null values allowed
- C: Foreign key reference
- D: Column is indexed
View Answer
A
Q230: Which statement is correct about the order of dropping tables?
- A: Drop the parent table first and then child tables
- B: Drop the child table first and then parent table
- C: Drop tables in alphabetical order
- D: Drop all tables simultaneously
View Answer
B