GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Database
Go To First  |  Previous Question  |  Next Question 
 Database  |  Question 18 of 69    Print  
What is the difference between a stored procedure and a view? why do we use views from SQL Server point of view? What are mutating triggers? How is the structure of a bit map index, clustered, Non clustered and B Tree What re mutating triggers? Can a stored procedure a record set? Can we use DTS on a client machine to schedule jobs and consolidate data to a sql tables? Can we have an update trigger within another update trigger?

  
Total Answers and Comments: 5 Last Update: May 15, 2007     Asked by: mak1600 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 31, 2006 13:34:49   #1  
sreyaskvmce&it Member Since: March 2006   Contribution: 6    

RE: What is the diff b/w a stored procedure and a view...

A view is a virtual table.Which is given to the help of different users.

The view can be created at

Create view employee(name no salary age) with encryption

As

select empname empno sal empage from empmaster;


 
Is this answer useful? Yes | No
July 10, 2006 15:53:53   #2  
hmashruf Member Since: March 2006   Contribution: 32    

RE: What is the diff b/w a stored procedure and a view...
Hi Can we run select query by joining virtual table (view or logical table) and actual table (physical)? Or it just doesnt make sense to do and the same can be accomplished by joining the actual table itself.Thanks -ashruf
 
Is this answer useful? Yes | No
May 14, 2007 09:25:23   #3  
vibha_kant Member Since: May 2007   Contribution: 5    

RE: What is the difference between a stored procedure ...
Difference between a stored procedure and view:

Well both of them aren't even compatible to compare and tell the difference. They both belong to different paradigm of database world. Anyways here are the definitions I would give you. A stored procedure is a set of sql statements which can be called a subroutine to access relational database systems. Its actually stored in a daatabase. They are mainly used for faster access(Pre-compilation of SQL statements) Simplification of data management and for security.

A view as my friends have elucidated above is a virtual or logical table that holds result set of a pre-defined query. The data for these views are not stored in the database. There are two types of view read only and updatable. You can modify a read only view with an INSTEAD OF trigger.

Hope that makes sense :-)

 
Is this answer useful? Yes | No
May 14, 2007 12:50:26   #4  
vibha_kant Member Since: May 2007   Contribution: 5    

RE: What is the difference between a stored procedure ...
Mutating triggers :

I am not aware of mutating triggers in SQL Server. Per my knowledge only MySQL and Oracle throws this error. Coming back to the point mutating trigger occurs when the table which fired the triggering event is being accessed in the body of the trigger code directly or indirectly through a nested trigger or procedure etc. This is not allowed as the table could be in a middle of transaction.

 
Is this answer useful? Yes | No
May 15, 2007 00:26:36   #5  
vibha_kant Member Since: May 2007   Contribution: 5    

RE: What is the difference between a stored procedure ...
Clustered Index:

A clustered index reorders the way data is physically stored in a disc. Thats why there can be only one clustered index on the table. The leaf nodes of the index contains the data pages.

Non-clustered Index
:

A non-clustered index is an in which logical order of the index do not match with physical order of data stored. In this case the leaf node do not contains data pages but contains indexed rows.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape