NEW
Font size
WorksheetsMySQL Quiz BSIT 3A
Total questions: 15
Worksheet time: 8mins
Instructions: Select the best answer for each question. According to the presentation, what does the 'i' stand for in the 'MySQLi' extension?
Interface
Improved
Internet
Integrated
Instructions: Select the best answer for each question. Which PHP extension is recommended if you need your project to support multiple different database systems (e.g., PostgreSQL, SQLite, SQL Server)?
MySQLi Object-Oriented
MySQLi Procedural
PDO (PHP Data Objects)
Standard MySQL Extension
Instructions: Select the best answer for each question. When inserting string values into a SQL query within PHP, how must they be treated?
They must be quoted.
They must be unquoted.
They must be capitalized.
They must be enclosed in parentheses only.
Instructions: Select the best answer for each question. Which SQL clause is used to filter records so that only those fulfilling a specific condition are retrieved?
LIMIT
ORDER BY
WHERE
GROUP BY
Instructions: Select the best answer for each question. What is the default sorting order when using the ORDER BY clause if no modifier is specified?
Descending
Random
Ascending
By Insertion Date
Instructions: Select the best answer for each question. How do you close a database connection when using PDO?
$conn->close();
mysqli_close($conn);
$conn = null;
$conn->disconnect();
Instructions: Select the best answer for each question. What is the consequence of omitting the WHERE clause in a DELETE statement?
It deletes only the last inserted record.
It deletes all records in the table.
It throws a syntax error.
It deletes the table structure itself.
Instructions: Select the best answer for each question. In the SQL statement SELECT * FROM Orders LIMIT 15, 10, what does the number 15 represent?
The number of records to return.
The offset (starting position).
The maximum ID value.
The number of columns to select.
Instructions: Select the best answer for each question. Which column attribute is used to generate a unique integer for each new record automatically?
PRIMARY KEY
NOT NULL
AUTO_INCREMENT
UNSIGNED
Instructions: Select the best answer for each question. Which of the following SQL statements correctly updates the 'lastname' of the record with id=2?
UPDATE MyGuests SET lastname='Doe' WHERE id=2
UPDATE MyGuests lastname='Doe' WHERE id=2
MODIFY MyGuests SET lastname='Doe' WHERE id=2
CHANGE MyGuests SET lastname='Doe' WHERE id=2
Instructions: Select the best answer for each question. What is the correct way to select all columns from a table named 'Employees'?
SELECT ALL FROM Employees
SELECT Employees FROM *
SELECT * FROM Employees
GET * FROM Employees
Instructions: Select the best answer for each question. Which organization currently develops, distributes, and supports MySQL?
Microsoft
Oracle Corporation
Mozilla
Instructions: Select the best answer for each question. What does the LIMIT clause help optimize in a database application?
Data Security
Database Connection Speed
Performance and Pagination
Data Consistency
Instructions: Select the best answer for each question. Which method in PDO is used to execute a SQL statement that returns no results (like INSERT, UPDATE, DELETE)?
query()
exec()
run()
execute_non_query()
Instructions: Select the best answer for each question. Why was the original 'MySQL' PHP extension deprecated?
It was too expensive.
It only worked on Windows.
It was replaced by better options (MySQLi and PDO).
It did not support SQL.
