UUID vs INT: What’s Better For Your Primary Key?

Details
Title | UUID vs INT: What’s Better For Your Primary Key? |
Author | Database Star |
Duration | 9:40 |
File Format | MP3 / MP4 |
Original URL | https://youtube.com/watch?v=DHtf_46OxY8 |
Description
📝 Get my free SQL Cheat Sheets: https://databasestar.mykajabi.com/lpkj-sql-cheat-sheets/?video=DHtf_46OxY8
🎓 Master SQL Fundamentals: https://databasestar.mykajabi.com/sql-simplified/?video=DHtf_46OxY8
There are two common approaches to data types for a primary key: an auto-incrementing integer, or a UUID.
In this video, I'll explain what they are, the different types of UUIDs, the pros and cons of each approach, and demonstrate how to use them in SQL.
⏱ TIMESTAMPS:
00:00 - Auto Incrementing IDs
02:20 - UUID
04:55 - UUID v7
05:52 - ULID and Snowflake ID
06:29 - SQL demonstration
08:13 - Other vendors
🔗 VIDEO LINKS:
SQL script from this video: https://github.com/bbrumm/databasestar/tree/main/videos/171_uuid