sql server common interview questions and answers page 6

2
SQL Server - Common Interview Questions and Answers Page 6 http://www.indiabix.com/technical/sql-server-common-questions/6[08/29/2012 4:08:58 PM] Aptitude ? Reasoning ? Verbal Ability GK Puzzles Programming ? Engineering Medical ? Interview Online Test SQL Server - Common Interview Questions and Answers @ : Home > Technical Interview > SQL Server Common Questions > Interview Questions 31. What is BCP? When does it used? BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the structures same as source to destination. BULK INSERT command helps to import a data file into a database table or view in a user-specified format. 32. How to implement one-to-one, one-to-many and many-to-many relationships while designing tables? One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships. Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table. 33. What is an execution plan? When would you use it? How would you view the execution plan? An execution plan is basically a road map that graphically or textually shows the data retrieval methods chosen by the SQL Server query optimizer for a stored procedure or ad- hoc query and is a very useful tool for a developer to understand the performance characteristics of a query or stored procedure since the plan is the one that SQL Server will place in its cache and use to execute the stored procedure or query. From within Query Analyzer is an option called "Show Execution Plan" (located on the Query drop-down menu). If this option is turned on it will display query execution plan in separate window when query is ran again. < Prev 1 2 3 4 5 6 © 2008-2012 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy Contact us: [email protected] Follow us on twitter! SQL Server Training Access Videos, Articles and More. Join the SSWUG.ORG Community Today! www.sswug.org Java Persistence Tools OpenJPA, Toplink, Hibernate Suppt No Lock-in, Eclipse-Based www.myeclipseide.com Export SharePoint to SQL Live export of SharePoint lists to normalised SQL Server tables www.axioworks.com/SQList Visual SQL to XML Easy to use Data Mapping environment. Try now! www.ecrion.com Ads by Google SQL Server SQL Server Manager SQL Server Tools Free SQL Server Training Webinars Tues & Thurs 11am EST Learn skills from the Experts pragmaticworks.com/PWFre… Good Interview Questions Looking for a Career Change? Find Options & Opportunities for Free. www.BetterCareerSearch.com Database Management WinSQL - A Homogeneous Solution for Heterogeneous Environment. www.synametrics.com Go Power Dynamometers New GPR557 Engine Dynamometer Diesel Dynamometers www.gopowersystems.com Exporting? Don't forget to register ® your TM Register your Trademark today! www.marcaria.com

Upload: kaing-menglieng

Post on 19-Feb-2017

417 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Sql server   common interview questions and answers page 6

SQL Server - Common Interview Questions and Answers Page 6

http://www.indiabix.com/technical/sql-server-common-questions/6[08/29/2012 4:08:58 PM]

Aptitude ? Reasoning ? Verbal Ability GK Puzzles Programming ? Engineering Medical ? Interview Online Test

SQL Server - Common Interview Questions and Answers

@ : Home > Technical Interview > SQL Server Common Questions > Interview Questions

31. What is BCP? When does it used?

BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the structuressame as source to destination. BULK INSERT command helps to import a data file into a database table or view in auser-specified format.

32. How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreignkey relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary keyand foreign key relationships. Many-to-Many relationships are implemented using a junction table with the keysfrom both the tables forming the composite primary key of the junction table.

33. What is an execution plan? When would you use it? How would you view the execution plan?

An execution plan is basically a road map that graphically or textually shows the data retrieval methods chosen bythe SQL Server query optimizer for a stored procedure or ad- hoc query and is a very useful tool for a developer tounderstand the performance characteristics of a query or stored procedure since the plan is the one that SQLServer will place in its cache and use to execute the stored procedure or query. From within Query Analyzer is anoption called "Show Execution Plan" (located on the Query drop-down menu). If this option is turned on it willdisplay query execution plan in separate window when query is ran again.

< Prev 1 2 3 4 5 6

© 2008-2012 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us: [email protected] Follow us on twitter!

SQL Server Training Access Videos, Articles and More. Join the SSWUG.ORG Community Today! www.sswug.org

Java Persistence Tools OpenJPA, Toplink, Hibernate Suppt No Lock-in, Eclipse-Based www.myeclipseide.com

Export SharePoint to SQL Live export of SharePoint lists to normalised SQL Server tables www.axioworks.com/SQList

Visual SQL to XML Easy to use Data Mapping environment. Try now! www.ecrion.com

Ads by Google

SQL ServerSQL Server ManagerSQL Server Tools

