Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1SELECT * FROM students WHERE house = 'Red'; | AA query sent to the database server, which searches the stored students table and returns only the matching rows | |
| 2db_server = "db.school.local" | BThe database is stored on the database server, not the web server. The web server only sends queries and uses the results. | |
| 3A database server returns query results to the program that asked, such as a web server | CUsers do not connect directly to the database server. The web server sends queries on their behalf, which keeps the stored data protected. | |
| 4A database server protects stored data by only letting programs with the right login connect | DThe address of a database server, kept separate from the web server so the web app knows where to send its queries | |
| 5The web server stores the database, so the database server is not needed. | Edb.connect(user="webapp", password="s3cret") | |
| 6A user's browser connects straight to the database server and reads the tables. | Frows = db.execute("SELECT name FROM products") |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
database server — A computer or program that stores a database and answers queries sent by other programs, such as a web server, by returning the matching data while keeping the stored data protected.SELECT firstName, house FROM students;GRANT SELECT ON students TO web_user;SELECT name, price FROM products
WHERE stock = 0;REVOKE DELETE ON students FROM web_user;SELECT firstName, points FROM students
WHERE points > 100
ORDER BY points DESC;