I must produce a database and I wish to understand what will be the best answer.
Let us say I must store details about students and instructors.
Must I make a single table that contains all of the private information (title,email,phone password) to both students and instructors?
To acquire more information must i have them in separate tables as ADD_Instructors and ADD_STUDENTS?
You might want to produce a people table for that common data like title,email etc. After that you can make use of a primary key column within this table, and when there needs to be information specific to teacher (like course_instructor, mind_teacher of sophistication), then use that unique key from people as reference inside your course_information table. Perform the same for college students too.
It may sound much like your best route is to possess a separate table for instructors and students. You will have what's known as a 1-to-many relationship between instructors and students: one teacher, all students.
But that only covers one semester. Considering other semesters, you've got a many-to-many relationship between students and instructors.
Ultimately, you are better off with a minimum of three tables: Instructors, Students, and teacher-to-student relationship.
First factor you need to do is Map the entity associations (ER) and it is characteristics.then design the database and apply the normalization methods.
Within the suggested scenario students and instructors will vary organizations . and discover thier relationship
- ONE student ONE TEACHER
- MANY Students HAVE ONE TEACHER
- MANY Students HAVE MANY Instructors
Then take a look at their characteristics Example - Student(Title,Class,DOB)
It is dependent how you will make use of the data. For those who have lots of use cases when you are looking at "persons", no matter role, or for those who have lots of persons who're both instructors and students, you might want to discover the gen-spec design pattern, because it is applicable to relational tables.