Page 118 - C++
P. 118

s1.display();
               }
               fin.close();
               }



        5(a) Observe the following Table and answer the parts (i) and (ii) accordingly
        Table: MEMBER














        (i) In the above table, can we take Mno as Primary Key? (Answer as [YES/NO] only).
        Justify your answer with a valid reason.
        Ans:  It can’t be the primary key as values are duplication in this attribute. For primary key that column has
        to be unique.

        (ii) What is the degree and the cardinality of the above table?
        Ans:   Degree:        4  no. of columns
               Cardinality = 5 no. of rows
        Consider the following tables SUBJECT and TEACHER and answer (b), (c), (d) and (e)
        parts of this question:






































        (i) To display the names of all the subjects for which practical marks are 0.
        (ii) To display the total number of teachers in each subject separately.
        (iii) To display the names of all the teachers in the ascending order of the Sub_Code.
   113   114   115   116   117   118   119   120   121   122   123