• Home
  • All Articles
  • SQL Interview Q & A
  • Blog Stats
  • Contact
    • Resume
    • Performance
    • Community Rules
    • Copyright
  • Tools
    • Expressor
    • Pluralsight
    • Embarcadero
    • Manage Engine
    • Idera
    • Red Gate
    • SafePeak
  • SQL Books
    • SQL Interview Q & A
    • SQL Wait Stats
    • SQL Programming
  • >>Search<<

SQL Server Journey with SQL Authority

Personal Notes of Pinal Dave

Feeds:
Posts
Comments
« SQL Server Interview Questions and Answers – Introduction
SQL Server Interview Questions and Answers – Part 2 »

SQL Server Interview Questions and Answers – Part 1

April 15, 2007 by pinaldave

SQL Server Interview Questions and Answers
Print Book Available (207 Pages) | Sample Chapters

UPDATE : Interview Questions and Answers are now updated with SQL Server 2008 Questions and its answers. New Location : SQL Server 2008 Interview Questions and Answers.

What is RDBMS?
Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables. In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data independence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage.

What is normalization?
Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases. In relational database design, the process of organizing data to minimize redundancy. Normalization usually involves dividing a database into two or more tables and defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.

What are different normalization forms?

1NF: Eliminate Repeating Groups
Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.
2NF: Eliminate Redundant Data
If an attribute depends on only part of a multi-valued key, remove it to a separate table.
3NF: Eliminate Columns Not Dependent On Key
If attributes do not contribute to a description of the key, remove them to a separate table.
All attributes must be directly dependent on the primary key
BCNF: Boyce-Codd Normal Form
If there are non-trivial dependencies between candidate key attributes, separate them out into distinct tables.
4NF: Isolate Independent Multiple Relationships
No table may contain two or more 1:n or n:m relationships that are not directly related.
5NF: Isolate Semantically Related Multiple Relationships
There may be practical constrains on information that justify separating logically related many-to-many relationships.
ONF: Optimal Normal Form
A model limited to only simple (elemental) facts, as expressed in Object Role Model notation.
DKNF: Domain-Key Normal Form
A model free from all modification anomalies.

Remember, these normalization guidelines are cumulative. For a database to be in 3NF, it must first fulfill all the criteria of a 2NF and 1NF database.

What is Stored Procedure?
A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.
e.g. sp_helpdb, sp_renamedb, sp_depends etc.

What is Trigger?
A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS.Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; the DBMS automatically fires the trigger as a result of a data modification to the associated table. Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.
Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.

What is View?
A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using standard T-SQL select command and can come from one to many different base tables or even other views.

What is Index?
An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database application. A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact on performance.

Clustered indexes define the physical sorting of a database table’s rows in the storage media. For this reason, each database table may have only one clustered index.
Non-clustered indexes are created outside of the database table and contain a sorted list of references to the table itself.

Complete Series of SQL Server Interview Questions and Answers
SQL Server Interview Questions and Answers -Introduction
SQL Server Interview Questions and Answers – Part 1
SQL Server Interview Questions and Answers – Part 2
SQL Server Interview Questions and Answers – Part 3
SQL Server Interview Questions and Answers – Part 4
SQL Server Interview Questions and Answers – Part 5
SQL Server Interview Questions and Answers – Part 6
SQL Server Interview Questions and Answers Complete List Download

