One or Separate Database Tables for Students and Instructors with Different Attributes [closed]

Teachers teach courses and students can watch these courses. Students and instructors have different attributes.

Which is better–to
separate each user role as a table
or wrap them in a user table with student and teacher roles?

  • 2

    Hi – “better” is a subjective judgement and would be entirely dependent on your specific use case. Therefore your question is basically unanswerable

    – 

  • Does this answer your question? How can you represent inheritance in a database?

    – 

  • How much research effort is expected of Stack Overflow users? Why is “Can someone help me?” not an actual question? Strategy for “Which is better” questions

    – 

  • Clearly this is going to be a faq. Please before considering posting: Pin down code issues via minimal reproducible example. Read manuals/references & google error messages & many clear, concise & precise phrasings of your question/problem/goal, with & without your particular names/strings/numbers, ‘site:stackoverflow.com’ & tags; read many answers. SO/SE search is unusual, read the help. Google re googling/searching, including Q&A at Meta Stack Overflow & Meta Stack Exchange. How much research effort is expected of Stack Overflow users? How to Ask Help center Reflect research in posts.

    – 

Leave a Comment