XII IP _Blue Print - Sample Paper - Marking Scheme_ for RO 2011-12

					                      Blue Print – Sample Question Paper
                        INFORMATICS PRACTICES
                                 CLASS – XII
Time : 3 Hrs                                                      MM : 70

Topic/Unit                   SA            SA           LA
                                                                       Total
                          (1 Mark)      (2 Mark)     (6 Mark)
Networking and Open
                            4(4)          3(6)              -          7(10)
Standard
Programming                 7(7)          6(12)            1(6)        14(25)
Relational Database
                            4(4)          7(14)        2(12)           13(30)
Management System
IT Applications             1(1)          2(4)           -              3(5)
         Total             16(16)        18(36)        3(18)           37(70)
                             SAMPLE QUESTION PAPER 2011-12
                            KENDRIYA VIDYALAYA NO. 1, RAIPUR
                                CLASS - XII (Informatics Practies)
Time Allowed: 3 hours                                             Maximum Marks: 70

Note:
   (i)        All questions are compulsory.
   (ii)       Answer the questions after carefully reading the text.

1.    (a) Amitesh want to use Internet on his computer. Which basic protocol must be installed
          on his computer to use Internet?                                                        1
     (b) PACK N PICK is a food supply company with kitchen and market unit 110
         meters away from each other. The company recently connected their networks using
         UTP cable to share the stock related information. But after joining their networks,
         they are not able to share the information due to loss of signal in between. Which
         device is to be installed for a smooth communication?                                    1

     (c) KVS RO, Jabalpur is planning to connect all networks the KV schools at Jabalpur.
         Which type of network will result into?                                               1
         (i) LAN              (ii) WAN                       (iii) MAN                (iv) PAN
     (d) Arrange the following communication channels in the ascending order of their data        1
         transfer range.
         (i) Optical Fiber    (ii) Coaxial cable          (iii) UTP cable
     (e) Mr. Gaurav is confused between Free and Freeware software Mention at least two
         points of differences to help her understand the same.                                   2
     (f) Identify the type of Topology from the following:                                        2
         (i) If each node is connected with the help of independent cable with the help of a
             central switching (communication controller)
         (ii) If each node is connected with the help of a single co-axial cable.
     (g) Define the following with reference to Threats to Network Security.                      2
         (i) Snooping
         (ii) Trojan Horse
2. (a) While working in Netbeans, Ms Priynka Sahu wants to display 'Sold' or 'Ready to Sold’
       Or ‘Not in Stock’ message depending on the status (0, 1, or 2) entered in jTextField.
        Help her to choose more appropriate statement out of 'if ‘ and 'Switch’ statement.   1
     (b) Write the property through which you can change the colour of the text in jTextField1.   1
     (c) Which HTML tag and attribute is used for adding a image in a HTML document?              1
     (d) How is <HR> tag different from <BR> tag of HTML?                                         1
     (e) What will be the output of the following code:                                           2
          int A = 15, B ;
          for (B=2; B<=6; B+=2)
          {
                A= A + B;
          }
          JOptionPane. showMessageDialog (null, “A:”+A+”B:”+B+””) ;
     (f) What is XML? Is XML same as HTML?                                                        2
     (g) Write Java code that takes the salary of a employee from jSalTF and bonus in % from
          jBonusPerTF and calculates bonus amount as Salary * Bonus /100 to be displayed in
          jBonusAmtTF and also find Total Salary (Salary + Bous) to be displayed in jTotalTF.     2
3. (a) What is the use of SAVEPOINT statement in MySql?                                           1
   (b) The Book_Name Column of a table MOVIE is given below:                                    2
                      Movie_Name
                      Kal Ho na ho
                      Singh is King
                       Bodyguard
                      Singham
                      Kal aaj aur Kal
        Based on the information find the putput of the following queries:
       (i)     Select Movie_Name from MOVIE where Movie_Name Like ‘_al%al’;
       (ii)    Select Movie_Name from MOVIE where Movie_Name Like ‘%ng%’;
   (c) A Table “BOOK” in a database has 10 degree and 50 cardinality. How many rows
       and columns are there in the table “BOOK”?                                               1
   (d) Differentiate between Alternate Key & Candidate Key.                                     2
   (e) Define Inheritance with reference to Object Oriented Programming.                        1
   (f) An amount consisting of 2675.50 stored in a string variable strAmt. Now Mr. Saurabh
       wants to store it in double numeric variable dblAmt Write a Java statement to do this.   1
   (g) Poorvi, a student of class XII, created a table "RESULT". Percentage is one of the
       column of this table. To find the details of students whose percentage not between
       60 to 80, she wrote the following MySql query. which is showing error.                   2
         SELECT * FROM Result WHERE Percentage IS NOT BETWEEN 60 TO 80;
       Help Poorvi to run the query by removing the errors and write the correct Query.