Reference : Pinal Dave (http://blog.SQLAuthority.com)

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • StumbleUpon
  • Reddit
  • Tumblr
  • Email
  • More
  • Digg
  • Print

Like this:

Like
Be the first to like this post.

Posted in Pinal Dave, Software Development, SQL, SQL Authority, SQL Cursor, SQL Download, SQL Index, SQL Interview Questions and Answers, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, SQL Trigger, T SQL, Technology | 75 Comments

75 Responses

  1. on June 29, 2007 at 7:26 am Vijay

    Its AWESOME , and your rocking with SQLSERVER. keep it up and try to increase the content and more readble.


  2. on July 2, 2007 at 2:18 pm Jinu

    Its really nice.This will help me to get a job.Please send some interview tips for sql sever2005 also.
    Jinu


  3. on July 8, 2007 at 3:50 am kumar

    SIR,

    it is really awesome. you are great. you are doing a good job for coming generation.

    my salute for you.

    thanking you & best regards

    kumar


  4. on July 13, 2007 at 3:56 am Rahul Saini

    Exactly how many colums can add in any table?


  5. on July 19, 2007 at 5:05 am Rakesh

    Its good


  6. on July 20, 2007 at 12:24 am kalaiarasan

    very nice


  7. on July 20, 2007 at 12:25 am kalaiarasan

    it is really awesome. you are great. you are doing a good job for coming generation.

    my salute for you.

    thanking you & best regards


  8. on July 23, 2007 at 9:28 pm Jawa

    cool stuff


  9. on July 27, 2007 at 2:14 am Praveen Barath

    Appriciated !! but i guess all depends on level which you going for ,for beginners its really usefull !!

    cheers


  10. on July 27, 2007 at 7:30 am SQL SERVER - Data Warehousing Interview Questions and Answers - Part 2 Journey to SQL Authority with Pinal Dave

    [...] Jul 27th, 2007 by pinaldave What are normalization forms? Please visit this article. [...]


  11. on August 10, 2007 at 12:55 pm Ruby

    Thank you so much………Appreciate the efforts you have taken to compile them all……..

    Regards…


  12. on August 14, 2007 at 2:29 am a.SENTHIL MURUGAN

    hello sir

    now your doing the better and good job …..its very nice for our future generation…pls update new type of questions……….


  13. on August 17, 2007 at 12:25 pm Deepak

    Amazing, Astonishing!!!! this is great help… truly appreciated.


  14. on August 22, 2007 at 5:40 am MAHENDRA RANE

    I READ TO QUESTION THAT IS AMAZING.
    THIS IS GREAT HELP …….
    TRULY APPRECIATED.

    IT IS REALLY AWESOME YOUARE GREAT. YOU AREDOING A GOOD JOB FOR COMING GENERATION.

    THINGING YOU & BEST REHARDS


  15. on August 23, 2007 at 2:12 am Steve

    Can we update the data of Base table through View?


  16. on August 23, 2007 at 2:38 am sandeep

    This is Good


  17. on August 24, 2007 at 12:16 pm Sunny

    Hey Steve,

    You can modify the data through view.
    There are a few things you should consider….. using instead of triggers or using updatable partitioned views.
    If none of these are used then there are few thing you should consider……
    one cannot use data modification statements on more than one underlying table in a single statement and also while updating one should make sure about the column restrictions (constraints, nullability…..)
    Hope this helps you.


  18. on August 29, 2007 at 8:29 pm Himanshu

    Hi Pinal Dave,

    How can i delete duplecate records from the table.

    Himanshu


  19. on August 30, 2007 at 3:00 am Aman

    Hi Pinal Dave,

    Plz suggest me what should i do for DBA course


  20. on September 13, 2007 at 2:29 pm Shenouda Nageub

    This a good reference.


  21. on September 18, 2007 at 7:12 am tropic

    See complete Maximum Capacity for SQL Server 2005 here:

    http://msdn2.microsoft.com/en-us/library/ms143432.aspx


  22. on September 26, 2007 at 1:12 am gyanendra

    hi friend,
    i m new for this site,and i feel that it is one of the best site for getting the information regarding the sql and other one for interview purpose and for knowledge enhancement.


  23. on October 18, 2007 at 4:35 am vijay raju

    hi

    mr.dave

    its really good.

    try to put the details about the DTS and Linked Servers
    concepts with examples. That will me more useful for all.

    Thanking u for providing these Questions with Answers.

    regards

    vijay raju


  24. on October 26, 2007 at 9:42 pm swapna

    Dear sir,

    My heartfull thanks to u,this is really good,your helping me more………….I Think this one is helpfull for everyone..

    Thanksalot,
    Swapna


  25. on November 2, 2007 at 11:41 am sandeep

    hi thnnkas


  26. on November 15, 2007 at 1:05 pm Juned

    Thanks they help me a lot please do post more question and answer.


  27. on November 16, 2007 at 3:27 am Nancy

    Hello

    Can you tell me please the function to split a name received in one field to first name, last name, middle name into separate fields?

    Thanks very much!


  28. on November 20, 2007 at 1:02 pm mushtaq

    Thks pinal.

    It will help for me & others.

    regards
    Mushtaaq


  29. on November 26, 2007 at 6:44 pm Raghu

    hi

    very use full for me thanks pinl


  30. on December 2, 2007 at 6:21 pm Senthil.G

    hi

    This is very useful for my interview preparation.If you know any new concepts.please post my email id.

    Thanking you


  31. on December 6, 2007 at 3:10 pm Femi

    This is very helpful for me


  32. on December 16, 2007 at 7:48 pm Sudhir

    Dear sir,

    the information given by you is very good and helpful
    thankyou so much

    sudhir


  33. on December 18, 2007 at 6:13 pm Colo

    VUI – VERY USEFUL INFORMATION. thumbs up !!!


  34. on January 3, 2008 at 10:08 am Uma Lakshman

    You are awesome.. I appreciate the amount of time you spend towards this blog which is so useful for many people like me. Keep up the good work! God Bless You ..


  35. on January 12, 2008 at 1:39 pm Sameer Bhatnagar

    Hi Pinal Dave…

    I am Proud of you….
    you are doing a very great Job…
    All the Best for Your Future….

    JAI HIND…
    (Sabse aage Honge….Hindustani !!!!!!)


  36. on January 14, 2008 at 2:37 pm Dhirendra Singh

    hi

    This is very useful for my interview preparation.If you know any new concepts.please post my email id.
    Plz, send me sql server database notes.
    Thanking you


  37. on January 15, 2008 at 6:04 am Shrinivas

    Hello! Sir,

    Good evening.

    I am thankful to you for this useful information, which helps me and to everybody…

    Sure, u have important role in everybody’s success…

    Thank you very much.
    All the Best.

    Shrinivas


  38. on January 22, 2008 at 11:17 am vellingiri

    This is very very useful for me.


  39. on January 30, 2008 at 12:39 pm Jayaprabha

    Hi,

    This is awesome and really very useful those who preparing for their interview..

    Thank you very much,
    Jayaprabha.D


  40. on February 2, 2008 at 7:30 pm J. Saraboji

    Dear Sir,

    Mostly I used name only, but now I used Sir.

    I will pray for you to give more years to live in the same.

    Thanks,
    JSaraboji.


  41. on February 11, 2008 at 10:04 am Naga

    Excellent! The question and answers are great. I am looking for a job and It really helps me to prepare me for the Interview.

    Thanks! Please keep updating this site.


  42. on February 12, 2008 at 1:01 am Girish

    Nice articles!

    thanks,


  43. on February 12, 2008 at 3:23 am koteswararao.kadiaym

    Very good .I m following his articles for career growth in sql domain.


  44. on February 13, 2008 at 11:00 am Preethi

    Excellent!!!


  45. on February 14, 2008 at 3:02 am Neethu

    If possible please post with some examples. That may help us in interviews.
    Thank you.


  46. on February 28, 2008 at 4:47 pm Asane

    Well…. Keep it up……


  47. on March 10, 2008 at 2:32 pm Pooja Manocha

    Hii,

    Really liked it. Want a copy of all the qs and ans.
    Can u plz send it at my mail id.

    Thanx.


  48. on March 12, 2008 at 2:59 pm Sriram

    Hi Dave,
    Its really a good initiative, keep going.


  49. on March 28, 2008 at 11:56 am kiran kumar

    thank u sir


  50. on March 31, 2008 at 8:19 pm Deva

    Superb


  51. on April 2, 2008 at 11:48 am Preeti Soni

    U have done a good jod keep it up & all the best…………


  52. on April 11, 2008 at 1:01 pm Shishir

    Thanks……… These questions and answers are of great help……………..
    Thanks…..a lot


  53. on April 12, 2008 at 3:39 pm sam

    thanks


  54. on April 15, 2008 at 6:39 pm prabha

    Hi,

    I need to know

    How to add a query to remote sever?


  55. on April 22, 2008 at 10:35 am hakeem

    it is so great to have a question and answers in this aspect.i want you to help me send sql complete note


  56. on April 24, 2008 at 1:38 pm Preeti Soni

    hello,
    i need to know how can i remove Alias in a view.


  57. on May 9, 2008 at 12:50 pm gopal

    nice for begginers


  58. on May 9, 2008 at 8:35 pm GOPINATH

    Hi,

    This site is very useful and answers were given very clearly…


  59. on May 9, 2008 at 8:36 pm GOPINATH

    Thank u so much…


  60. on May 27, 2008 at 3:24 pm Anil

    Can you explain Normalisation with “Examples”…….


  61. on June 6, 2008 at 7:33 am SDC

    Um, I’m not sure this was meant to help people who know diddly to get jobs as senior DBAs, I think the idea was to put together some common questions one might want to ask candidates in an interview.

    But I could be wrong.


  62. on June 7, 2008 at 7:36 am bvreddy

    sir thanks u very sir
    I require the SQL server Questions
    ok sir bye


  63. on June 7, 2008 at 7:37 am bvreddy

    thanku very much sir


  64. on June 20, 2008 at 2:52 pm chendu

    Dave,
    This is an excellent effort, these questions are not only useful in an interview prespective but will also provide a definite insight of SQL for beginners. Hope to have much more questions like this in the future.

    Cheers,
    Chendu


  65. on June 29, 2008 at 2:43 pm Vinit gaur

    Hi Dave,

    What is the diffrence between RDBMS & DBMS

    is excel is a DBMS?


  66. on June 30, 2008 at 1:33 pm janarthanan

    Respected sir

    your question is very brilliant . please send the other interview aptitude question for c and c++


  67. on July 3, 2008 at 3:08 pm Majith

    Excellent Information for all SQL SERVER fans


  68. on July 17, 2008 at 8:18 pm Sunil panda

    Sir,
    Thanks sir your question is very Brilient. Please send the other inturview question for Vc# and Java


  69. on July 18, 2008 at 2:53 pm Irshad

    I Have Seen all the Question and Answer its Really Good Stuff but when the Candiadte Have experince then interviewer mostly asked about the Query Basically that stuff is only for the Fresher or 1 years Experience Candiate

    Thahx
    Irshad hasan


  70. on July 19, 2008 at 12:23 pm Riti

    Hello Pinal,

    Nice questions. In fact i am interviewing people thru these Qs. These are really awesome. I am done with MCSD & a .net developer since 3.5years. I am so interested for SQL DBA. Please guide me how to process.

    Waiting your reply.

    Regards
    ~ Riti


  71. on August 3, 2008 at 11:55 am DINESH BHARDWAJ(sundernagar)

    hi dave,

    you are doing nice job,
    This is an excellent effort, these questions are not only useful in an interview prespective but will also provide a definite insight of SQL for beginners


  72. on August 13, 2008 at 8:35 pm Harinath Reddy

    It’s very very 98.3 guru


  73. on August 26, 2008 at 6:47 am Lisa

    You are the BEST, mate!


  74. on September 20, 2008 at 11:36 am pinaldave

    UPDATE : Interview Questions and Answers are now updated with SQL Server 2008 Questions and its answers. New Location : SQL Server 2008 Interview Questions and Answers.

    Please continue with your questions and answers at new location.


  75. on February 24, 2009 at 6:22 pm SQL SERVER - Database Interview Questions and Answers Complete List Journey to SQL Authority with Pinal Dave

    [...] Server Interview Questions and Answers SQL Server Interview Questions and Answers – Introduction SQL Server Interview Questions and Answers – Part 1 SQL Server Interview Questions and Answers – Part 2 SQL Server Interview Questions and Answers – [...]



Comments are closed.

  • free community tool

    Expressor
    pluralsight
    Red-Gate
    ManageEngine
    Idera
    red-gate
    SafePeak
    Koenig
  • About Pinal Dave

    Pinal Dave is a Microsoft Technology Evangelist (Database and BI). He has written over 2000 articles on the subject on his blog at http://blog.sqlauthority.com. Along with 8+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). He is co-author of three SQL Server books - SQL Server Programming, SQL Wait Stats and SQL Server Interview Questions and Answers. Prior to joining Microsoft he was awarded Microsoft MVP award for three continuous years for his contribution in community.
    LinkedIn - Pinal Dave Twitter - Pinal Dave facebook
    Feed Email

    Follow @pinaldave Send +Pinal Dave an email at pinal@sqlauthority.com
  • Blog Stats

    • 36,851,252 (36 Million+)
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 16,067 other followers

  • Next Office Hours

    Jan 3, 2012 1130 Indian Standard Time (0600 GMT)
  • Books I Authored

    . Amazon|Flipkart|Kindle

    . Amazon|Flipkart|Kindle

    Amazon|Flipkart|Kindle
  • SQLAuthority Links

    Subscribe to Newsletter
    My Homepage
    Windows Live Blog
           --------------------
    Top Downloads
       PDF Downloads
       Script Downloads

    Script Bank
       Favorite Scripts
       All Scripts - 1
       All Scripts - 2
       All Scripts - 3

    Top Articles
       Best Articles
       Favorite Articles - 1
       Favorite Articles - 2
           --------------------
    > SQL Interview Q & A <
    SQL Coding Standards
    SQL FAQ Download
           --------------------
    Jobs @ SQLAuthority
    Bookmark and Share
    AddThis Feed Button
  • About Nupur Dave

    Nupur Dave loves technology simply because it makes life more convenient. She is devoted to technology because it touches our heart makes our daily lives easier. Among the many technological programs she uses and embraces Windows Live most because she can do lots of things with ease – from photo management to movies; business emails to personal social media connections.

  • Disclaimer

    This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet/ BOL. My employer do not endorse any tools, applications, books, or concepts mentioned on the blog. I have documented my personal experience on this blog.

    • Home
    • All Articles
    • SQL Interview Q & A
    • Blog Stats
    • Contact
      • Resume
      • Performance
      • Community Rules
      • Copyright
    • Tools
      • Expressor
      • Pluralsight
      • Embarcadero
      • Manage Engine
      • Idera
      • Red Gate
      • SafePeak
    • SQL Books
      • SQL Interview Q & A
      • SQL Wait Stats
      • SQL Programming
    • >>Search<<
  • Categories

    • About Me (145)
    • Best Practices (143)
    • Business Intelligence (36)
    • CodeProject (10)
    • Data Warehousing (49)
    • Database (321)
    • DBA (137)
    • DMV (13)
    • Joes 2 Pros (47)
    • MVP (147)
    • PASS (14)
    • Readers Contribution (114)
    • Readers Question (127)
    • SharePoint (7)
    • Software Development (69)
    • SQL Add-On (99)
    • SQL Azure (15)
    • SQL Backup and Restore (79)
    • SQL BOL (11)
    • SQL Coding Standards (21)
    • SQL Constraint and Keys (57)
    • SQL Cursor (28)
    • SQL Data Storage (59)
    • SQL DateTime (47)
    • SQL DMV (23)
    • SQL Documentation (299)
    • SQL Download (310)
    • SQL Error Messages (161)
    • SQL Function (161)
    • SQL Humor (29)
    • SQL in Sixty Seconds (1)
    • SQL Index (155)
    • SQL Interview Questions and Answers (139)
    • SQL Joins (78)
    • SQL Milestone (25)
    • SQL Optimization (152)
    • SQL PASS (20)
    • SQL Performance (340)
    • SQL Puzzle (96)
    • SQL Security (127)
    • SQL Server DBCC (42)
    • SQL Server Management Studio (44)
    • SQL Service Pack (13)
    • SQL Stored Procedure (116)
    • SQL String (26)
    • SQL System Table (61)
    • SQL Trigger (24)
    • SQL User Group (57)
    • SQL Utility (153)
    • SQL View (26)
    • SQL Wait Stats (41)
    • SQL Wait Types (42)
    • SQL White Papers (67)
    • SQL XML (12)
    • SQLAuthority (632)
      • SQL Training (19)
      • SQLAuthority Author Visit (141)
      • SQLAuthority Book Review (39)
      • SQLAuthority News (577)
      • SQLAuthority Website Review (42)
    • SQLServer (228)
    • Tech (1589)
      • Pinal Dave (1576)
      • SQL Scripts (862)
    • Technology (2034)
      • PostADay (455)
      • SQL (2034)
      • SQL Authority (2034)
      • SQL Query (2033)
      • SQL Server (2034)
      • SQL Tips and Tricks (2034)
      • T SQL (2034)
    • Video (5)
  • Top 3 Commenters

      2251- Madhivanan
      474 - Imran Mohammed
      301 - Ramdas Jaya
  • Page copy protected against web site content infringement by Copyscape

Blog at WordPress.com. Fonts on this blog.

Theme: MistyLook by Sadish.


Follow

Get every new post delivered to your Inbox.

Join 16,067 other followers

Powered by WordPress.com
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.