Bird
Raised Fist0

Which of the following is the correct syntax to update a book's author in a library system using a typical CRUD API call?

easy🧠 Conceptual Q3 of Q15
LLD - Design — Library Management System
Which of the following is the correct syntax to update a book's author in a library system using a typical CRUD API call?
AGET /books/{id} with new author data
BDELETE /books/{id} with new author data
CPOST /books/{id} with new author data
DPUT /books/{id} with new author data
Step-by-Step Solution
Solution:
  1. Step 1: Understand HTTP methods for CRUD

    PUT is used to update existing resources, GET is for reading, POST for creating, DELETE for removing.
  2. Step 2: Match updating author to HTTP method

    Updating a book's author requires PUT with new data.
  3. Final Answer:

    PUT /books/{id} with new author data -> Option D
  4. Quick Check:

    Update = PUT method [OK]
Quick Trick: PUT updates existing data, GET reads data [OK]
Common Mistakes:
MISTAKES
  • Using GET to update
  • Using DELETE with data
  • Confusing POST with update

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes