Choosing Between UUIDs and Serial Values for Database Primary Keys
UUIDs vs Serial values for Primary Keys/row identifiers in a database ?

What is UUID ?
> Short for Universally Unique Identifier
> 36-character alphanumeric string
> Often used to identify rows of data within a database table, with each row assigned a specific UUID
> Example of a UUID: acde070d-8c4c-4f0d-9d8a-162843c10333
What is Serial value in Database ?
> A simple autoincremented sequence starting from 1 for first row, 2 for second row & so on
What Is The Problem With Serial Value As Primary Key?
> Consider a ecommerce database with Orders table where order_id as row identifier. Having a serial value for order_id makes it easier to guess the next value > A REST API call /orders/<order_id> easily becomes vulnerable to attacks
Using UUID solves this problem by uniquely identifying each row with a randomly generated 36 character string make is impossible to guess the other data rows.
What Are The Challenges In Using UUID As Primary Key ?
Using UUIDs does have it's own challenges such as
> More storage required & hence using it for storage critical apps can be an issue > Indexing will take longer

