I know [alot has been said on SO on how a file should be represented in a database](https://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay) but I couldn't find any Stackoverflow questions which went deeper into how **multiple** related files should be stored.

I'm using Amazon S3 and have grouped images into albums (i.e., "folders") inside a single S3 bucket. I've read that it is a good practice to at least store the file path in one's database. 

My question is what do with **multiple** files all with the same "folder" path. Here's my S3 structure:

```
my-bucket/folder1/img1a.jpg
my-bucket/folder1/img1b.jpg

my-bucket/folder2/img2a.jpg
my-bucket/folder2/img2b.jpg

```

Some questions: 

1. Should I represent this with 2 or 4 rows in my database?
2. If each image is actually stored in S3 as multiple images of different sizes (40x40, 480x320), how might it be best to keep that information in my database **and** in my bucket?
3. Looking at the AWS S3 SDK, I couldn't figure out how to get all the file URLs in a particular "folder". Am I missing something?