Just as it is possible to have a trading account without a demat account, it is also possible to have a demat account without a trading account. You must remember one thing! If you want to buy and sell shares then you need to have a trading account also. You can buy and sell directly from your demat account. That is not permitted under current regulations. There are two circumstances where you can have a demat account without a trading account. 

Firstly, if you are inheriting shares or if you are getting shares as a gift then you do can directly receive it into your demat account. Your inheritance will come into your demat account by way of transmission while the gift of shares will come into your demat account by way of off-market transfer. Of course, in both these cases, we are assuming that you do not intend to sell these shares any time soon. If you want to sell these shares then you need to have a trading account opened which is linked to this demat account. Only then you are allowed to sell the shares. The second case is when you are applying for an IPO. If you see the IPO application form they only ask for your demat account details. One the allotment process is finalized, the shares are automatically credited to your demat account before the listing date. But what happens if it lists at 100% premium and you want to sell the shares? Sorry, you cannot sell the shares without a trading account. That is why trading account also needs to be opened.