Usually, the smart contract only stores state data, such as how many tokens an address has, but if you want to use the decentralized database, there are some database built on IPFS, you can find it online. If you just want to store state data, then you can use it on-chain.
Onchain is not suitable for storing data unless state data, it's usually very expensive. However, if your data of an address is not so big, the mapping would be a good way.
For some information that won’t be used on smart contracts, just like the information of a restaurant on Yelp, we can directly use IPFS. If the data is state data that involves authority transfer or other meaningful things, we need to use it as state data and store it on-chain. You can use arweave to store those information data.