A page such as: http://en.wikipedia.org/wiki/Die_Hard, you can see a movie template which contains many useful information such as director name, starring etc.
Is this information stored as just as a form of wiki markup in the article table, or any more meaningful structure stored in the database?
It's stored in the templatelinks table, see: http://www.mediawiki.org/wiki/Templatelinks_table