Save any type of data to database

Hi there,

Im working at my BA-degree project and im making a website like kicksterter where people can fund their projects and i want it to be a dApp where everything is managed by smart contracts. Smart contracts and web3 apps are a new thing to me so firstly im willing to achieve knowledge into this area. In my app, I need to store not only the authentication data of an user but much more data like a list of products with images and details and maybe even videos where every product or post its done by an user. Can I do this with moralis database and save data like on a normal database (as mongodb)? I saw the video where I can store the authentication data but Im wondering if I can do all of this.

Best regards,
Paul

Hi Paul,

Yes, the Moralis database is a regular database. It can have objects, relations, indexes, etc. Interacting with the database is done through the abstractions Moralis.Object and Moralis.Query. You can think of it like using a lightweight ORM (Object Relational Mapper) library.

See the Database docs here:
https://docs.moralis.io/moralis-server/database

The database can also store files like images up to around 3MB. Larger files up to 64MB can be stored using IPFS. Generally speaking a DB is not a good place to store large files, so IPFS is the better route. See the docs for Files here:
https://docs.moralis.io/moralis-server/files

1 Like