in reply to How to Calculate Memory Needs?

Assuming you have a database keyed by ISBN number, you can reduce the size by just saying

push @{$user_books{$user_id}}, $ISBN;
This gives you a HoA with just the book keys. Without the database you can still save space and normalize your data by keeping a hash over unique isbns.

After Compline,
Zaxo