4. (a) What will be displayed in jTextField1 after executing the following code.                2
       int X = 15, Z;
       Z = 10 + X++ ;
       If (Z>25)
              jTextField1.setText(Integer.toString(Z+5));
       else
              jTextField1.setText(Integer.toString(Z-5));
   (b) Rewrite the following program code using if..else statement.                             2
       switch(code)
       {
          case 1:
               Day = "Monday" ; break;
          case 2:
               Day = "Tuesday" ; break;
          case 3:
               Day = "Wednesday" ; break;
          case 4:
               Day = "Thursday" ; break;
         Default:
               Day = "No Match" ; break;
       }
   (c) What will be displayed In jTextArea1 after executing the following statement:                1
               jTextAreal.setText("Sample paper\n Class XII \t Informatics Practices") ;
(d) The following code has some error(s). Rewrite the correct code underlining all the
    corrections made:                                                                              2
    int a = 20, b=5, c;
    for(i=1; i<=5; i++)
    {
         if (a % b = 0);
              c = a + b;
         else
             c = a – b;
         b++;
         System.println(a+”, “+b);
   }
(e) Given a string object namely 'Amount', having value as "500.75" stored in it. What will be
    result of the following:                                                                       1
    JOptionPane.showMessageDialog(null,(Amount.length()+Double.parseDouble(Amount)));
(f) The following code has some error(s). Rewrite the correct code underlining all the corrections
    made:                                                                                         2
       int i = 1, j= 5; K=0;
       while (i<=3 & j>=1)
      {
          K + 5 = K;
          i++;
       }
       jTextField1.DisplayText(K);
(g) ABC COMPANY deals in selling of “Clean & Clear” washing powder. For billing purpose
    they use following Java frame form. They offer following unit price on the basis of quantity
    ordered to Whole Saler or Retailer :

                                                          Unit Price
                        Quantity Ordered
                                                    Whole Saler     Retailer
                             >=500                       50            52
                        >=300 and <500                   55            58
                              <300                       60            65
     If customer is special then 5% discount is given on amount
                                                                        Object Type      Object
                                                                                         Name
                                                                                         billNumTF
                                                                                         qtyTF
                                                                            Text Field
                                                                                         unitPriceTF
                                                                                         netAmtTF
                                                                        Check Box        specialCB
                                                                          Option         wholeRB
                                                                          Button         retailRB
                                                                                         calcPriceBT
                                                                            Command
                                                                                         calcAmtBT
                                                                             Button
                                                                                         clearBT




    (i) Write the commands to disable the controls unitPriceTF, netAmtTF and calcAmtBT.            1
    (ii) Write the code for calcPriceBT command button to assign value of unit price to the
         text field unitPriceTF on the basis of type and quantity ordered by the customer.         2
    (iii) Write the code for calcAmtBT to calculate the net amount after finding the Total
            Amount as Quantity*Price and less discount 5% if he/she is special customer.           2
5. (a) What is the purpose of DELETE command in MySql? How is it different from DROP
       TABLE command?                                                                                2
  (b) Table Teacher has 7 records and Table Student has 100 records in it. Mr. Ravi wants to
      display all information stored in both of these related tables because every student is
      taught by every teacher. How many rows will get displayed on execution of this query and
      what relational operation is it known as?                                                      1

  (c) Consider the table Worker given below Write commands in MySql for (i) to (iv) and output
      for (v) to (vii) :




       (i) To display the details of all WORKERs in descending order of DOB.                         1
       (ii) To display NAME and DESIG of those WORKERs, whose PLEVEL is either
             P001 or P002.                                                                           1
       (iii) To display the content of all the WORKERs table, whose DOB is in between
             '19-JAN-1984' and '18-JAN-1987'.                                                        1
       (iv) To add a new row with the following:
             19, 'Daya Kishore', 'Operator', 'P003', '19-Jun-2008', '11-Jun-1984'                    1
       (v) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL;                                1
      (vi) SELECT MAX (DOB), MIN (DOJ) FROM WORKER;                                                  1
      (vii) SELECT DISTINCT DESIG FROM WROKER.                                                       1

