Jump to content

is this approach correct?


spires

Recommended Posts

Hi

 

I'm about to build an online community (facebook style)

 

I was just wondering what approach would be best for storing image and videos into the database:

 

Option 1:

Have 1 database table called photos, which has a field to determine which section the photo belongs to.

E.G - profile, groups, events etc

 

Option 2:

Have a database table for each section.

E.G (table names)

- profile_images

- group_images

- event_images

 

 

Option 2, will allow for greater separation, but i'm not to sure if it would be a better idea to keep all of the images in one place.

 

Any thoughts on this?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/202003-is-this-approach-correct/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.