DAY 22 MySQL: Constraints, Normalization (9th JULY 24)
Quiz
•
Professional Development
•
University
•
Hard
KVCH CORPORATE
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query adds a primary key constraint to the 'id' column
in the 'students' table?
ALTER TABLE students ADD CONSTRAINT PRIMARY
KEY (id);
ALTER TABLE students ADD PRIMARY KEY (id);
UPDATE TABLE students SET PRIMARY KEY (id);
MODIFY TABLE students SET PRIMARY KEY (id);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query creates a table 'enrollments' with a foreign key
constraint referencing 'students' ?
CREATE TABLE enrollments (student_id INT, course_id
INT, FOREIGN KEY (student_id) REFERENCES
students(id));
CREATE TABLE enrollments (student_id INT, course_id
INT, SET FOREIGN KEY (student_id) TO students(id));
CREATE TABLE enrollments (student_id INT, course_id
INT, ADD FOREIGN KEY (student_id) REFERENCES
students(id));
CREATE TABLE enrollments (student_id INT, course_id
INT, ADD CONSTRAINT FOREIGN KEY (student_id)
REFERENCES students(id));
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query removes a unique constraint from the 'email'
column in the 'students' table?
ALTER TABLE students DROP UNIQUE (email);
ALTER TABLE students REMOVE UNIQUE (email);
ALTER TABLE students DELETE UNIQUE (email);
ALTER TABLE students DROP CONSTRAINT UNIQUE
(email);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query sets a default value of 'Active' for the 'status'
column in the 'students' table?
ALTER TABLE students SET DEFAULT 'Active' FOR
status;
ALTER TABLE students CHANGE DEFAULT 'Active' FOR
status;
ALTER TABLE students MODIFY status SET DEFAULT
'Active';
ALTER TABLE students ALTER COLUMN status SET
DEFAULT 'Active';
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query ensures that the 'age' column in the 'students'
table cannot have null values?
ALTER TABLE students SET NOT NULL (age);
ALTER TABLE students MODIFY age NOT NULL;
ALTER TABLE students ALTER COLUMN age SET NOT
NULL;
ALTER TABLE students UPDATE age SET NOT NULL;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which normalization form ensures that all non-key attributes
are fully functional dependent on the primary key?
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which query removes the foreign key constraint from the
'student_id' column in the 'enrollments' table?
ALTER TABLE enrollments DROP FOREIGN KEY
(student_id);
ALTER TABLE enrollments REMOVE FOREIGN KEY
(student_id);
ALTER TABLE enrollments DROP CONSTRAINT
FOREIGN KEY (student_id);
ALTER TABLE enrollments DROP CONSTRAINT
student_id;
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
TLC Unit 6: Basics of Instruction
Quiz
•
9th Grade - Professio...
10 questions
Inclusive Education
Quiz
•
University
10 questions
Close Reading
Quiz
•
KG - University
11 questions
Kuis Antikorupsi
Quiz
•
University - Professi...
15 questions
Pamuk şekeri
Quiz
•
University
10 questions
TEACHING PROFESSION
Quiz
•
University
10 questions
IDP - Instructor Qualities
Quiz
•
University - Professi...
10 questions
The NSTP Law
Quiz
•
University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Professional Development
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
