Each block contains many transactions. In raw data, these transactions are organized like a tree or just flat array of transactions ?
in an array. each transaction comes after the other like a chain.
As my understanding, the transactions are stored like array in raw data, and bitcoin cline will build a Merkle tree for these transactions in memory. These Merkle tree , actually a group a hash value, are not written into file. Just in memory. When the bitcoin client quit, the Merkle tree is released. They are not saved in raw data.
when a node first receives the block it has to first build each branch of the merkle tree to get to the root and then see if the hash of it is the same hash that was included in the block header (that is the only hash that is stored). then it is discarded after verification (no need to quit).