Your question is incredibly hard to understand.
What is "tx_hex"? Do you mean the hexstring of the raw transaction or the txid?
If you have a hexstring, you can use
decoderawtransaction to decode the raw hex of a transaction.
or tx_hex a key, and value is stored in the data directory of bitcoin ?
more like
key => value pair
where tx_hex is key and hextransaction is stored on disk ?
No. That is completely incorrect. When you have ask for a transaction with getrawtransaction, you must have txindex enabled. The txindex means that Bitcoin Core's databases will have records with txids and the location of where the transaction data is stored in the blk*.dat files. When you request a transaction, it looks up the txid in the database and pulls it from the disk. Then it represents the binary data as a hex string.
sorry for confusion,
i meant txid.,
and looks like i got my answer.,
so there is db with
txid => txhex
and we can do
decoderawtransaction(tx_hex)
to get json data .
thanks ., this clears things up.
but i just checked i dont have
txindex=1
in my bitcoin configuration file ., but still i can do getrawtransaction .
how is that possible ?