6. (a) Write a MySQL command for creating a table "CLUB" whose structure is given below:         2
                             Table: POLICY
                  Field Name        Datatype         Size     Constraint
                  MEMBER_No         Integer          10       Primary key
                  Member_Name       Varchar          20
                  Join_Date         Date
                  Member_Type       char             1        Not Null
                  Charges           Decimal          10,2

    (b) In a Database Institute there are two tables EMPLOYEE and SALGRADE as show below:
      Write the commands in SQL queries for the following:
      (i) To display the Name and Designation of those employees who have Date of joining
           after the year 2006.                                                                   1
      (ii) To display Sgrade and Total Salary from table SALGRADE where total Salary is
            calculated as SALRAY + HRA                                                            2
      (iii) To display Name, Salary and HRA from both the tables EMPLOYEE and SALGRADE
            for employees getting HRA more than 8000.                                  2
    (c) In a database there are two tables " STOCK" and " DEALERS" as shown below:




      (i) Identify the foreign key in the table STOCK.                                            1
      (ii) What output, you will get, when an equal-join query is executed to get the Item from
           Stock Table and Dname from Dealers table for Quantity more than or equals to 200?      1

7. (a) Write URL of any two e-Governance website.                                                 1
  (b) Write two advantages of e-Learning sites for students.                                      1
  (c) Write three important features of e-Business. Give URL of one of the e-Business portals.    2
  (d) Bhavna is creating a form for Railway Reservation. Help her to choose most appropriate
      controls from List Box, Combo Box, TextField, TextArea, Radio Button, Check box, Label
       and Command button for the following entries from user:                               2
      (i) A message "Enter Destination" in front of a Text Field.
      (ii) An input to choose Male or female for Gender.
      (iii) An input for berth type from drop down list.
      (iv) An input for Entering Passenger Name.
                    MARKING SCHEME * INFORMATICS PRACTICES


     General Instructions :

     * All answers provided in the marking scheme are SUGGESTIVE.

     * Examiners are requested to accept all possible alternative correct answers.

     * Semicolon termination and case sensitivity to be ignored in MySQL statements.

     * All equivalent MySQL commands for a given query must be accepted.

     * Both single quotes and double quotes are acceptable in MySQL commands.



                                          SAMPLE PAPER

                                      EXPECTED ANSWERS