Free SQL ServerTrainingWebinars Tues &Thurs 11am EST Learnskills from the Expertspragmaticworks.com/PWFre…

Good InterviewQuestionsLooking for a CareerChange? Find Options& Opportunities forFree.www.BetterCareerSearch.com

DatabaseManagementWinSQL - AHomogeneous Solutionfor HeterogeneousEnvironment.www.synametrics.com

Go PowerDynamometersNew GPR557 EngineDynamometer DieselDynamometerswww.gopowersystems.com

Exporting?Don't forget toregister ® your TMRegister yourTrademark today!www.marcaria.com

http://www.google.com/url?ct=abg&q=https://www.google.com/adsense/support/bin/request.py%3Fcontact%3Dabg_afc%26url%3Dhttp://www.indiabix.com/technical/sql-server-common-questions/6%26gl%3DKH%26hl%3Den%26client%3Dca-pub-0191447310372013%26ai0%3DBoUufKdw9ULLyM-nKigespoCYBuyE08cCzK6FpTDAjbcB8KIEEAEYASCjn9gLKAU4AFDvoNC__f____8BYHWgAZT7sfUDsgEQd3d3LmluZGlhYml4LmNvbboBCjE2MHg2MDBfYXPIAQHaAT9odHRwOi8vd3d3LmluZGlhYml4LmNvbS90ZWNobmljYWwvc3FsLXNlcnZlci1jb21tb24tcXVlc3Rpb25zLzbgAQSAAgGoAwHIAx_oA9cC6AMF9QMAAADE9QMAAAAQiAYB4AbY0-sJ%26ai1%3DBS0fdKdw9ULLyM-nKigespoCYBoLwkf8DupTvgiDAjbcBsOoBEAIYAiCjn9gLKAU4AFCJwIGeBGB1oAHur6bdA7IBEHd3dy5pbmRpYWJpeC5jb226AQoxNjB4NjAwX2FzyAEB2gE_aHR0cDovL3d3dy5pbmRpYWJpeC5jb20vdGVjaG5pY2FsL3NxbC1zZXJ2ZXItY29tbW9uLXF1ZXN0aW9ucy824AEEgAIByALKvtAnqAMByAMf6APXAugDBfUDAAAAxPUDAAAAEIgGAeAGitKcIw%26ai2%3DBnU_-Kdw9ULLyM-nKigespoCYBt3yrg6hpZWTAcCNtwGQvwUQAxgDIKOf2AsoBTgAUOiT88kCYHWyARB3d3cuaW5kaWFiaXguY29tugEKMTYweDYwMF9hc8gBAdoBP2h0dHA6Ly93d3cuaW5kaWFiaXguY29tL3RlY2huaWNhbC9zcWwtc2VydmVyLWNvbW1vbi1xdWVzdGlvbnMvNuABBKgDAcgDH-gD1wLoAwX1AwAAAMT1AwAAABDgBsjDAw%26ai3%3DBgxXwKdw9ULLyM-nKigespoCYBs746JsCzt3ElirAjbcBwJoMEAQYBCCjn9gLKAU4AFCulPaEBWB1sgEQd3d3LmluZGlhYml4LmNvbboBCjE2MHg2MDBfYXPIAQHaAT9odHRwOi8vd3d3LmluZGlhYml4LmNvbS90ZWNobmljYWwvc3FsLXNlcnZlci1jb21tb24tcXVlc3Rpb25zLzbgAQSoAwHIAx_oA9cC6AMF9QMAAADE9QMAAAAQ4Ab-l7Mh%26ai4%3DBxmBKKdw9ULLyM-nKigespoCYBsi9gcYC4Ofk8ynAjbcBgNMOEAUYBSCjn9gLKAU4AFDZnruMBGB1oAGqxuz0A7IBEHd3dy5pbmRpYWJpeC5jb226AQoxNjB4NjAwX2FzyAEB2gE_aHR0cDovL3d3dy5pbmRpYWJpeC5jb20vdGVjaG5pY2FsL3NxbC1zZXJ2ZXItY29tbW9uLXF1ZXN0aW9ucy824AEEgAIBqAMByAMf6APXAugDBfUDAAAAxPUDAAAAEIgGAeAG-pqsCg&usg=AFQjCNF4---CVEsaevehw_84tXZW7zo0UA
Page 2: Sql server   common interview questions and answers page 6

SQL Server - Common Interview Questions and Answers Page 6

http://www.indiabix.com/technical/sql-server-common-questions/6[08/29/2012 4:08:58 PM]

Bookmark to: