74
Views
2
Comments
Solved
Normalized API

Hi all!

Can someone explain what is the difference between normalized and denormalized API?

Thank you in advance

2022-04-19 13-20-22
Andrea Lembo
Solution

Hi,

I try to describe the two types with starting with a scenario:

-I need to retrieve a user's information through an exposed API. The user has several related entities ( Work experience,education,hobbies)

In a normalized API,I have multiple endpoint foreach set of information:

  1. /api/user/{:id}
  2. /api/user/{:id}/work
  3. /api/user/{:id}/education
  4. /api/user/{:id}/hobbies

To retrieve all the information the client must execute four different api invoke.

In a denormalized API, i have a single endpoint that assemble all the need information:

  1. /api/user/{:id}/detail

To retrieve all the information the must execute one api invoke.

The typical usage for denormalized api is when the client is an enduser layer (web or mobile).


DISCLAIMER : This is a basic example with a basic explaination the "Normalize/Denormalize" topic is bigger than his.


Br,

AL

2022-05-29 13-15-09
Valentyna Boiko

Thank you, Andrea

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.