I am developing a mobile app for teachers and students... the database contains tables like teacher, student and principal.All these tables have different columns depending upon the role.
Now I want a table called posts that stores posts from all these users.
Problem 1 : I can not define a table called users with a column ROLE to identify a particular user because these roles have different columns/properties.
Also... for these users I am defining 2 columns, one is id that is unique for all teachers and students...and user_id like T23 (for teachers with id 23) and S44 (for students with id 44).
Now I have created posts table with following columns: id, user_is, description, date_created, Status.
Now I am not sure... how to Get all the Posts along with the user name (How Join should work here)