Page 76 - IP
P. 76

2.4 Write a function in Java that takes principal, rate and time as parameter and
               returns Simple Interest.                                                               2

               2.5 What id inheritance? Name any two types of inheritance.                            2
               2.6 What do you mean by JDBC? Explain the following line:
                       JOptionPane.showMessageDialog(this, e.getMessage());                           2

               Q – 3 Answer the following questions:
               3.1     Write MySQL command to display the list of existing databases.                 1

               3.2     Table  Employee  has  4  records  and  Table  Dept  has  3  records  in  it.  Mr.  Jain
                       wants to display all information stored in both of these related tables. He forgot
                       to specify equi-join condition in the query. How many rows will get displayed on
                       execution of this query?                                                       1

               3.3     Sanju is not able to change a value in a column to NULL. What constraint did
                       she specify when she created  the table.                                       1

               3.4     Mr. William wants to remove all the rows from Inventory table to release the
                       storage space, but he does not want to remove the structure of the table. What
                       MySql statement should he use?                                                 1

               3.5     In a Database School there are two tables Employee and Dept as shown below:2
                              Table : Employee
                        EmpI      Name          Sal     Deptn
                           D                              o
                         T001     Vishakh      3400       10
                                  a              0
                         T002     Mridual      3200       50
                                                 0
                         T003     Manish       4500       20
                                                 0

                              Table : Dept
                        Deptn     DName       LocationI
                           o                      D
                          10      Financ        HH02
                                  e
                          20      HR            FF02
                          30      Sales         AB01
                       a)     Identify the foreign key in the table Employee.

                       b)     What output, you will get, when an equi-join query is executed to get the
                       NAME from Employee table and corresponding DNAME from Dept table ?

               3.6  Explain the fundamental rules of UNION clause in Select Query.                    2
               3.7     What is the purpose of ALTER TABLE command in MySQL? How is it different
               from UPDATE command?                                                                   2
                                                        Section - B
   71   72   73   74   75   76   77   78   79   80   81