MohitKrishna's Profile




  • Asked on April 8, 2019 in Java.

    The JVM only deals with method overriding. A method is overridden by adding a method with the same signature in a derived class (the only allowed difference is in the return type, which is allowed to be more specific). The signature encodes the method’s name, as well as the types of the parameters and the return type.

    Method overloading means having multiple methods with the same “simple name” but different signatures. At compile time, the javac compiler chooses one of the same-named methods based on the types of the arguments and places its signature in the compiled .class file. A method invocation in compiled Java bytecode must specify the signature of the callee.

    • 2 answers
    • 0 votes
  • Asked on February 26, 2019 in Database.

    The difference between ETL and OLAP tool is that

    ETL tool is meant for the extraction of data from the legacy systems and load into specified data base with some process of cleansing data.

    Example: Data stage, Informatica etc.


    While OLAP is meant for reporting purposes on OLAP data available in the multidirectional model.

    Example: Business Objects, Cognos etc.

    • 5 answers
    • 0 votes
  • View

    Views are a logical virtual table created by “select query” but the result is not stored anywhere in the disk and every time we need to fire the query when we need data, so always we get updated or latest data from original tables.

    Performance of the view depends on our select query. If we want to improve the performance of view we should avoid using join statement in our query or if we need multiple joins between table always try to use the index based column for joining as we know index based columns are faster than a non-index based column.

    View also allows storing the definition of the query in the database itself.

    Materialized View

    Materialized views are also the logical view of our data-driven by the select query but the result of the query will get stored in the table or disk, also the definition of the query will also store in the database.

    When we see the performance of Materialized view it is better than normal View because the data of materialized view will be stored in table and table may be indexed so faster for joining also joining is done at the time of materialized views refresh time so no need to every time fire join statement as in case of view.

    • 6 answers
    • 0 votes

    • It is  a storage method i n data is written into the cache every time a change occurs,but is written into the corresponding location in main memory only at specified intervals.
    • The data in the cache memory is called FRESH , and the corresponding data in the main memory is called STALE. When a data location  is updated in write back mode.
    • Write back optimizes the system speed because it takes less time to write data into cache alone, as compared with writing the same data into both cache and main memory. However, this speed comes with the risk of data loss in case of a crash or other adverse event.
    • write back method is preferred for the applications where  occasional data loss events can be tolerated.
    • In more critical applications such as banking and medical device control, an alternative method called write through practically eliminates the risk of data loss because every update gets written into both the main memory and the cache. In write through mode, the main memory data always stays fresh.


    • Preconditions in object-oriented software development are an essential part of design by contract.
    • The precondition for any routine defines any constraints on object state which are necessary for successful execution. From the program developer’s viewpoint, this constitutes the routine caller’s portion of the contract. The caller then is obliged to ensure that the precondition holds prior to calling the routine. The reward for the caller’s effort is expressed in the called routine’s postconditions.

    For example

    The routine in the following example written in Eiffel takes as an argument an integer which must be a valid value for an hour of the day, i. e., 0 through 23, inclusively. The precondition follows the keyword require. It specifies that the argument must be greater than or equal to zero and less than or equal to 23. The tag “valid_argument:” describes this precondition clause and serves to identify it in case of a runtime precondition violation.

        set_hour (a_hour: INTEGER)
                -- Set `hour' to `a_hour'
                valid_argument: 0 <= a_hour and a_hour <= 23
                hour := a_hour
                hour_set: hour = a_hour
    • 6 answers
    • 0 votes
  • Asked on February 4, 2019 in Database.
    select *
    from Db_1.dbo.Name n
    join Db_2.dbo.Marks m on n.Rollno = m.Rollno

    The above query is the syntax for join to join tables from different Database on the same server : – Db_1 and Db_2 are the two databases. Db_1 has a table called Name with a column Rollno and Db_2 has a table called Marks with a column Rollno.

    The SQL server allows us to join  tables from different database .Like wise we can also join tables on the same database on the same server.In this case we dont have to specify  the database name when  they belong to the same database.

    • 5 answers
    • 0 votes