Computer AwarenessModerateIBPS SO IT Officer · SBI Clerk Mains

In ENROLMENT(StudentID, CourseID, Grade), a student takes many courses and a course has many students, but a student takes a course only once. What is the primary key?

  1. A. StudentID on its own
  2. B. CourseID on its own
  3. C. The pair (StudentID, Grade)
  4. D. The pair (StudentID, CourseID)

Correct answer: D. The pair (StudentID, CourseID)

Neither ID alone is unique, since both repeat; together they identify one enrolment. A key made of two or more attributes is a composite key.

हिंदी में

ENROLMENT(StudentID, CourseID, Grade) में एक छात्र कई पाठ्यक्रम लेता है और एक पाठ्यक्रम में कई छात्र होते हैं, पर कोई छात्र एक पाठ्यक्रम केवल एक बार लेता है। प्राइमरी की क्या है?

  1. A. अकेला StudentID
  2. B. अकेला CourseID
  3. C. युग्म (StudentID, Grade)
  4. D. युग्म (StudentID, CourseID)

उत्तर: D. कोई भी ID अकेली अद्वितीय नहीं है, क्योंकि दोनों दोहराई जाती हैं; साथ मिलकर वे एक नामांकन की पहचान करती हैं। दो या अधिक एट्रिब्यूट से बनी की कंपोज़िट की कहलाती है।

More Computer Awareness questions

Exams that ask this topic