I'm creating a small social media website, and I'm faced with a dilemma. There are 2 ways I can design my classes and database that I currently know of.
Users can make posts on the website by uploading images, videos, and plain text. My initial thought was to make a class for each post type and they inherit from a parent post class, I would then write all the post attributes of the post class to a database table called posts.
Instead of the use of inheritance, I would create a table for each type of post (image, video, text), then write each type of user post to their own separate tables. Next I would create a 4th table that selects all the information from the other three tables and creates an object for each post. Then each post can be displayed on the website. This database would be in third normal form.