You mean not 'デ' but 'ヂ', don't you?
'デ' is the katakana for 'で'.
Basically you use 'じ' for the dull sound of 'し' and 'ぢ' is the one for 'ち'.
For example you write 'はなぢ' for 'nosebleed' because the word 'はなぢ'
consists in 'はな(nose)' and 'ち(blood)'.
However there are quite a lot of exceptions.
Like 'じめん(ground surface)' is not 'ぢめん' although it should be
'ぢめん' because it consists in 'ち(ground)' and 'めん(surface)'.
In addition, some Japanese don't care the difference of them nowadays
and they tend to use 'じ' even in the case they should use 'ぢ'.
It is better for you to learn 'じ' first and then leran exceptions bit by bit.
For your information, the difference of 'ず' and 'づ' is similar to this case.
'ず' is the dull sound of 'す' and 'づ' for 'つ'.