curriculum/challenges/english/blocks/quiz-bash-and-sql/66f1affc0ef4fcca423d4688.md
To pass the quiz, you must correctly answer at least 18 of the 20 questions below.
What does SQL stand for?
Standard Query Language.
Simple Quantum Language.
Sophisticated Query Language.
Structured Query Language.
Which SQL command is used to create a new database?
BUILD DATABASE
GENERATE DATABASE
NEW DATABASE
CREATE DATABASE
What is First Normal Form (1NF)?
No redundant data.
No partial dependencies.
No transitive dependencies.
Atomic values in columns.
How do you select all columns from a table?
SELECT []
SELECT ALL
SELECT COLUMNS
SELECT *
What does FOREIGN KEY establish?
A unique identifier key.
A primary key.
A null constraint.
A relationship between tables.
What is the purpose of normalization in SQL?
Speed up queries.
Increase storage space.
Add more indexes.
Reduce data redundancy.
What is the best defense against SQL injection?
Remove all user input.
Disable SQL access.
Remove database access.
Use prepared statements.
Which command modifies existing table data?
MODIFY
CHANGE
ALTER
UPDATE
In a junction table, what do you typically include?
Only foreign keys.
Only timestamps.
Only primary keys.
Foreign keys and additional data.
What command adds new data to a table?
ADD
PUT
NEW DATA
INSERT
Which key can have duplicate values?
Primary Key.
Unique Key.
Composite Key.
Foreign Key.
What does Third Normal Form (3NF) eliminate?
Multi-Valued Dependencies.
Partial Dependencies.
All Dependencies.
Transitive Dependencies.
How do you filter SQL results?
FILTER
SORT
TAGS
WHERE
What is the primary characteristic of the N+1 problem in SQL?
Executing one large, complex query and sending it back to the server.
A query that returns too much data at once but sorts it alpabetically.
Using too many JOINs in a single query and returning too much data.
Executing one initial query followed by N additional queries for related data.
Which of the following is a key difference between a Super Key and a Candidate Key?
A Super Key cannot contain multiple attributes or columns, while a Candidate Key can.
A Candidate Key must be a single column and cannot be a composite key, while a Super Key can be composite.
A Super Key is chosen by the database administrator and it doesn't have to be unique.
A Super Key can contain extra attributes not essential for unique identification, while a Candidate Key cannot.
When normalizing, what do we call data that depends on only part of a composite key?
Transitive Dependency.
Multi-Valued Dependency.
Functional Dependency.
Partial Dependency.
In Bash, what is the primary purpose of the > operator?
To append output to a file and create a copy in tmp.
To read input from a file and encode it.
To compare two files for differences and print the differences.
To redirect standard output to a file, overwriting the file if it exists.
What does the wc -l command do?
Counts the number of words in a file.
Counts the number of characters in a file.
Lists all files in the current directory.
Counts the number of lines in a file.
In a Bash script, how can you access the first argument passed to it?
$ARG1
$0
$#
$1
In a many-to-many relationship between students and courses, what does the junction table contain?
Only student IDs.
Only Course IDs.
Full student and course details.
Both IDs and Enrollment date.