Re: Oracle DBA Interview Questions

From: John Jones <jmj22026_at_us1j69.glaxo.com>
Date: 1996/06/13
Message-ID: <31C0704C.634B_at_us1j69.glaxo.com>#1/1


IF you are going to have the person design the tables, a good question I have found that stumps a lot of people if how to handle a many to many table. Say you have and employee table and a department table and any given employee can have many departments, how would you normalize this design. The answer would be to have a Cross Reference table between the two tables. The employee table would have the demographic info, the department table would be a normailized table with each department listed once, and the cross reference table would have each employees department listed with one record for each department they are associated with.

Another qood question is how Oracle handles "NULL" values and how do you go about comparing two or more records that could or could not have null values associated with them. The answer would be that null is just that "NULL" meaning nothing and you can not just do an = to null. You can see if a value is null by " is x null ". But if you try to compare and see if two columns are equal to each other, they will not compare, even if both columns are null. Nothing does not equal to nothing. You have to use the nvl() function to do the compare. I have asked this question of about a dozen potential candidates and so far only one has answered correctly. Received on Thu Jun 13 1996 - 00:00:00 CEST

Original text of this message