Protect Your Database IDs in Rails with UUID

For most backend developers, protecting the database from hackers is at the top of the priority list. All it takes is one bad actor getting access to information they shouldn’t have, and you’re screwed.

In SQL databases, one potential vulnerability is the fact that in many databases, the primary key, or ID, for each data entry is just an integer that increments by 1. So if a hacker wants to access some random record, they can just try random integers and see what happens.