Friday, September 30, 2011

Infosys Interview Questions (23rd sep 2011)


1.Explain u r project architecture?
2.What is staging area and why u r using in ur project?
3.if u have a source system contain records of three months jan,feb,march I want to load the data in to  three targets jan,feb,mar draw the mapping?
4.diff b/w static lkp and dynamic lkp?
5.what is different types of joins in jnr t/r?
6.in filter t/r I can give filter condition to 4 what can happened?
7.In agg t/r I can use sorted input option but I cant pass sorted data what happened?
8.explain normalize t/r give one example how it can convert single input record to multiple o/p records?
9.what is verboseinitialization?

Thursday, September 22, 2011

What is the difference between a Primary Key and a Unique Index?


  1. Column(s) that make the Primary Key of a table cannot be NULL since by definition, the Primary Key cannot be NULL since it helps uniquely identify the record in the table. The column(s) that make up the unique index can be nullable. A note worth mentioning over here is that different RDBMS treat this differently –> while SQL Server and DB2 do not allow more than one NULL value in a unique index column, Oracle allows multiple NULL values. That is one of the things to look out for when designing/developing/porting applications across RDBMS.
  2. There can be only one Primary Key defined on the table where as you can have many unique indexes defined on the table (if needed).
  3. Also, in the case of SQL Server, if you go with the default options then a Primary Key is created as a clustered index while the unique index (constraint) is created as a non-clustered index.  This is just the default behavior though and can be changed at creation time, if needed.
So, if the unique index is defined on not null column(s), then it is essentially the same as the Primary Key and can be treated as an alternate key meaning it can also serve the purpose of identifying a record uniquely in the table.