MCQs / Computer Science / Supabase: Cloud Data Tier for Android

Supabase: Cloud Data Tier for Android MCQs — Computer Science (page 2)

35 multiple-choice questions on Supabase: Cloud Data Tier for Android from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

26. To delete event 42 the app sends:

  1. DELETE /rest/v1/events?id=eq.42
  2. GET /rest/v1/events?delete=42
  3. PATCH /rest/v1/events?id=42&remove
  4. POST /rest/v1/delete/42

Answer: A) DELETE /rest/v1/events?id=eq.42

Explanation: Filters select the rows to delete.

Discuss this question

27. Why are the project URL and key read from local.properties through BuildConfig?

  1. Because XML cannot store strings
  2. Because Retrofit requires it
  3. To keep them out of source control
  4. To make the APK smaller

Answer: C) To keep them out of source control

Explanation: local.properties is not committed to Git.

Discuss this question

28. A JWT has three parts separated by dots. They are:

  1. URL, key, password
  2. User, table, row
  3. Request, response, status
  4. Header, payload, signature

Answer: D) Header, payload, signature

Explanation: The signature proves the token was issued by the server.

Discuss this question

29. Which key is safe to ship inside an Android app?

  1. The secret key (sbsecret…)
  2. The database password
  3. The publishable key (sbpublishable…)
  4. The servicerole key

Answer: C) The publishable key (sbpublishable…)

Explanation: The publishable key only identifies the project; RLS controls access.

Discuss this question

30. The "data" object sent with sign-up is stored as the user's:

  1. usermetadata
  2. refresh token
  3. RLS policy
  4. primary key

Answer: A) usermetadata

Explanation: Profile fields such as fullname go into usermetadata.

Discuss this question

31. Which header makes an insert return the saved row?

  1. apikey: return
  2. Cache-Control: no-cache
  3. Accept: text/html
  4. Prefer: return=representation

Answer: D) Prefer: return=representation

Explanation: Without it, an insert returns an empty 201 response.

Discuss this question

32. A public table WITHOUT RLS is risky because:

  1. It disables Auth
  2. It cannot be queried at all
  3. Anyone with the publishable key can read and change it
  4. It is deleted after 7 days

Answer: C) Anyone with the publishable key can read and change it

Explanation: Always enable RLS on tables exposed through the API.

Discuss this question

33. A key difference between Supabase and Firebase Firestore is that Supabase is:

  1. Only for iOS
  2. Relational (SQL tables)
  3. NoSQL documents only
  4. Not usable from Android

Answer: B) Relational (SQL tables)

Explanation: Supabase = PostgreSQL; Firestore = NoSQL documents.

Discuss this question

34. Where would you keep event poster images in Supabase?

  1. In SharedPreferences
  2. Storage buckets
  3. Inside the access token
  4. In the publishable key

Answer: B) Storage buckets

Explanation: Storage holds files in buckets.

Discuss this question

35. In Java, calling a Retrofit Call with enqueue(callback):

  1. Runs the request on a background thread and delivers the answer to the callback on the main thread
  2. Blocks the main thread until the response arrives
  3. Needs AsyncTask
  4. Only works in Kotlin

Answer: A) Runs the request on a background thread and delivers the answer to the callback on the main thread

Explanation: enqueue() is asynchronous; execute() is synchronous and must never run on the main thread.

Discuss this question

Previous Page 2 of 2

Practise Supabase: Cloud Data Tier for Android MCQs

More Computer Science chapters