Im creating a MySQL Schema with Two Tables (Student and Instructor).
1. Students are given a student number when they join the school.
This is stored along with their name, date of birth, and the date they joined
the school.
2. All instructors are also students, but clearly, not all students are
instructors. In addition to the normal student information, for all
instructors, the date that they start working as an instructor must be
recorded, along with their instructor status (compensated or volunteer).
My Schema:
STUDENT
+---------------+
| ID | PK
+---------------+
| LNAME |
+---------------+
| FNAME |
+---------------+
| MNAME |
+---------------+
| BDAY |
+---------------+
| JOIN_DATE |
+---------------+
| IS_INSTRUCTOR |
+---------------+
INSTRUCTOR
+---------------+
| ID | PK
+---------------+
| STUDENT_ID | FK
+---------------+
| INSTR_STATUS | (compensated or volunteer)
+---------------+
| DATE_WORKED |
+---------------+
How can when I insert into STUDENT TABLE and if IS_INSTRUCTOR = 1 (meaning true) INSTRUCTOR TABLE (STUDENT_ID) will have the STUDENT.ID?
Or you guy have a better Table Design? TIA