Page 99 - C++
P. 99

public:

        void StockEnter ( ) {cin>>Model No>>RAM>>HDD; gets(Details);}

        void StockDisplay( ){cout<<ModelNo<<RAM<<HDD<<Details<<endl;}

        long ReturnModelNo ( ) { return ModelNo ;}

        };

        5. (a) What do you understand by Union & Cartesian Product operations in relational algebra?         [2]

        Consider the following tables WORKER and PAYLEVEL and answer (b) and (c) parts of this question:

























        (b) Write SQL commands for the following statements:                                                 [4]

        (i) To display the details of all WORKERs, descending order of DOB.

        (ii) To display NAME and DESIG of those WORKERs whose PLEVEL is either P001 or P002.

         (iii)To display the content of all the WORKERs table, whose DOB is in between „19-JAN-1984‟ and 18-JAN-
        1987‟.

        (iv) To add a new row with the following :

        19, „Days Kishore‟, „Operator‟, „P003‟. „19-Jun-2008‟, „11-Jul-1984‟

        (c) Give the output of the following SQL queries :                                                   [2]

        (i) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL;

        (ii) SELECT MAX(DOB), MIN(DOJ) FROM WORKER;

        (iii) SELECT Name, Pay FROM WORKER W, PAYLEVEL P WHERE W.PLEVEL = S.PLEVEL AND P.ECODE<13;

        (iv) SELECT PLEVEL, PAY+ALLOWANCE FROM PAYLEVEL WHERE PLEVEL = „P003‟;

        6. (a) Verify the following using Truth Table                                                        [2]

        U.(U’’ + V) = (U+V)

        (b) Write the equivalent Boolean Expression for the following Logic Circuit.                         [2]
   94   95   96   97   98   99   100   101   102   103   104