Skip to main content

Posts

Showing posts from August, 2012

Databasse Interview Questions

1) Delete vs Truncate vs Drop Delete deletes all/ a few the records of the table. Truncate deletes all the records of the table, where as drop deletes the table and any indexes,privileges associated with the table. Delete is a DML operation, takes more time as it can be rolled back so will store the data in the undo space where as Truncate and Drop are DDL statements and can not be rolled back, so they are faster. From Oracle 10 the database tables can be undroppped. FLASHBACK TABLE TABLE_NAME TO BEFORE DROP; 2) SQL Joins can be classified into Equi join and Non Equi join. 1) SQL Equi joins It is a simple sql join condition which uses the equal sign as the comparison operator. Two types of equi joins are SQL Outer join and SQL Inner join. For example: You can get the information about a customer who purchased a product and the quantity of product. 2) SQL Non equi joins It is a sql join condition which makes use of some comparison operator other than the equal sign like >,

Core Java Interview Questions

1) Is Java Compiled or Interpreted languages? Java is both, first it is compiled by Java Compiler into ByteCode(which is a form of machine language just for the JVM). Then JVM interprets this byte code and converts it into machine understandable language. 2) How JVM Memory is organized? Which are stored in which part of JVM Memory? Classes and Methods are stored in Perm Gen space. String internalized are also stored in Perm Gen space. This space is very limited compared to the HeapSize. 3) Difference between PrintWriter and Buffered Writer PrintWriter is used for small and dirty applications where we can display/write the messages on to the console. More over PrintWriter swallows the exceptions, later can read the exceptions by calling checkError() method. 4) Difference between BufferedWriter vs FileWriter BufferedWriter stores the data in the buffer and won't make those many calls to the operating system, it also lets us to specify the size of the buffer, if the buffer size is s