What is the difference between demat account and trading account

How does a demat account differ from a trading account in functionality?