Database architecture question

Hi all,

I’m trying to achieve a quite specific database setup and I wanted to get some advice on how to use the many Moralis functions the best way possible.

Currently I am retrieving all the NFTs that a logged in user owns using the getNFTs() function which by itself works great. However, I want the user to be able to add extra data to the NFTs and save them in the database. I already found a different forum post talking about how it is not recommended to modify the EthNFTOwners table since it is a system table, which brings me to my question:

What would be the recommend way to track all the NFTs a user owns, allow them to add extra information (e.g. custom description) and keep the table updated when a new NFT is acquired automatically. So if we take the getNFTs() output, it would look something like:

    "token_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
    "token_id": "15",
    "contract_type": "ERC721",
    "owner_of": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
    "block_number": "88256",
    "block_number_minted": "88256",
    "token_uri": "string",
    "metadata": "string",
    "synced_at": "string",
    "amount": "1",
    "name": "CryptoKitties",
    "symbol": "RARI",
    "custom_description": "User defined custom text here"
    "custom_price_data": "User defined custom price data text here"


you may want to use web3api to get that nft info, as it seems that EthNFTOwners will be removed in Nitro version of Moralis Server.

@cryptokid Thanks for letting me know, I’ll be sure to switch to the web3api.

However, this does not really answer my question. Would it then be the most efficient way to call the web3api, retrieve the NFT data and finally write it to a database table on each login (or job based)? Or, since this seems like a common use case, is there some better way to achieve this without relying on a custom implementation?


it may depend on your needs, you can create a new table where you save NFTs data on login, and/or with a job that runs from time to time