Single-Table SQL :Using Databases with Python (Python for Everybody Specialization) Answers 2025
Question 1
Structured Query Language (SQL) is used to (check all that apply)
✅ Create a table
✅ Insert data
✅ Delete data
❌ Check Python code for errors
Explanation:
SQL manages data in databases — creating tables, inserting, updating, and deleting data — not for checking Python syntax.
Question 2
Which of these is the right syntax to make a new table?
✅ CREATE TABLE people;
❌ MAKE DATASET people;
❌ CREATE people;
❌ MAKE people;
Explanation:CREATE TABLE is the correct SQL statement to create a new table.
Question 3
Which SQL command is used to insert a new row into a table?
✅ INSERT INTO
❌ INSERT ROW
❌ ADD ROW
❌ INSERT AFTER
Explanation:INSERT INTO table_name VALUES (...) is the SQL command to add new rows to a table.
Question 4
Which command is used to retrieve all records from a table?
✅ SELECT * FROM Users
❌ RETRIEVE all FROM User
❌ SELECT all FROM Users
❌ RETRIEVE * FROM Users
Explanation:SELECT * FROM table_name returns all columns and rows from a table.
Question 5
Which keyword will cause the results of the query to be displayed in sorted order?
✅ ORDER BY
❌ GROUP BY
❌ WHERE
❌ None of these
Explanation:ORDER BY sorts query results by one or more columns, ascending (ASC) or descending (DESC).
Question 6
In database terminology, another word for table is
✅ relation
❌ field
❌ attribute
❌ row
Explanation:
In relational databases, a table is formally called a relation.
Question 7
In a typical online production environment, who has direct access to the production database?
✅ Database Administrator
❌ Developer
❌ Project Manager
❌ UI/UX Designer
Explanation:
For security and data integrity, only DBAs usually have direct access to production databases.
Question 8
Which of the following is the database software used in this class?
✅ SQLite
❌ MySQL
❌ SQL Server
❌ Oracle
❌ Postgres
Explanation:
The Python for Everybody / Coursera SQL course uses SQLite, a lightweight file-based database.
Question 9
What happens if a DELETE command is run on a table without a WHERE clause?
✅ All the rows in the table are deleted
❌ All the rows without a primary key will be deleted
❌ It is a syntax error
❌ The first row of the table will be deleted
Explanation:DELETE FROM table; without WHERE removes every record from that table.
Question 10
Which of the following commands would update a column named “name” in a table named “Users”?
✅ UPDATE Users SET name=’new name’ WHERE …
❌ Users->name = ‘new name’ WHERE …
❌ UPDATE Users (name) VALUES (‘new name’) WHERE …
❌ Users.name=’new name’ WHERE …
Explanation:UPDATE table_name SET column=value WHERE condition; is the correct syntax for updating rows.
Question 11
What does this SQL command do?
✅ It counts the rows in the table Users
❌ Adds a COUNT column
❌ Retrieves only multiple rows
❌ Syntax error
Explanation:COUNT(*) is an aggregate function that counts the total number of rows returned by a query.
🧾 Summary Table
| # | ✅ Correct Answer | Key Concept |
|---|---|---|
| 1 | Create table, Insert, Delete | SQL operations |
| 2 | CREATE TABLE people; | Table creation syntax |
| 3 | INSERT INTO | Add new row |
| 4 | SELECT * FROM Users | Retrieve all records |
| 5 | ORDER BY | Sorting query results |
| 6 | relation | Table synonym |
| 7 | Database Administrator | Access control |
| 8 | SQLite | Database used |
| 9 | All rows deleted | DELETE without WHERE |
| 10 | UPDATE Users SET name=’…’ | Update syntax |
| 11 | Counts the rows | COUNT(*) function |