DB structure for displaying mixed media per user

I have images, GIFS, and MP4s.

These are essentially photos and videos from events. Each user would have their own portal where they could log in and view these photos and videos, that are specific to there own account. I planned on a RG and using unique ids to tether the correct media to the correct user when viewing from their portal.

I’m having a hard time wrapping my head around the DB structure for this.

I considered creating a data type “Media”, then fields for each type (image, GIF, mp3), but I don’t believe that’s a possibility for mp4s, correct?

What’s the typical method for storing and using videos in the DB?

1 Like

Your are on right track, if i was on your spot which i am not, and maybe i did not see the bigger picture.

I would created DB entity as Media, and inside it with all field i add a field Source as FILE which can contain all type of media. on diff field i would created MEME as TXT which give me an hint what type of file is it.

1 Like

Hi @patrickryanwatkins

create a data type “media” and give it two fields:
“media” with data field type “file”
“user-shortcut” with data field type “user”

You can then “do a search for” in your RG with constraints for “current user”, so the current user will just see media data with its user attached.

1 Like

For better visualization you can give your data type “media” several fields for different data types like videos or images.
If you want to show that media then in your RG you can implement an “image element” and a “video element” in your RG and show it or hide it with conditional formatting. So if there is a video in the media data you hide the image element and show the video element instead.

1 Like