How to get images from a database?

Good afternoon, so I’m very new to the database, but I needed to put pictures in one and make a link between the corona and him, to get these images. The reason for needing to be a database necessarily is because over time these images will be changed, and then I want to be able to change them without having to tinker with the application code … Can anyone give me some help on this problem?

Do you mean store the image in database, or putting in the image-url in the database ?

 would use corona to make a network.request to download the image, then show it on screen.

yes, but I do not know how I do it because as I said, I am quite new to database :frowning: Could you tell me some tutorial?

This is my personal opinion, but I would never store an image in a database. They are usually big files and those blobs just make for a really big database. I’ve always found it best to store them as separate files in the operating system and then store the path to the images in the database along with whatever data you need for the image (width, height, filename, path where saved, description, etc.) and then use the database to search for images.

Corona display.* API’s can’t really show images from database blobs anyway. You would need to use file IO to extract the image from the database and store it as a file anyway. 

Rob

Do you mean store the image in database, or putting in the image-url in the database ?

 would use corona to make a network.request to download the image, then show it on screen.

yes, but I do not know how I do it because as I said, I am quite new to database :frowning: Could you tell me some tutorial?

This is my personal opinion, but I would never store an image in a database. They are usually big files and those blobs just make for a really big database. I’ve always found it best to store them as separate files in the operating system and then store the path to the images in the database along with whatever data you need for the image (width, height, filename, path where saved, description, etc.) and then use the database to search for images.

Corona display.* API’s can’t really show images from database blobs anyway. You would need to use file IO to extract the image from the database and store it as a file anyway. 

Rob