Friday, October 29, 2010

General technical interview questions

What is the Unix command for listening to ports?
netstat -an (local, remote, state)

What is "having" in reference to databases?
when using group by, to aggregate

What are the two flavors of Unix?
i have used mostly solaris and linux a little..but in general, there are system V and BSD

Give an overview of normalization
Normalization is a physical data modelling process where we can avoid update-delete anamolies in db design.

What is denormalization and why would you use it?
some times, we may use denormalization to access data faster for aggregation, material views

What are the ACID properties of a transaction?
atomicity(all or nothing)
consistency (takes db from one consistent state to other)
isolaton (no concurrent updates to data)
durability(once txn commits, it is durable and can be restored)

How would you improve a poor performing query?
use indexes, improve h/w, caching, tune it, hints,

Write an SQL query that returns department name, and the number of employees in each department (it's a single table query)
select dept_name, count(*) from dept group by dept_name

How do you tune a sql statement?
use explain plan or sql analyzer to see the execution path
add hints
rewrite sql
replace sql with pl/sql

What is a prepared statement?
this is compiled and runs faster

What is a hash join?
in memory join

What is a nested loop join?
two for loops

What is a merge sort join?
you can optimize a join by eliminating some row according to sort order

understand row level lock and how it migrates to table level lock

understand user security authentication in unix and location of password files
/etc/passwd

what is chmode command in unix?
file permissions....421 (user group other)

give a jdbc example in a class
load driver, drivermanager.getconnection, conn.preparestatement, statement.execute(exeUpdate)

what is the difference between vector and array and what is best in implementation?
vector can grow, holds objects, threadsafe

what is an inode and what is missing (unix)
inode contains file metadata

where are passwords stored in unix?
/etc/passwd

What is a stored procedure?
sql block

about himself, how long has he been with the company, what he does and who does he report to general question. talk about general architecture related work, specific contributions to the project, achievements, with information about application and database tuning, J2EE, industry standards and best practices, common design patterns, software development methodology (like releases, bug fixes, marketing requirements, technical specifications, application-business-data modeling etc)

is your current role and some of the projects you have worked on?

how did you hear about xxx?

what are some of the benefits of data virtualization?

1) primarily to bring together data from disparate data sources (such as legacy apps, databases, xml-flat files, other datasources) and provide real time view of the data in a much faster way than db warehouse.
2) provide an abstraction layer on top of real datasources for application developers to integrate their apps)

how long does it take to implement a change in the data warehouse and what is the process followed?
generally many days...need to change several batch jobs that may run during night and follow a enterprise configuration change procedure (depending on corp IT change policies)

how long did it took for developing an etl process?
generally several days...need to find what data needs to extracted by gathering business requirements and identify where data exists.

what is the process followed to deploy code to production?
follow corporate change control procedures...typically involves build, test, release cycle with appropriate approvals at each stage

how do you test before deploying in production, do you prepare and execute test cases?
yes. However, most developers only do unit testing..Testing beyond unit testing is done by specialized testing teams such as QA group that focuses on integration-system-performance testing

what was the most challenging situation you have faced and how did you solve it?
Most challenging situation is to understand at a high level the system requirements and design the system without focusing on too much details first

what is a stored procedure, why would you use it instead of say another application program?
A block of code that encapsulates a group of SQL statements and some logic...A stored procedure is preferred in some situations because it is executed on the database server, pre-compiled, and most work can be delegated to DB server

what is a prepared statement?
compiled sql statement

how does database locks work, what is row level lock and table level lock and where is table level lock used?
row level locks are very fine grained....table level locks are to be used sparingly..

what are the different databases you have worked on?
i have mostly worked on oracle...early during my career, I have worked a lot with DB2

imagine yourself as the dba and user complained the report query is not performing well, what do you do?
I will look at what SQL is executed for the report, try gethering execution plan data and tune it for performance

what are the commands for optimizer, query plan generator?
explain plan, tkprof

what are the database statistics tools that you used?
tkprof...oracle enterprize manager has some graphical user interfaces that can aid in viewing database statistics

what kind of java programming have you done?
primarily enterprise application development using j2ee based technologies...core java, jdbc, jms, xml parsing, UI (jsf, jsp, servlets), middleware development

what are the key differences between java and other programming languages such as c++?
for ex, java is for "write once, run anywhere" paradigm which is based on java virtual machine...with C++, you have to compile the same program for different operating systems..there are several other differences in terms of language constructs and syntax..

what is garbage collection?
garbage collection is freeing up space allocated on heap for storing java objects created during program execution

what is the difference between interface and abstract class?
interface defines what a system can do without specifying exact implementation...
Abstract classes can have some implementation and some interface definition

what is synchronization?
synchronization is to allow access for data by multiple threads in a non-destructive way

what is web services and what is your experience in the web services area?
a webservice is a platform independent way to communicate over http with many disparate systems. I have developed many interafces using web services both on producing and consuming side.

left outer join
- returns all rows from left side
equals, hashcode
- Equal objects have equal hashcode

exception hierarchy
- throwable is at the top with two subclasses: Errors, Exceptions
- Exceptions are two types: checked and unchecked(Runtime)

Access modifiers
- protected means within package and subclasses outside
- nothing means within package only

No comments: