How can data be accessed/searched for in a blockchain? I'm currently trying to find practical examples for the usage of a blockchain, instead of a typical database like MySQL.
I understand that the big advantage of a blockchain is the high security of data not being compromised.

But how can I imagine accessing or searching for a specific record in the blockchain?

Let's say, in a company we use a blockchain for saving all employee payrolls? How could one look up all payrolls for a specific employee?
You can access blockchain data like the way you access normal data in any  MVC where you fetch data from database ,manipulate it in backend and display the result in front end. Incase of blockchain,what ayou need to understand is it is  nothing but a decentralized database where transactions occor dynamically and the data is distibuted among all the nodes.
So to explain how the data is actually fetched from blockchain, what I do is ,Crawl each block in the blockchain and store the data in your preferred data base like MySql or Mongo
You can use rpc  getblockhash &quot;n&quot;, which will return the hash of the block &quot;n&quot;, for example:
eee7f58d111ef0b25f7f6e8703d80ab6b51ca957170daea949e93e6467906889
You can retrieve the block's contents by calling  get block &quot;b&quot;, where &quot;b&quot; is the hash. Which can look like this:
{
&quot;hash&quot; : &quot;eee7f58d111ef0b25f7f6e8703d80ab6b51ca957170daea949e93e6467906889&quot;,
&quot;confirmations&quot; : 176023,
&quot;size&quot; : 261,
&quot;height&quot; : 0,
&quot;version&quot; : 1,
&quot;merkleroot&quot; : &quot;695191c2e8f8fddc75331a38d658ab07672970b09981ad77c29c4b0b17580941&quot;,
&quot;tx&quot; : [
&quot;695191c2e8f8fddc75331a38d658ab07672970b09981ad77c29c4b0b17580941&quot;
],
&quot;time&quot; : 1518520240,
&quot;nonce&quot; : 2084635057,
&quot;bits&quot; : &quot;1e0ffff0&quot;,
&quot;difficulty&quot; : 0.00024414,
&quot;nextblockhash&quot; : &quot;1bb4a4c35103a363ad63bf59bf7fa45c06babcfa8d848ceeb7e4958f9a9f660e&quot;
}
Now every key value of above output replicates some important concept which cannot be ignored. But for now lets just focus on &quot;tx&quot;,
the array of tx are the list of transaction that have been mined in the &quot;n&quot;th block, and now you can crawl each and evry transaction given in tx array using rpc getrawtransaction to know the detail of each transaction.
Personally, I store the details in MongoDB so I can keep track of my applications' users, their addresses and the transactions they have done.
So this is a simple approach by which you can access data from a blockchain.