MySQL – Creating Databases and Tables MCQ

MySQL – Creating Databases and Tables MCQ

1 / 25

1. What is the primary purpose of creating a database in MySQL?

2 / 25

2. How can you create a new database in MySQL using SQL commands?

3 / 25

3. Which of the following is NOT a recommended database naming convention in MySQL?

4 / 25

4. What is the primary purpose of creating tables in MySQL?

5 / 25

5. Which SQL command is used to create a new table in MySQL?

6 / 25

6. What should you consider when choosing table names in MySQL?

7 / 25

7. What are the primary components of defining a table in MySQL?

8 / 25

8. Which attribute is used to ensure each row has a unique identifier in a table?

9 / 25

9. What is the purpose of a primary key in a MySQL table?

10 / 25

10. What is the purpose of using AUTO_INCREMENT for a column in MySQL?

11 / 25

11. Which SQL command is used to add a foreign key constraint to a table in MySQL?

12 / 25

12. What is the primary use of foreign keys in MySQL?

13 / 25

13. What is an index in a MySQL table?

14 / 25

14. Why is it important to implement indexes in a MySQL table?

15 / 25

15. What is a typical use case for a UNIQUE constraint in MySQL?

16 / 25

16. What is the purpose of the AUTO_INCREMENT attribute in MySQL?

17 / 25

17. How can you create a foreign key constraint in a MySQL table?

18 / 25

18. What should you consider when defining column names in a MySQL table?

19 / 25

19. What is the primary purpose of using indexes in a MySQL table?

20 / 25

20. When defining a table in MySQL, what is a recommended practice for column names?

21 / 25

21. What is the role of a primary key in a MySQL table?

22 / 25

22. Which SQL command is used to create an index on a column in a MySQL table?

23 / 25

23. What is the purpose of creating relationships between tables in MySQL?

24 / 25

24. In which SQL command would you define the structure of a new MySQL table?

25 / 25

25. What is the primary purpose of defining constraints in a MySQL table?

Your score is

0%