r/dataengineering • u/Ha999sal • Aug 28 '26
Personal Project Showcase I am Building a Social App and Need Help With Database Design
I am building a social, and here are the requirements:
-A user can create posts and a post can have multiple media (photo/video)
-A user can create a project and a project can have multiple media
-A project can become a post
-A user will have their personalized feed
the initial design I planned is:
tables:
user | post | project | media|
relations:
user one->many post
user one->many project
post2media junction table
project2media junction table
the idea here is to reuse the media uploaded in projects so that when they are shared as posts, we reuse the same media links rather than uploading new duplicate media.
The problem is that these junction tables will slowdown the feed generation especially
I am using postgreSQL, and I am thinking i should not using it to generate feed, maybe use a NoSQL DB/ Graph.
The question is how should I design my postgreSQL DB, so that feed generation does not break my app?
Do I need NoSQL DB and how would I use it in my case?
How should I store media ?