The blockchain is the database. It stores objects and, like postgres, can store code for manipulating the objects. Each NFT would have a particular storage location which you can query, either directly via a block explorer like etherscan.io or via javascript using any one of a number of apis like ethers.js