Author: Dasun De Silva

I m senior software engineer with more than 5 years of experiences in software development. I used to be developed using multiple programming languages and concept my programming and software engineering life. Here I am sharing my experience with code snippets and software technical concepts.

How to find Constraints on Oracle database

You need to find constraints of oracle database. Use below query for that.

FROM user_cons_columns
WHERE table_name = ”;

Further if you want to find more details on constraints then use below query.




Today I m going to explain outer apply condition in MS SQL to you.

According to my database programming experience I can confirm that outer apply is faster than a sub queries. First of all I will write a sub query example and then I will move to outer apply.

, S.lName
, (SELECT C.teacherName FROM Class C WHERE C.cType = ‘English’ AND = C.ID) AS ‘classTeacher’
FROM Student S

Above I have mentioned a simple sub query example. But you can feel this can be written using a join as well. Yes. That is true. But there can be some situations we have to write sub query as well. That case we can use outer apply.

Now I have written outer apply example below.

( SELECT S.fName
, S.lName
FROM Student S ) T1
SELECT C.teacherName AS ‘classTeacher’ FROM Class C WHERE C.cType = ‘English’ AND = C.ID
) T2

The second query is faster than first query.

If you got any help from this please like or comment.
Any confusion please let me know.


Java Upcasting

When reference variable of a parent class refers to an object of child class then we call it upcasting.

Example is below.

Class Bank(){

Class ComBank extends Bank(){

Class BankModule(){
public static void main(String args[]){
Bank bank = new ComBank(); // This is the process of upcasting

Java Static Blocks, Variables and Methods

Static Member :-

What is a static member ? Static member is a member of a class that which is not interact or associate of  an instance of a class. This can be access without creating a object of a class. Moreover static members are being executed when class load in to the memory.  Further static members are accessible from any where and certain member is common for every instances. All objects use some instance of a static member.



What is keycloak ?

This is an authentication service provided by Apache and  developers no need to worry about high secure user authentication if they are going to use keycloak.

They can set up keycloak server and get connect with keycloak server when authenticating they applications.

How to use Keycloak :-

01. Download keycloak

02. Unzip or gunzip the tar file.

03. Go  to bin and run standalone


04. Then load http://localhost:8080/auth and create admin user. Now you should be able to login as admin via http://localhost:8080/auth/admin/

05.  Now you have to create realm user as below.


06. Now create user under  the newly created realm




Now you can login to that user account under below url.


07. Now you have to a client add-client.png

This client is the web application that developer have developed and which has authentication panel to login but need to secure by keycloak. Once created the client you can edit that client profile. Click on installation tab and select Keycloak OIDC JSON and then click download button.

Downloaded file would be some thing similar to below.

“realm”: “demo”,
“auth-server-url”: “http://localhost:8080/auth”,
“ssl-required”: “external”,
“resource”: “testclient”,
“public-client”: true

This file can be placed where your project HTML file placed.

Install Jboss :- Follow below URL