Let's say that I want to implement a Dapp similar to Facebook. Each user has its own profile, pictures and information. Usually you would use a database to store all this data. This guarantees that only the DB owner can access it and that no entity can modify the data if not allowed to.
Now how would it work for a decentralized application?
Storing on chain does not seem like a viable solution because of the gas required and also because all the information would be accessible and visible to everyone. An alternative is to store it encrypted off-chain for example with IPFS but then which entity would decide what information a user can see? Or if the entire information stored needs to be used to calculate certain results for the user, how do you calculate those results without someone having access to the entire data? An how would you distribute the decryption keys?
Wouldn't you still require a node that acts as a database and so it has access to all the data and returns only what another user can see? This though would make it a centralized application.
I feel like the only solution to this problem is to use homomorphic encryption, but we are still quite far from a fast and efficient implementation.