Ideally, if your DB fits into RAM, it should be served from RAM entirely.
If less frequently used parts of it don't fit, offload to disk.
Ideally, the DB should guarantee data integrity after a crash even if the DB is served from RAM.
That's the ideal scenario: You have the best of all worlds.
Coincidentally, that's exactly what Postgres does.
On top of that, it's the best NoSQL database currently available.
Of course, you can use it with SQL if you ever feel the need.