How to do share trading through demat account

Is it mandatory to have a trading account along with a demat account?,