I'm extremely amazed about how Stack Overflow stores content that I'm asking into their database to display (markdowned) in question detail. The content consists of normal text, image, code ...etc.
1 Answer
The content is stored both in Markdown (to allow editing) and in HTML (to avoid having to parse it every time, which would lead to reduced performance). There have been cases where old posts, written at the time an old Markdown parser was used, had to be edited in order to generate the correct HTML.
A simple SEDE query on the Posts table shows that the content is stored in HTML, and on the Post History table you can find the Markdown source. SEDE is just an analysis tool for the community, not the real source database for Stack Exchange, but its structure is similar.