Primary key ,foreign key , Index(primary,secondary,clustering) !!!!!!
I have following tables ,Please can any one suggest primary key and foreign key for the tables and suitable Index scheme to be used on attributes !!
Student(Studentno,studname,mode,)
Course(courseno,coursename,course decsp,....)
Module(Moduleno,modulename,moduledescp,....)
Courseregistration(courseno,studentno,year,status,....)
moduleregistration(moduleno,studno,year,status)
Table :Moduleregistration table depends on status field "sitting" and "resit"
Table :Course registration "status" field has 3 values depending upon whether student is "attending" course,"suspended" studies,"completed" course
So please suggest suitable primary and foreign keys for each table and which Index and which attribute I should select to Index (also mention type of index)
Database Experts thanks for the earlier reply related to Index but this question is very tricky and different than previous question in which clustering index was preferred, please explain why we use specific index than others as in last question(still on forum to be answered further in detail) that I put in forum it was very hard to understand why we did not consider secondary index or primary in the answer (ie what are their limitations) . Thanks!!