Database methods for storing users data to SD or uploading it to an online stora

Hello,

for my new project I require to store a data base of many many object that within every object there is more data about it like location last updated time temp and more almost like a class or template in coding.

now I need practical methods of storing this kind of data from the arduino(ESP32 specific) to an SD card or something secure online.

How should it be done and read from properly? All I'm aware of is that you can create with an SD card arduino library a simple text file but no idea how a database system works for doing tasks like updating new data to a particular unit and datalogging data for it as well without interrupting the other "Units" and being able to peek data from a particular "Unit" efficiently.