| Author |
Topic |
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-02-10 : 01:07:54
|
| Gurus..any answers to the following interview question..„X If a database is in 3NF, how many minimum number of tables should it have?„X How to find out which stored procedure is recompiling?„X How to stop stored procedures from recompiling?„X Which event (Check constraints, Foreign Key, Rule, trigger, Primary key check) will be performed last for integrity check ?„X After removing a table from database, what other related objects have to be dropped explicitly ?„X How can you get an identity value inside a trigger, there are different ways to get identity value, explain why you will prefer one on another.„X If a user doesnt have a permission on a table, but he has permission to a view created on it, will he be able to view the data in table?„X A user is a member of Public role and Sales role. Public role has the permission to select on all the table, and Sales role, which doesnt have a select permission on some of the tables. Will that user be able to select from all tables ?------------------------I think, therefore I am |
|
|
rihardh
Constraint Violating Yak Guru
307 Posts |
Posted - 2004-02-10 : 03:29:35
|
| Hmm... questions in job interviews certainly make sense, but they shouldn't be to hard or tricky (although it depends on the open job position).Was this some kind of written test or did you have to answer them right away? |
 |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2004-02-10 : 03:53:57
|
quote: Originally posted by ravilobo „X How to stop stored procedures from recompiling?
--To avoid the recompilation use sp_executesql instead of execute in the stored proc.--Make use of hints like Keep Plan which is used to stop recompilations of the stored procs using temperory tables.--Break one large stored proc into multiple small stored procs.He is a fool for five minutes who asks , but who does not ask remains a fool for life! |
 |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2004-02-10 : 04:44:53
|
quote: „X If a user doesnt have a permission on a table, but he has permission to a view created on it, will he be able to view the data in table?„X A user is a member of Public role and Sales role. Public role has the permission to select on all the table, and Sales role, which doesnt have a select permission on some of the tables. Will that user be able to select from all tables ?
Yes or No??The questions arent written correctly What do you mean by "If a user doesnt have a permission on a table"Do you mean the user/role is revoked or deniedIf it is revoke then the answer to both is Yes. I always think revoke as deny with overide, so if the user/role does have permissions granted to them anywhere in the hierarchy then the revoke is overiddenIf it is deny then the answer is no. Deny always wins no matter where it is in the hierarchy |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2004-02-10 : 17:45:22
|
quote: Originally posted by ravilobo „X If a database is in 3NF, how many minimum number of tables should it have?
Onequote: „X How to stop stored procedures from recompiling?
I'd try a good spanking. Or maybe ground them from seeing their friends.quote: „X Which event (Check constraints, Foreign Key, Rule, trigger, Primary key check) will be performed last for integrity check ?
I think trigger (damn I loved that horse!) will be last.quote: „X After removing a table from database, what other related objects have to be dropped explicitly ?
Not sure what you're looking for AFTER dropping a table, but BEFORE you drop it there are some things you need to do like drop FKs pointing to it.Did I get the job? Oh well, sorry, I'm already self-employed, but thanks for the offer.--------------------------------------------------------------Find more words of wisdom at [url]http://weblogs.sqlteam.com/markc[/url] |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2004-02-10 : 17:50:38
|
quote: If a database is in 3NF, how many minimum number of tables should it have?
I'd call the interviewer a F^*&King idiot and walk out the door...DavidM"SQL-3 is an abomination.." |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-02-10 : 17:54:49
|
HeheheI read the question and was going to post a combination of Mark and David's answers. Then I scolled down... sniped I guess I have to say "Ditto"Damian |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2004-02-10 : 17:58:35
|
quote: Originally posted by byrmol
quote: If a database is in 3NF, how many minimum number of tables should it have?
I'd call the interviewer a F^*&King idiot and walk out the door...DavidM"SQL-3 is an abomination.."
David, I'm really worried that you're suppressing your feelings here. You need to open up a little bit and let others know how you really feel. I thought much the same, though. And it reminded me of an interview where they wanted me to give them the definition of each of the first 3 levels of normalization. I'm thinking to myself, "Do you want someone to recite the textbook? Or are you looking for someone who works at that level without stopping to think 'What was level 2 again?'"--------------------------------------------------------------Find more words of wisdom at [url]http://weblogs.sqlteam.com/markc[/url] |
 |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-02-10 : 23:49:08
|
| Gurus...thanks a lot.------------------------I think, therefore I am |
 |
|
|
|