Let‘s have a look at the mechanism ruling the databases of cryptocurrencies.
A cryptocurrency, like Bitcoin, consists of a network of peers. Every peer has a record of the complete history of all transactions and thus, of the balance of every account.
A transaction is a file that says, “Bob gives X Bitcoin to Alice“ and is signed by Bob‘s private key. It‘s basic public key cryptography, nothing special at all. After signed, a transaction is broadcasted in the network, sent from one peer to every other peer. This is basic p2p-technology.