paint-brush
Composite Keys: A Guide on How to Handle Themby@kevinmasur
775 reads
775 reads

Composite Keys: A Guide on How to Handle Them

by Kevin Masur9mJanuary 14th, 2024
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Most of the time, just keep it simple. Combine your composite keys into a string key for storage in a map or cache if that is the easiest option and performance is not a major concern. In scenarios where performance is critical, make sure to do your own testing. But using nested maps will be the most performant in most cases. It will also likely have the smallest storage requirements. And composite keys are still a performant alternative when nesting mappings become impractical.
featured image - Composite Keys: A Guide on How to Handle Them
Kevin Masur HackerNoon profile picture
Kevin Masur

Kevin Masur

@kevinmasur

Software Engineer with a focus on Java, Testing, CI/CD, Databases, and Web Development

About @kevinmasur
LEARN MORE ABOUT @KEVINMASUR'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Kevin Masur HackerNoon profile picture
Kevin Masur@kevinmasur
Software Engineer with a focus on Java, Testing, CI/CD, Databases, and Web Development

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Tefter
Technoblender
Coffee-web
Minds