Himanshu shriv has Published 45 Articles

Difference Between Constructor Injection and Setter Injection in Spring

Himanshu shriv

Himanshu shriv

Updated on 09-Sep-2020 08:49:37

21K+ Views

Dependency Injection is a practice to pass dependent object to other objects. Spring has two types of Dependency Injection :Constructor based Injection -When container call the constructor of the class. It should be used for mandatory dependencies.Let’s say Class X is tightly  dependent on Class Y then we should use ... Read More

Difference Between JDBC and Hibernate

Himanshu shriv

Himanshu shriv

Updated on 14-Jul-2020 09:24:01

6K+ Views

JDBC is acronym of Java database connectivity. It is used to connect your application to the database and transactions . It is an open source Java api.  Hibernate is also used for connect your application to database and to do database related transactions but with different approach. It has a ... Read More

Difference between Object level lock and Class level lock in Java

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 10:10:57

7K+ Views

In multithreading environment, two or more threads can access the shared resources simultaneously which can lead the inconsistent behavior of the system. Java uses concept of locks to restrict concurrent access of shared resources or objects. Locks can be applied at two levels −Object Level Locks − It can be ... Read More

Difference between oracle golden gate and oracle active guard in the oracle

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 09:53:06

1K+ Views

Oracle golden gate and oracle active data guard is the data replication technologies. They both are used for data replication but with different strategy. As per the oracle docs −Oracle Active Data Guard provides the best data protection and availability for Oracle Database in the simplest most economical manner by maintaining ... Read More

Difference between logical and physical standby database in the oracle

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 09:49:10

2K+ Views

Logical standby and physical standby database in two different types of standby database. In case of any failure of primary database Oracle transfer data from primary database to the standby database. This approach helps us to recover data from standby database in case of any failure.Logical standby database is not ... Read More

Difference between Inner and Outer join in SQL

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 09:41:05

2K+ Views

In Relational database tables are associated with each other and we used foreign key to maintain relationships between tables. We used join clause to retrieve data from associated tables. The join condition indicates how column in each table are matched against each other. There are two types of joins clause in ... Read More

Difference between ETL and ELT in SQL Server

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 09:29:42

857 Views

ETL stands for Extract, Transform and Load. ETL tool is used to extract data from the source RDBMS database and transform extracted data such as applying business logic and  calculation, etc. and  then load data into the target data warehouse. In ETL tool,  transformation of the data performed at the ... Read More

Difference between sequence and identity in Hibernate

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 08:04:06

10K+ Views

Hibernate or JPA support 4 different types of  primary key generator. These generators are used to generate primary key while inserting rows in the database. Below are the primary key generator   −GenerationType.AUTOGenerationType. IDENTITYGenerationType.SEQUENCE GenerationType.TABLEGenerationType. IDENTITY − In identity , database is responsible to auto generate the primary key. Insert a row ... Read More

Difference between Collection.stream().forEach() and Collection.forEach() in Java

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 08:02:10

920 Views

Collection.stream().forEach() and Collection.forEach() both are used to iterate over collection. Collection.forEach()  uses the collection’s iterator. Most of the collections doesn’t allow the structurally modification while iterating over them. If any element add or remove while iteration they will immediately throw concurrent modification exception. If Collection.forEach() is iterating over the synchronized collection ... Read More

Difference between readObject and readResolve method in serialization

Himanshu shriv

Himanshu shriv

Updated on 21-Jan-2020 07:43:16

2K+ Views

Serialization is the process of converting object to stream byte and storing byte stream in database or memory. Class which implements java.io.Serializable interface can be serialized. Class which is implementing this interface gives the responsibility to JVM for serialize or persist java object As per the oracle docs −readObject method − Each ... Read More

Advertisements