Refer the below schema and create the table mark
Attachments:
Answers
Answered by
30
Answer:
create table mark(
value number,
subject_id number references subject(subject_id),
student_id number references student(student_id),
primary key(subject_id,student_id)
);
Explanation:
Since TWO primary key.
Answered by
2
Answer:
create table mark(
value number,
subject_id number references student(student_id),
student_id number references subject(subject_id),
primary key(subject_id,student_id)
);
Explanation:
There are two primary key those are subject_id and student_id
- Subject_id is the primary key of Subject table
- Student_id is the primary key of Student table
There are two Foreign keys in the Mark table those are subject_id and student_id.
- Foreign key subject_id refers to the student_id of student table.
- Foreign key student_id refers to the subject_id of subject table.
#SPJ3
Similar questions