1.    (a) Amitesh want to use Internet on his computer. Which basic protocol must be installed
          on his computer to use Internet?                                                          1
       Ans: TCP/IP or (Transmission Control Protocol / Internet Protocol
           (1 mark for correct answer)
     (b) PACK N PICK is a food supply company with kitchen and market unit 110
         meters away from each other. The company recently connected their networks using
         UTP cable to share the stock related information. But after joining their networks,
         they are not able to share the information due to loss of signal in between. Which
         device is to be installed for a smooth communication?                                      1

       Ans: Repeater
           (1 mark for correct answer)

     (c) KVS RO, Jabalpur is planning to connect all networks the KV schools at Jabalpur.
         Which type of network will result into?                                               1
         (i) LAN              (ii) WAN                       (iii) MAN                (iv) PAN
       Ans: MAN
           (1 mark for correct answer)

     (d) Arrange the following communication channels in the ascending order of their data          1
         transfer range.
         (i) Optical Fiber    (ii) Coaxial cable          (iii) UTP cable
       Ans: (i) UTP cable (ii) Coaxial cable         (iii) Optical Fiber
            (1 mark for correct answer)

     (e) Mr. Gaurav is confused between Free Software and Freeware software Mention at least
         two points of differences to help her understand the same.                                 2
       Ans: Free Software : It is software that is used, studied, modified, copied & distributed
            in modified or unmodified form either without restriction or with only minimal
            restrictions to ensure that further recipients are also conferred these rights. It is
            always distributed free of cost.
             Freeware : Is the name derived from words "free" and"software". It is a computer
             soft ware that is available for use at no cost or for an optional fee. Freeware is
             generally proprietary software available at zero price, and is not free software.
             The author usually restricts one or more rights to copy, distribute, and make
             derivative works of the software.
             Freeware offers users none of the freedoms guaranteed by Free software.
             (1 mark for each correct difference)
  (f) Identify the type of Topology from the following:                                         2
      (i) If each node is connected with the help of independent cable with the help of a
          central switching (communication controller)
      (ii) If each node is connected with the help of a single co-axial cable.
  Ans: (i) Star Topology
       (ii) Bus Topology
       (1 mark for each correct answer)
  (g) Define the following with reference to Threats to Network Security.                       2
      (i) Snooping
      (ii) Trojan Horse
  Ans:
     Snooping : snooping refers to gaining unauthorised access to another person's or
                 organization's data. This may be done in a number of ways:
           By getting someone's login information by casually watching what he/she is typing.
           Reading the files on someone's computer in an unauthorised manner
           Using some softwares which keeps track of the activities and data being sent or
           received on someone's computer.
       Trojan Horse
            Appears to perform a desirable function for the user
            Steals information through a 'backdoor' /Records browsing activities
               without the knowledge of the user
            Causes system crash or freeze
          (1 mark for any 1 point under each definition)
          Note: Any relevant explanation with regards to Threats to Network Security also to be
                considered as the correct answer.

2. (a) While working in Netbeans, Ms Priynka Sahu wants to display 'Sold' or 'Ready to Sold’
       Or ‘Not in Stock’ message depending on the status (0, 1, or 2) entered in jTextField.
        Help her to choose more appropriate statement out of 'if ‘ and 'Switch’ statement.   1
   Ans: switch statement
        (1 mark for identifying ‘switch’ as the correct statement)
  (b) Write the property through which you can change the colour of the text in jTextField1.    1
  Ans: foreground
       (1 mark for each correct answer)
  (c) Which HTML tag and attribute is used for adding a image in a HTML document?               1
  Ans: <IMG SRC> tag & attribute is used for inserting picture.
     (1/2 mark each for naming tag and attribute)
  (d) How is <HR> tag different from <BR> tag of HTML?                                          1
  Ans: Horizontal Rule (HR) element – The <HR> tag draws a horizontal line across the
       document frame or window. We can use a horizontal line to visually divide the
       information into sections.
       Line Break (BR) Element - <BR> tag forces a line break which implies that the text
       /image following the tag will be moved to the next line when displayed in the browser.
       (1 mark for each correct difference)
  (e) What will be the output of the following code:                                            2
      int A = 15, B ;
      for (B=2; B<=6; B+=2)
      {
            A= A + B;
      }
      JOptionPane. showMessageDialog (null, “A:”+A+”B:”+B+””) ;
      Ans: A:27B:8
           (1 mark each for correct value of A and B)
   (f) What is XML? Is XML same as HTML?                                                           2
    Ans: XML (eXtensible Markup Language) is also a markup language like HTML. But
             XML is different from HTML in the sense that HTML describes how to display and
             format the data, text and images in the browser whereas XML is used to describe the
             data. To store self-describing data, XML allows us to create our own tags where as
             HTML has fixed tag set to display data.
             (1 mark each for definition & difference)
   (g) Write Java code that takes the salary of a employee from jSalTF and bonus in % from
       jBonusPerTF and calculates bonus amount as Salary * Bonus /100 to be displayed in
       jBonusAmtTF and also find Total Salary (Salary + Bous) to be displayed in jTotalTF.         2
    Ans:
             float sal, bonusP, bamt, tsalay;
             sal = Float.parseFloat(jSalTF.getText());
             bonusP = Float.parseFloat(jBonusPerTF.getText());
             bamt = sal * bonusP/100;
             tsalary = sal + bamt;
             jTotalTF.setText(Float.toString(tsalary));
             (1/2 mark for correctly storing the value of salary and bonus percentage)
             (1/2 mark for correct calculation of bonus amount)
             (1/2 mark for correct calculation of total salary)
             (1/2 mark for correct displaying of values in jTotalTF)
             Note: double/int Data type may also be accepted for price
3. (a) What is the use of SAVEPOINT statement in MySql?                                            1
Ans: The SAVEPOINT statement defines a marker in a transaction. These markers are useful in
     rolling back a transaction till the marker.
      (1 mark for correct answer)
   (b) The Book_Name Column of a table MOVIE is given below:                                       2
                          Movie_Name
                          Kal Ho na ho
                          Singh is King
                          Bodyguard
                          Singham
                          Kal aaj aur Kal
   Based on the information find the putput of the following queries:
       (i)        Select Movie_Name from MOVIE where Movie_Name Like ‘_al%’;
       (ii)       Select Movie_Name from MOVIE where Movie_Name Like ‘%ng%’;
   Ans:(i) Kal Ho na ho
            Kal aaj aur Kal
       (ii) Singh is King
            Singham
        ( 1/2 mark each for correct line of output)

   (c) A Table “BOOK” in a database has 10 degree and 50 cardinality. How many rows
       and columns are there in the table “BOOK”?                                                  1
    Ans: Rows – 50
          Columns – 10
       ( 1/2 mark each for correct answer)
    (d) Differentiate between Alternate Key & Candidate Key.                                      2
   Ans:




          (1 mark for any correct difference/definition)
             OR
          (1 mark for illustrating with example)

   (e) Define Inheritance with reference to Object Oriented Programming.                          1
    Ans: Inheritance : Inheritance is a process of creating new class (derived class or sub
         class or child class) from existing class (base class or super class or parent class).
         The derived classes not only inherit capabilities of the base class but also can add
          new features of their own.
        (1 mark for any correct definition)
           OR
        (1 mark for illustrating with example)

   (f) An amount consisting of 2675.50 stored in a string variable strAmt. Now Mr. Saurabh
        wants to store it in double numeric variable dblAmt Write a Java statement to do this.    1
    Ans: dblAmt = Double.parseDouble(strAmt);
        (1 mark for correct answer)
        (Declaration of dblAmt as double is optional)

    (g) Poorvi, a student of class XII, created a table "RESULT". Percentage is one of the
        column of this table. To find the details of students whose percentage not between
        60 to 80, she wrote the following MySql query. which is showing error.                    2
          SELECT * FROM Result WHERE Percentage IS NOT BETWEEN 60 TO 80;
        Help Poorvi to run the query by removing the errors and write the correct Query.
    Ans: SELECT * FROM Result WHERE Percentage               NOT BETWEEN 60 AND 80;
          ( 1 mark each for correcting errors)
4. (a) What will be displayed in jTextField1 after executing the following code.                  2
      int X = 15, Z;
      Z = 10 + X++ ;
      If (Z>25)
             jTextField1.setText(Integer.toString(Z+5));
      else
             jTextField1.setText(Integer.toString(Z-5));
    Ans: 20
          (2 mark for correct answer)

   (b) Rewrite the following program code using if..else statement.                               2
       switch(code)
       {
          case 1:
               Day = "Monday" ; break;
          case 2:
               Day = "Tuesday" ; break;
          case 3:
               Day = "Wednesday" ; break;
          case 4:
               Day = "Thursday" ; break;
         Default:
               Day = "No Match" ; break;
       }
Ans:
          if (code == 1)
              Day = "Monday";
          else if ((code == 2)
              Day = "Tuesday" ;
         else if ((code == 3)
              Day = "Wednesday";
          else if ((code == 4)
              Day = "Thursday" ;
          else
              Day = "No Match" ;
          (1/2 mark for if)
          (1/2 mark for condition with if)
          (1/2 mark for else if)
          (1/2 mark for last else)

      (c) What will be displayed In jTextArea1 after executing the following statement:               1
                  jTextAreal.setText("Sample paper\n Class XII \t Informatics Practices") ;
      Ans: Sample paper
              Class XII    Informatics Practices
              (1 mark for correct output)
              (1/2 mark if '\n' and/or ' \t' not taken into account)
      (d) The following code has some error(s). Rewrite the correct code underlining all the
          corrections made:                                                                           2
          int a = 20, b=5, c;
          for(i=1; i<=5; i++)
          {
               if (a % b = 0);
                    c = a + b;
               else
                   c = a – b;
               b++;
               System.println(a+”, “+b);
         }
       Ans:
              int a = 20, b=5, c;
              for(int i=1; i<=5; i++)
             {
                  if (a % b == 0) -
                       c = a + b;
                   else
                        c = a - b;
                    b++;
                    System.out.println(a+", "+b);
               }
               (1/2 mark each for correcting any four errors)
                OR
               (1 mark for only identifying any four errors - without making any correction)

(e)      Given a string object namely 'Amount', having value as "500.75" stored in it. What will be
         result of the following:                                                                     1
         JOptionPane.showMessageDialog(null,(Amount.length()+Double.parseDouble(Amount)));
      Ans:       506.75
              (1 mark for correct answer)
(f) The following code has some error(s). Rewrite the correct code underlining all the corrections
    made:                                                                                         2
       int i = 1, j= 5; K=0;
       while (i<=3 & j>=1)
      {
          K + 5 = K;
          i++;
       }
       jTextField1.DisplayText(K);
   Ans:
       int i = 1, j= 5, K=0;
       while (i<=3 && j>=1)
      {
          K = K + 5;
          i++;
       }
       jTextField1.setText(K);
          (1/2 mark each for correcting any four errors)
           OR
          (1 mark for only identifying any four errors - without making any correction)

(g) ABC COMPANY deals in selling of “Clean & Clear” washing powder. For billing purpose
    they use following Java frame form. They offer following unit price on the basis of quantity
    ordered to Whole Saler or Retailer :

                                                          Unit Price
                         Quantity Ordered
                                                    Whole Saler     Retailer
                              >=500                      50            52
                         >=300 and <500                  55            58
                               <300                      60            65


    If customer is special then 5% discount is given on amount
                                                                        Object Type      Object
                                                                                         Name
                                                                                         billNumTF
                                                                                         qtyTF
                                                                            Text Field
                                                                                         unitPriceTF
                                                                                         netAmtTF
                                                                        Check Box        specialCB
                                                                          Option         wholeRB
                                                                          Button         retailRB
                                                                                         calcPriceBT
                                                                            Command
                                                                                         calcAmtBT
                                                                             Button
                                                                                         clearBT




    (i) Write the commands to disable the controls unitPriceTF, netAmtTF and calcAmtBT.            1
   Ans:       unitPriceTF.setEnabled(false);
              netAmtTF.setEnabled(false);
              calcAmtBT.setEnabled(false);
             ( 1 mark for setting any two as setEnabled(false))
      (ii) Write the code for calcPriceBT command button to assign value of unit price to the
           text field unitPriceTF on the basis of type and quantity ordered by the customer.    2
      Ans:
           int Price, Qty;
            Qty = Integer.parseInt(qtyTF.getText());
           if (wholeRB.isSelected())
            {
                 if (Qty >= 500)
                    Price = 50;
                 else if (Qty >=300)
                    Price = 55;
                 else
                    Price = 60;
            }
            else
            {
                 if (Qty >= 500)
                    Price = 52;
                 else if (Qty >=300)
                    Price = 58;
                 else
                    Price = 65;
             }
             unitPriceTF.setText(Integer.toString(Price));
           (1/2 mark for assigning quantity)
           (1/2 mark for condition with if else)
          (1/2 mark for assigning price correctly)
          (1/2 mark for assigning Price to text field)

      (iii) Write the code for calcAmtBT to calculate the net amount after finding the Total
              Amount as Quantity*Price and less discount 5% if he/she is special customer.      2
      Ans: int Qty, Price, Discount, Amount;
           Qty = Integer.parseInt(qtyTF.getText());
           Price = Integer.parseInt(unitPriceTF.getText());
           Amount = Qty * Price;
           if (specialCB.isSelected())
                 Discount = Amount * 5 /100;
           Amount = Amount – Discount
           netAmtTF.setText(“ ” + Amount);
          (1/2 mark for assigning quantity & price)
          (1/2 mark for calculating amount)
         (1/2 mark for checking special customer condition)
         (1/2 mark for calculating net amount & assigning net amount to text field)

5. (a) What is the purpose of DELETE command in MySql? How is it different from DROP
       TABLE command?                                                                           2
  Ans: DELETE command is used to delete the row(s) from the table. If we issue following
       Command :
       DELETE FROM BOOK;
       Will delete all the rows from table but structure of table will not be deleted.
       Difference:
                 DELETE command removes rows from a table while DROP TABLE
                      removes the table (rows as well as the structure)
                 DELETE is a DML command while DROP TABLE is a DOL command
                 The effect of DELETE command can be rolled back while the effect of
                     DROP TABLE cannot be rolled back
         (1 mark for purpose of DELETE command or explanation with example)
         (1 mark for anyone difference between DROP TABLE and DELETE commands)
  (b) Table Teacher has 7 records and Table Student has 100 records in it. Mr. Ravi wants to
      display all information stored in both of these related tables because every student is
      taught by every teacher. How many rows will get displayed on execution of this query and
      what relational operation is it known as?                                                  1
  Ans: It will display 700 rows and it is known as Cartisian Product.
       (1/2 mark each for correct answers)
(c)   Consider the table Worker given below Write commands in MySql for (i) to (iv) and output
      for (v) to (vii) :




      (i) To display the details of all WORKERs in descending order of DOB.                      1
      Ans: SELECT * FROM WORKER ORDER BY DOB DESC;
           (1/2 mark for SELECT)
          (1/2 mark for ORDER BY)
      (ii) To display NAME and DESIG of those WORKERs, whose PLEVEL is either
           P001 or P002.                                                                         1
      Ans: SELECT NAME, DESIG FROM WORKER WHERE PLEVEL = ‘P001’ OR
           PLEVEL = ‘P002’;
                                OR
      Ans: SELECT NAME, DESIG FROM WORKER WHERE PLEVEL IN( ‘P001’, ‘P002’);
           (1/2 mark for SELECT)
          (1/2 mark for WHERE)
       (iii) To display the content of all the WORKERs table, whose DOB is in between
             '19-JAN-1984' and '18-JAN-1987'.                                                    1
      Ans: SELECT * FROM WORKER WHERE DOB>=’1984-01-19’ AND DOB<=’1987-01-18;
                                 OR
         SELECT * FROM WORKER WHERE DOB BETWEEN ’1984-01-19’ AND ’1987-01-18;
           (1/2 mark for SELECT)
          (1/2 mark for BETWEEN)
         Note : Date in ‘DD-MON-YYYY’ format is also acceptable)
       (iv) To add a new row with the following:
            19, 'Daya Kishore', 'Operator', 'P003', '19-Jun-2008', '11-Jun-1984'                 1
       Ans: INSERT INTO WORKER VALUES (19, 'Daya Kishore', 'Operator', 'P003',
             '2008-06-19', '1984-6-11');
           (1/2 mark for INSERT INTO WORKER)
          (1/2 mark for writing VALUESin correct order)
      (v) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL;                             1
       Ans: COUNT (PLEVEL)          PLEVEL
                 1                   P001
                 2                   P003
                 3                   P002
            (1 mark for correct answer ½ marks for writing two rows correctly)

      (vi) SELECT MAX (DOB), MIN (DOJ) FROM WORKER;                                              1
      Ans: MAX (DOB)            MIN (DOJ)
            1987-07-12          2004-09-13
            ( ½ marks each for writing correct date)
            Note : Date in ‘DD-MON-YYYY’ format is also acceptable)
      (vii) SELECT DISTINCT DESIG FROM WROKER.                                                   1
       Ans: DISTINCT DESIG
              Supervisor
              Operator
              Mechanic
              Clerk
              (1 mark for correct answer)

6. (a) Write a MySQL command for creating a table "CLUB" whose structure is given below:     2
                             Table: POLICY
                  Field Name        Datatype         Size     Constraint
                  Member_No         Integer          10       Primary key
                  Member_Name       Varchar          20
                  Join_Date         Date
                  Member_Type       Char             1        Not Null
                  Charges           Decimal          10,2

    Ans: CREATE TABEL CLUB (Member_No Integer(10) Primary key, Member_Name
         Varchar(20), Join_Date Date, Member_Type Char Not Null, Charges Decimal(10,2));
         (1/2 mark for CREATE TABLE)
         (1/2 mark for fields with data types)
         (1/2 mark for PRIMARY KEY constraint)
         (1/2 mark for NOT NULL constraint)

    (b) In a Database Institute there are two tables EMPLOYEE and SALGRADE as show
        Below.




        Write the commands in SQL queries for the following:
       (i) To display the Name and Designation of those employees who have Date of joining
            after the year 2006.                                                                 1
       Ans: SELECT NAME, DESIG FROM EMPLOYEE WHERE YEAR(DOJ)>2006;
                                OR
       Ans: SELECT NAME, DESIG FROM EMPLOYEE WHERE DOJ>’2006-12-31’;
           (1/2 mark for SELECT)
           (1/2 mark for WHERE)

       (ii) To display Sgrade and Total Salary from table SALGRADE where total Salary is
            calculated as SALRAY + HRA                                                           2
       Ans: SELECT SGRADE, SALARY + HRA “TOTAL SALARY” FROM SALGRADE;
            (1/2 mark for SELECT SGRADE)
           (1 mark for SALARY + HRA “TOTAL SALARY”)
           (1/2 mark for FROM SALGRADE)
      (iii) To display Name, Salary and HRA from both the tables EMPLOYEE and SALGRADE
            for employees getting HRA more than 8000.                                  2
       Ans: SELECT NAME, SALARY FROM EMPLOYEE, SALGRADE
             WHERE EMPLOYEE.SGRA = SALGRADE.SGRADE AND HRA>8000;
            (1 mark for correct use of SELECT and FROM)
            (1 mark for correct use of WHERE clause)

    (c) In a database there are two tables " STOCK" and " DEALERS" as shown below:




      (i) Identify the foreign key in the table STOCK.                                            1
      Ans: Dcode
           (1 mark for correct answer)

      (ii) What output, you will get, when an equal-join query is executed to get the Item from
           Stock Table and Dname from Dealers table for Quantity more than or equals to 200?      1
      Ans: Item                      Dname
            Gel Pen Classic          Reliable Stationers
            Eraser Small             Clear Deals
            (1 mark for correct answer)

7. (a) Write URL of any two e-Governance website.                                                 1
  Ans: 1. www.incometaxindia.gov.in 2. supremecourtofindia.nic.in
       3. passport.gov.in           4. indianrail.gov.in
         (1/2 mark each for two correct e-Governance portal)
         Note : other valid URLs for e-Governance portal are accepted

  (b) Write two advantages of e-Learning sites for students.                                      1
  Ans:
                  Students can learn at their own pace.
                  A lesson can be revised any number of times at students' convenience.
                  Students can learn lessons at their homes at their convenient time.
                  Economic as compared to class room studies.
                  Many courses can be done which are not available in remote areas.
              (1/2 mark each for any two correct advantage)
    (c) Write three important features of e-Business. Give URL of one of the e-Business portals.   2
    Ans:
                    Goods sold through e-business are generally cheaper as cost incurred
                     in e-business is less compared to setting up a traditional business.
                  Customers can receive highly customizable service.
                  Sellers have better understanding of their customers' needs as customers
                     communicate through e-mails.
                  Orders can be placed online so that delivery can be done quickly.
           URLs : www.irctc.co.in, licindia.in, onlinesbi.com, tatamoters.com etc.
_                (1/2 mark each for any three correct points & ½ mars for any one correct URL)

    (d) Bhavna is creating a form for Railway Reservation. Help her to choose most appropriate
        controls from List Box, Combo Box, TextField, TextArea, Radio Button, Check box, Label
         and Command button for the following entries from user:                               2
        (i) A message "Enter Destination" in front of a Text Field.
        Ans: Label
        (ii) An input to choose Male or female for Gender.
         Ans: Option Button/ Radio Button
        (iii) An input for berth type from drop down list.
         Ans: Combo Box
        (iv) An input for Entering Passenger Name.
         Ans: TextField
         (1/2 mark each for correct answers)

				
DOCUMENT INFO
Categories:
Tags: Sample, Papers
Stats:
views:12
posted:1/22/2013
language:
pages:17
Description: IP More