Executing simple SQL SELECT query in Java using JDBC Statement
Basics We will see how to execute a simple SQL SELECT query in Java using JDBC Statement. Step 1 – Load Driver Class For connecting to the database we need to have a suitable Driver class loaded. This Driver class helps us to get the Connection to the corresponding database.…
SQL query with IN operator working SLOW?
Problem Statement :- While working on one of the project, we came across the following requirement:- Given a list of unique IDs, check whether for each ID the data is exactly the same in the database tables of two different systems. For non-matching data dump the unique ID in a…
SQL SELECT query performance improvements using JDBC
Sometimes our application needs to fetch a large amount of data from database systems and do some in memory processing on top of it. The SELECT query to fetch the data may contain a WHERE clause, IN operator etc and the query may return millions of rows. Our application and…
Executing Multiple Update / Insert SQL queries using JDBC on Oracle – Performance improvements
Sometimes we need to execute multiple update/insert queries on our DB. The performance of these queries can be critical for our application. We will see how we can improve performance of multiple update/insert queries on oracle. Create Index on the column/columns used in the WHERE clause for update queries. This…
Base64 basics – What? Why? How?
What is base64 encoding? Base64 encoding schemes are commonly used to represent binary data in ASCII text. Any binary data is represented in text using only 64 characters from Ascii set. The particular set of 64 characters chosen to represent the 64 place-values for the base varies between implementations. The…
Stack Implementation Using Array
Adding and Searching in Java ArrayList – Usage and Pitfalls
ArrayList ArrayList in Java implements List Interface. It accepts even null elements. ArrayList is not synchronized and therefore external synchronization is required while working with ArrayList in Multi-threaded environments. We will see how to add elements and search elements from an ArrayList. Adding elements to an ArrayList is straightforward. Searching…
Basics of Unicode and Encodings
Unicode What is Unicode? Its just a code point assigned to a letter from every alphabet. Every letter in every alphabet is assigned a unique number by the Unicode consortium which is represented as- U+0041. This unique number is called a code point. The latest version of Unicode contains a…