Week 4 (Mar 16-23, 2024): Populating Database!

Learning how to create and populate tables in MySQL

Now that I have discovered how to connected to RDS using MySQL the next step was to learn how to code in SQL to create the tables I needed to actually store data.

I utilized SQL database tutorials on YouTube such as "‘SQL Explained in 100 seconds”. A YouTube channel I found particularly helpful was ‘BroCode’. They developed a 31 video playlist of instructional videos from basic syntax to advanced topics, all on the database language.

BroCode’s SQL tutorial, the first SQL video I watched



I was able to learn the SQL coding language to a basic degree, enough for me to create multiple tables to store data. I created 3 tables; one to store user data (such as email, user ID, and style preferences), one to store design styles, and one to store images of the styles.


Having created tables, my next goals were to learn how to store images on these tables that my app would need to show the user. 


Upon researching image storing on MySQL, I initially discovered two methods: the first method was to store the image data in the table, however many SQL users mentioned that it was a very inefficient way of storing files. The second method was to store the path of the image on my laptop onto the table, but this method would not work once my app was accessing the table, as it would have no connection to my laptop.

I kept scouring websites as well as AWS’s documentation. Soon, I discovered that Amazon offered a backend service called S3, and one of its functions allowed you to store files. I learned through the docs that in S3, there are ‘buckets’ and there are ‘objects’. Buckets are essentially a container for objects, and objects are files or metadata that describe a file. Essentially, for me to store files on S3, I had to create a bucket, and then store my images as objects in the bucket. Once my object is in the bucket, I could download it, open it, and manage it any way I would like.

AWS’ S3 documentation

 

Soon, I was able to create a bucket, and then upload and store my interior design images that I plan to have my users to be able to choose their interior design style on!

Opening an image in one of my S3 buckets

 

Next Steps

The next step was to figure out how to connect this service to my SQL table and essentially store the images on the table. 

Previous
Previous

Week 5 (April 28 - May 14): Shifting to Firebase

Next
Next

Week 3 (Mar 9-16, 2024): Database Problems!