Page 262 - C++
P. 262

CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
                                         (Sub Code: 083 Paper Code 91/1 Delhi)

                              while True:
                                f=pickle.load(file)
                                if f.CompID==1005:
                                  f.Display()
                            except EOF Error:
                              pass
                            file.close()  #IGNORE
                          (½ Mark for correct function header)
                          (½ Mark for opening the file COMPANY.DAT correctly)
                          (½ Mark for correct loop)
                          (½ Mark for correct load( ))
                          (½ Mark for correct checking of CompID)
                          (½ Mark for displaying the record)

                                     SECTION C - (For all the candidates)

              5    (a)    Observe the following table CANDIDATE carefully and write the name of the                                   2
                          RDBMS operation out of (i) SELECTION (ii) PROJECTION (iii) UNION (iv) CARTESIAN
                          PRODUCT, which has been used to produce the output as shown in RESULT ? Also,
                          find the Degree and Cardinality of the RESULT.
                          TABLE: CANDIDATE
                          NO               NAME               STREAM
                          C1               AJAY               LAW
                          C2               ADITI              MEDICAL
                          C3               ROHAN              EDUCATION
                          C4               RISHAB             ENGINEERING

                          RESULT
                          NO               NAME
                          C3               ROHAN


                   Ans  (i) SELECTION and (ii) PROJECTION
                          OR
                          (i) SELECTION
                          OR
                          (ii) PROJECTION

                          DEGREE = 2
                          CARDINALITY = 1

                          (1 Mark for writing the correct RDBMS operation as any one of the
                          given options)
                          (½ Mark for writing correct degree)
                          (½ Mark for writing correct cardinality)

                   (b)    Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which                                                6
                          are based on the tables
                          TABLE : BOOK

                          Code             BNAME                                 TYPE
                          F101             The priest                            Fiction
                          L102             German easy                           Literature


                                                     Page #21 of 28
   257   258   259   260   261   262   263   264   265   266   267