Why databases store their data differently

I was recently chatting with a friend about database architecture, and why, for instance, OLTP databases and search engines are implemented very differently. This friend is familiar with computer science concepts, but not with database internals, so I tried to make the explanation as simple as I could. This blog is an expanded version of the discussion we had.