chore(curriculum): audit bash and sql quiz (#61642)

This commit is contained in:
Zaira 2025-08-05 20:10:51 +05:00 committed by GitHub
parent a57e4e33b4
commit 99692d7efa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -303,45 +303,45 @@ How do you filter SQL results?
#### --text--
What happens to child records when implementing `ON DELETE CASCADE`?
What is the primary characteristic of the N+1 problem in SQL?
#### --distractors--
They become null.
Executing one large, complex query and sending it back to the server.
---
They are archived.
A query that returns too much data at once but sorts it alpabetically.
---
They are orphaned.
Using too many JOINs in a single query and returning too much data.
#### --answer--
They are automatically deleted.
Executing one initial query followed by N additional queries for related data.
### --question--
#### --text--
What is the `COALESCE` function used for?
Which of the following is a key difference between a Super Key and a Candidate Key?
#### --distractors--
Removing duplicates.
A Super Key cannot contain multiple attributes or columns, while a Candidate Key can.
---
Counting Null Values.
A Candidate Key must be a single column and cannot be a composite key, while a Super Key can be composite.
---
Combining Tables.
A Super Key is chosen by the database administrator and it doesn't have to be unique.
#### --answer--
Returning first non-null value.
A Super Key can contain extra attributes not essential for unique identification, while a Candidate Key cannot.
### --question--
@ -369,67 +369,67 @@ Partial Dependency.
#### --text--
What's the main risk of using `SELECT *` in production code?
In Bash, what is the primary purpose of the `>` operator?
#### --distractors--
SQL injection vulnerability.
To append output to a file and create a copy in `tmp`.
---
Slower query performance.
To read input from a file and encode it.
---
Database crashes.
To compare two files for differences and print the differences.
#### --answer--
Breaking code when columns change.
To redirect standard output to a file, overwriting the file if it exists.
### --question--
#### --text--
How do you typically store a password in a database?
What does the `wc -l` command do?
#### --distractors--
As an encrypted string.
Counts the number of words in a file.
---
As base64 encoded text.
Counts the number of characters in a file.
---
As a plain text.
Lists all files in the current directory.
#### --answer--
As a salted hash.
Counts the number of lines in a file.
### --question--
#### --text--
What's the purpose of an index on a foreign key?
In a Bash script, how can you access the first argument passed to it?
#### --distractors--
Ensure data integrity.
`$ARG1`
---
Save Storage Space.
`$0`
---
Prevent Null Values.
`$#`
#### --answer--
Speed Up Join Operations.
`$1`
### --question--