Memory access is much faster than disk access, so if you can keep your whole database in memory, calculation can potentially happen much faster. So if you don't need the subtle relational capabilities of SQL and it can all fit in RAM, by all means stick with hashes or arrays.