January 9, 2013 at 8:52 pm
In one of my tests I was asked this question
you are working as part of the database team for the zoro online company . a junior database developer approaches you and tells you that they wish to create 10 databases for a group of interns who are joining the company on work experience. each database requires all the tables from the "stock" schema of the development database. which one of the following pieces of advice would be best to give the junior database developer?
A) copy the required tables into the model database and then create the 10 database
B) copy the required tables into the master database and then create the 10 database
C) copy the required tables into the msdb database and then create the 10 database
D) copy the stock schema into the model database and then create the 10 database
E) copy the stock schema into the master database and then create the 10 database
January 9, 2013 at 9:42 pm
fearghalreilly (1/9/2013)
In one of my tests I was asked this questionyou are working as part of the database team for the zoro online company . a junior database developer approaches you and tells you that they wish to create 10 databases for a group of interns who are joining the company on work experience. each database requires all the tables from the "stock" schema of the development database. which one of the following pieces of advice would be best to give the junior database developer?
A) copy the required tables into the model database and then create the 10 database
B) copy the required tables into the master database and then create the 10 database
C) copy the required tables into the msdb database and then create the 10 database
D) copy the stock schema into the model database and then create the 10 database
E) copy the stock schema into the master database and then create the 10 database
This is why I'd like to personally skin some of these test writers alive. Although you might think it nice to do this kind of stuff with the model database, if someone just happens to create another database while you're working the problem, they get all of your crap in their database. Then, you also have to delete that junk from the model DB and live with the fact that it's now a bloated pig compared to what it used to be.
To wit, my answer would be "None of the above".
Then there are the semantics of what they might mean by saying "copy the stock schema". To me, that means everything (including procs, etc) or it could mean just the schema identifier itself. Either way, that leaves answer "D" out but I can see some joker test writer claiming that as a correct answer.
If I were to make a go of this, the answer would be "A".
In real life, I'd have to seriously reexamine the future longevity of the person who would even suggest using the model database for such a trvial thing. If you have the wherewithall to put this stuff in the model database, then you could also create the first of the ten databases and populate that. Then take a backup of that and do 9 restores. It would be an excellent opportunity for a junior DBA to learn how to do both. Then, have him/her start over and write scripts to do the 9 restores just so they can see how it's done.
Whether this is an MS question or not makes no difference to me... I have to really and truly ask what the hell they think they're teaching because, to me, you should never use the model database for such trivial junk tasks. It's just too important to dink around with. It's really important that it stay small, as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 9, 2013 at 10:51 pm
Jeff Moden (1/9/2013)
fearghalreilly (1/9/2013)
In one of my tests I was asked this questionyou are working as part of the database team for the zoro online company . a junior database developer approaches you and tells you that they wish to create 10 databases for a group of interns who are joining the company on work experience. each database requires all the tables from the "stock" schema of the development database. which one of the following pieces of advice would be best to give the junior database developer?
A) copy the required tables into the model database and then create the 10 database
B) copy the required tables into the master database and then create the 10 database
C) copy the required tables into the msdb database and then create the 10 database
D) copy the stock schema into the model database and then create the 10 database
E) copy the stock schema into the master database and then create the 10 database
This is why I'd like to personally skin some of these test writers alive. Although you might think it nice to do this kind of stuff with the model database, if someone just happens to create another database while you're working the problem, they get all of your crap in their database. Then, you also have to delete that junk from the model DB and live with the fact that it's now a bloated pig compared to what it used to be.
To wit, my answer would be "None of the above".
Then there are the semantics of what they might mean by saying "copy the stock schema". To me, that means everything (including procs, etc) or it could mean just the schema identifier itself. Either way, that leaves answer "D" out but I can see some joker test writer claiming that as a correct answer.
If I were to make a go of this, the answer would be "A".
In real life, I'd have to seriously reexamine the future longevity of the person who would even suggest using the model database for such a trvial thing. If you have the wherewithall to put this stuff in the model database, then you could also create the first of the ten databases and populate that. Then take a backup of that and do 9 restores. It would be an excellent opportunity for a junior DBA to learn how to do both. Then, have him/her start over and write scripts to do the 9 restores just so they can see how it's done.
Whether this is an MS question or not makes no difference to me... I have to really and truly ask what the hell they think they're teaching because, to me, you should never use the model database for such trivial junk tasks. It's just too important to dink around with. It's really important that it stay small, as well.
I have to agree. Too bad none of the above isn't one of the choices.
January 9, 2013 at 11:15 pm
Jeff Moden (1/9/2013)
fearghalreilly (1/9/2013)
In one of my tests I was asked this questionyou are working as part of the database team for the zoro online company . a junior database developer approaches you and tells you that they wish to create 10 databases for a group of interns who are joining the company on work experience. each database requires all the tables from the "stock" schema of the development database. which one of the following pieces of advice would be best to give the junior database developer?
A) copy the required tables into the model database and then create the 10 database
B) copy the required tables into the master database and then create the 10 database
C) copy the required tables into the msdb database and then create the 10 database
D) copy the stock schema into the model database and then create the 10 database
E) copy the stock schema into the master database and then create the 10 database
This is why I'd like to personally skin some of these test writers alive. Although you might think it nice to do this kind of stuff with the model database, if someone just happens to create another database while you're working the problem, they get all of your crap in their database. Then, you also have to delete that junk from the model DB and live with the fact that it's now a bloated pig compared to what it used to be.
To wit, my answer would be "None of the above".
Then there are the semantics of what they might mean by saying "copy the stock schema". To me, that means everything (including procs, etc) or it could mean just the schema identifier itself. Either way, that leaves answer "D" out but I can see some joker test writer claiming that as a correct answer.
If I were to make a go of this, the answer would be "A".
In real life, I'd have to seriously reexamine the future longevity of the person who would even suggest using the model database for such a trvial thing. If you have the wherewithall to put this stuff in the model database, then you could also create the first of the ten databases and populate that. Then take a backup of that and do 9 restores. It would be an excellent opportunity for a junior DBA to learn how to do both. Then, have him/her start over and write scripts to do the 9 restores just so they can see how it's done.
Whether this is an MS question or not makes no difference to me... I have to really and truly ask what the hell they think they're teaching because, to me, you should never use the model database for such trivial junk tasks. It's just too important to dink around with. It's really important that it stay small, as well.
Best answer is none of the above.
If you have to script it to put into model, why not script it and place into a new DB altogether. Then backup that database and restore it as necessary. Not something with which to junk up the model database.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
January 10, 2013 at 7:08 am
None of the above.
Use the source control system that has all the database objects in it to run an automated build for the new people. But not to create 10 databases. They're going to work on their own machines (either virtuals or laptops) on identically named databases so that all code written looks identical.
I'm with Jeff. Let's start sharpening knives.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 10, 2013 at 9:58 am
The intent of the question is clearly to exercise the test-takers knowledge of what role the model database plays in the creation of new databases. The sad part is that the effect of asking a question like this and providing a reward for picking the best answer (there is no correct answer in my opinion) is that the question indirectly teaches a very poor DBA practice.
I like Grant's take on the matter. Each developer should be empowered to build, drop, load, clear, reload, their own databases from a source control repository and possibly a copy of a cleansed production database (for loads and reloads, not to retrieve source code). Notice how there is no DBA directly acting on the dev database in that scenario.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
January 10, 2013 at 5:27 pm
Already answered above, but I agree with Jeff and Grant.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply