PGCP-ITISSCMCE (CCE Modules Exam)•32 Questions
Programming Concepts: Python and MySQL Practice MCQs
Topic Covered in this Question Set
MySQL Database Design, Schemas and Data Definition
Click on an option to check your answer immediately. Full solution & explanation provided for every question.
Interactive Practice Mode
Programming Concepts: Python and MySQL Free MCQs
Select an option to test your knowledge with real exam questions and instant explanations.
Total32
Correct0
Wrong0
Progress: 0 of 32 answered0% Accuracy
Q1 of 32
A company uses MySQL to store employee records in company_db. Which description correctly separates these terms?
Q2 of 32
A newly created table has six columns and no rows. What are its degree and cardinality?
Q3 of 32
Which statement about CREATE SCHEMA and CREATE DATABASE is correct in MySQL?
Q4 of 32
Each department has many employees, while each employee belongs to at most one department. Where should the department reference normally be stored?
Q5 of 32
An employee may have several independently managed phone numbers. Which design best represents this?
Q6 of 32
An order line is identified by an order ID together with a line number that repeats across orders. Which explanation fits?
Q7 of 32
Which declaration can identify an employee–project assignment without preventing either side from appearing in other assignments?
Q8 of 32
Which requirement distinguishes a candidate key from an arbitrary superkey?
Q9 of 32
A table declares PRIMARY KEY (employee_id, project_id). Which pair can be added when (101, 7) already exists, assuming both referenced parents exist?
Q11 of 32
An employee table allows department_id to be NULL and references department. Which insertion is valid, assuming all other column rules are satisfied?
Q12 of 32
Two employees belong to department 10. Must their department_id values differ?
Q13 of 32
Which type is most appropriate for an exact amount requiring two decimal places?
Q15 of 32
Why is a phone number such as 0012345 often stored as VARCHAR instead of INT?
Q16 of 32
Which practice remains safe across MySQL installations with different operating systems and configurations?
Q17 of 32
A nullable email column has UNIQUE. What happens when two different rows omit email and receive NULL?
Q18 of 32
A nullable status column has DEFAULT 'active'. An INSERT explicitly supplies NULL for status. What does the default alone require?
Q19 of 32
On modern MySQL with an enforced CHECK (salary >= 0), salary is nullable. Which input violates this check?
Q21 of 32
After CREATE DATABASE company_db, which statement selects it for unqualified table names in the current connection?
Q23 of 32
A table uses an integer primary key and a nullable foreign key. Which condition necessarily prevents inserting a new row?
Q24 of 32
Deleting department 10 succeeds under ON DELETE CASCADE. Which employees are affected by that referential action?
Q25 of 32
A design requires ON DELETE SET NULL on a department foreign key. Which column rule conflicts with that action?
Q26 of 32
A parent identifier changes under ON UPDATE CASCADE. What should happen to its matching child references?
Q27 of 32
Which statement is most useful for verifying the actual named foreign-key definition of employee?
Q28 of 32
CREATE TABLE employee_copy LIKE employee succeeds. Which conclusion is correct in MySQL?
Q29 of 32
The name column must allow 120 characters while remaining mandatory. Which command expresses this?
Q30 of 32
Adding UNIQUE(email) to an existing table fails because two non-NULL emails are identical. What explains the failure?
Q31 of 32
Which operation removes a column's stored values while retaining the employee table and its other columns?
Need to review the concepts?
Read Free Study Notes →Read Programming Concepts: Python and MySQL Study Notes
Review complete topic notes, syntax guides, code examples, and summary tables.