Back to Top

Tuesday, 14 January 2014

FRAMEWORK: ORM – Object Relational Mapping

    ORM (Object Relational Mapping) is a programming concept of a mapping between Object Oriented Programming and Relational Database. It’s the technique to frame the components of Relational Database to Object Oriented Programming, to do CRUD operations. It creates an object oriented representation of a relational database, so that developers can push or pop data to database as an object.

  Databases are designed on the basis of Mathematical principle where as programming languages like Java, C++, C# are based on Object Oriented Programming principle. Objects have behavior and attribute, it’s good on business modeling where on the other hand database is only deals with large amount of data. Now due to this conceptual deference, in real life scenario, database transactions become unmanageable, when we are dealing with large amount of data transaction. So to bridge this difference, ORM is introduced. It’s the process of mapping tables to class objects, so that data transactions could be easier.


  1. Create classes replicating database tables, in programming language side, so that programs can interacts with objects not direct tables.
  2. Provides APIs for normal CRUD (Create Read Update Delete) operations, so no need to write queries for that.
  3. Some provides query language which is database independent.
  4. Provision to interact with multiple databases.
  5. Helps to manage business logic easily when dealing with big amount of data, and lots of database transaction.


  1. No need to use when your application doesn't involve much database interaction.
  2. Little bit heavier than native database connectivity.

Object Relational Mapping

Tuesday, 14 January 2014 by Anijit Sarkar · 11 Read more »

Saturday, 11 January 2014

JAVA: Data Types Conversion Chart

      In Java Programming Language, we must declare a variable name and type, before using it. The data type of a variable defines the the type of value it will contain. Java supports total 8 types of primitive data types. The name of this data types are all reserved as keywords.
Among which, 1) byte, 2) short, 3) int & 4) long can store integer values of different range.
5) float and 6) double can store floating numbers of different range.
7) boolean  can store only true/false. It is used as flag, to perform boolean operation.
8) char can store a single 16-bit Unicode character of range from '\u0000' (0) to '\uffff' (65,535).
Apart from these, Java also provides a String data type which is defined as a Class (java.lang.String). It can contains alpha numeric values.


  • Type: Integer (8-bit signed two's complement integer).
  • Range:  from -128 [-2^(8-1)] to 127 [(2^(8-1))-1].
  • Memory: 1 byte
  • Default Value : 0
  • Example: byte b = 0;


  • Type: Integer (16-bit signed two's complement integer).
  • Range:  from -32768 [-2^(16-1)] to 32767 [(2^(16-1))-1].
  • Memory: 2 bytes
  • Default Value : 0
  • Example: short s  = 0;

  • Type: Integer (32-bit signed two's complement integer).
  • Range:  from -2147483648 [-2^(32-1)] to 2147483647 [(2^(32-1))-1].
  • Memory: 4 bytes
  • Default Value : 0
  • Example: int i = 0;


  • Type: Integer (64-bit signed two's complement integer).
  • Range:  from -9223372036854775808 [-2^(64-1)] to 9223372036854775807 [(2^(64-1))-1].
  • Memory: 8 bytes
  • Default Value : 0L
  • Example: long l = 0L;


  • Type: Float (Single precision 32-bit IEEE 754 floating point).
  • Range:  from 1.4E-45F to 3.4028235E+38F.
  • Memory: 4 bytes
  • Default Value : 0.0f
  • Example: float f = 0f;


  • Type: Float (Single precision 64-bit IEEE 754 floating point).
  • Range:  from 4.9E-324D to 1.7976931348623157E+308D.
  • Memory: 8 bytes
  • Default Value : 0.0d
  • Example: double d = 0d;


  • Type: boolean (boolean flag - true / false).
  • Range:  NA.
  • Memory: virtual machine dependent
  • Default Value : false
  • Example: boolean b = false;


  • Type: Character (a single 16-bit Unicode character).
  • Range:  from '\u0000' (0) to '\uffff' (65535).
  • Memory: 2 bytes
  • Default Value : '\u0000'
  • Example: char c = '\u0000';


  • Type: String Character (a class can store alpha numeric value).
  • Range:  NA
  • Memory: NA
  • Default Value : null
  • Example: String s = "Hello World";

Anijit Sarkar

Saturday, 11 January 2014 by Anijit Sarkar · 14 Read more »

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar
blog links Web Directory Academics Blogs