I have a project called social media file sharing. I have this database schema and I need your opinion about what I should remove or add or edit on my database schema.

enter image description here

Every user can upload media types like Text, Images, Audio and Video. I assume that every media type can be set into album (like photo album) each album has many images. With this I create a table called Holder and table Connector to connect media type and their holder.

1 Answer 1


First of all, some tables are seperated but really hold the same kind of data.

For example, video, audio and images are all saved as urls, so you can join them in one table instead of 3.

This will greatly simplify your schema, and allow you to permit several types of content in one collection (for example, a wedding album that contains images & video).

Second, if users upload the content, how come you can keep it in urls? Where is the data actually saved? My first thought when seeing this was that you need to keep a binary object column for the content itself.

Third, did you mean to have a many-to-many connection between content and albums? It means every item can be in several albums. If you would like to limit an item to only one album, you would not use a "connector" table, but instead keep an album id in the content table itself (a foreign-key to the album table).

And last - as a "social media file sharing" schema, it seems to be missing the social aspect (where is sharing information saved?).

  • Just a note, there is no indication that content is a URI in the db schema, if those are blobs then it might well make some sense in the future for them to be in different categories (and probably should not be stored in a RDBMS.) Apr 12, 2016 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.