PUB ID

Sunday, 28 February 2016

12 Rules of Overriding a Method in Java You Should Know

Rule #1: Only inherited methods can be overridden.
Rule #2: Final and static methods cannot be overridden.
Rule #3: The overriding method must have same argument list.
Rule #4: The overriding method must have same return type (or subtype).
Rule #5: The overriding method must not have more restrictive access modifier.
Rule #6: The overriding method must not throw new or broader checked exceptions.
Rule #7: Use the super keyword to invoke the overridden method from a subclass.
Rule #8: Constructors cannot be overridden.
Rule #9: Abstract methods must be overridden by the first concrete (non-abstract)          subclass
Rule #10: A static method in a subclass may hide another static one in a  superclass, and that’s        called hiding.
Rule #11: The synchronized modifier has no effect on the rules of overriding.
Rule #12: The strictfp modifier has no effect on the rules of overriding.

for more details with examples click here

what is the difference between database and datawarehouse?

The purpose of a data warehouse is to provide flexible access to the data to the user. Data warehousing generally refers to the combination of many different databases across an entire enterprise. Data warehouses store current as well as historical data, so that all of the relevant data may be used for analysis. The analysis helps to find and show relationships among the data, to extract meaning from the data.
A database, on the other hand, is the basis or any data storage. It is an organized collection of data. Data from various sources are collected in to a single place, this place is the database. The data is organized into a structure of some sort, mainly according to a database model. The most commonly used database model is the relational model, others include hierarchical model, network model, etc.

Some differences between a database and a data warehouse:
  • A database is used for Online Transactional Processing (OLTP) but can be used for other purposes such as Data Warehousing.
  • A data warehouse is used for Online Analytical Processing (OLAP). This reads the historical data for the Users for business decisions.
  • In a database the tables and joins are complex since they are normalized for RDMS. This reduces redundant data and saves storage space.
  • In data warehouse, the tables and joins are simple since they are de-normalized. This is done to reduce the response time for analytical queries.
  • Relational modeling techniques are used for RDMS database design, whereas modeling techniques are used for the Data Warehouse design.
  • A database is optimized for write operation, while a data warehouse is optimized for read operations.
  • In a database, the performance is low for analysis queries, while in a data warehouse, there is high performance for analytical queries.
  • A data warehouse is a step ahead of a database. It includes a database in its structure.

In Simple words a dataware house is a  collection of different databases.





Friday, 5 February 2016

what is Serialization?

The Process Of Sending An Object Data Across the Network is called as Serializaton.

But Strictly speaking it is the process of converting an object from java support from to stream supported form (or) stream of bytes.

To serialize any object the class must be implements Serializable interface.

Serializable interface is present in java.io.package.