Module quiz: SQL Data in React Native :Working with Data (Meta React Native Specialization) Answers 2025
1. Question 1
Best place to load AsyncStorage data on startup:
❌ Inside render
✔️ Inside a useEffect hook with no dependencies
❌ In a separate file
2. Question 2
What is incorrect?
✔️ You can’t use multiGet to get a simple value.
✔️ The function does not handle any errors.
✔️ The argument passed to multiGet is the incorrect type.
(All are correct issues.)
3. Question 3
API that removes all AsyncStorage data:
❌ removeItem
✔️ clear
❌ multiRemove
4. Question 4
Difference between mergeItem and setItem:
❌ There is no difference
✔️ With setItem you need to pass the whole value again, whereas with mergeItem only the updated path is needed.
❌ With mergeItem you need to pass the whole value again…
5. Question 5
SQLite is best for small independent data?
❌ True
✔️ False
(SQLite is best for large structured relational data.)
6. Question 6
AsyncStorage for large fast-processed data?
❌ True
✔️ False
(AsyncStorage is not good for large or fast data operations.)
7. Question 7
Best place to open Expo-SQLite database connection:
❌ In a separate file
❌ At the top of the entry file
✔️ Inside a useEffect hook with no dependencies
8. Question 8
How to handle errors in Expo-SQLite transactions?
❌ Automatically handled
✔️ By passing an error callback as the 2nd argument to db.transaction()
❌ With try/catch
9. Question 9
Best SQL to delete customer by unique ID:
✔️ delete from customers where uid = ${selectedCustomer.id}
❌ delete from customers where name = …
❌ delete from customers where dateOfBirth = …
10. Question 10
SQL keyword for parameter placeholders:
❌ INSERT
❌ !
✔️ ?
✅ Summary Table
| Q | Correct Answer |
|---|---|
| 1 | useEffect with no dependencies ✔️ |
| 2 | All three options ✔️ |
| 3 | clear ✔️ |
| 4 | setItem = full value, mergeItem = partial update ✔️ |
| 5 | False ✔️ |
| 6 | False ✔️ |
| 7 | useEffect with no dependencies ✔️ |
| 8 | Error callback ✔️ |
| 9 | delete … where uid = id ✔️ |
| 10 | ? keyword ✔️ |