See which of your colleagues or former colleagues are already on Java Link: Check out the Contact Finder
Databases - Java » DB2 » Difference Between Stored Procedure nd Views

223 Views
  0 Replies

0
Vote Vote
Difference Between Stored Procedure nd Views
Share  
 Type: Professional, Report if fun topic
Sourav
Sourav Picture
17 Posts
back to top
Posted 19-05-2009Reply

Difference Between Stored Procedure nd Views











Stored Procedure : Stored procedures are precompiled database queries that improve the security, efficiency and usability of database client/server applications. Developers specify a stored procedure in terms of input and output variables. They then compile the code on the database platform and make it available to aplication developers for use in other environments, such as web applications. All of the major database platforms, including Oracle, SQL Server and MySQL support stored procedures. The major benefits of this technology are the substantial performance gains from precompiled execution, the reduction of client/server traffic, development efficiency gains from code reuse and abstraction and the security controls inherent in granting users permissions on specific stored procedures instead of the underlying database tables.







Views: Database views allow you to create "virtual tables" that are generated on the fly when they are accessed. A view is stored on the database server as an SQL statement that pulls data from one or more tables and (optionally) performs transformations on that data. Users may then query the view just as they would any real database table. Views are often used to alleviate security concerns by providing users with access to a certain view of a database table without providing access to the underlying table itself.







S.No.





View





Stored Procedure



1





Does not accepts parameters





Accept parameters



2





Can be used as a building block in large query.





Can not be used as a building block in large query.



3





Can contain only one single Select query.





Can contain several statement like if, else, loop etc.



4





Can not perform modification to any table.





Can perform modification to one or several tables.



5





Can be used (sometimes) as the target for Insert, update, delete queries.

0
Vote Vote
Share  
 Type: Professional, please report if fun topic

Recent Activity in Forums

05-04-2012.
05-04-2012.
Kanchana posted a new forum topic in
27-02-2012.
11-02-2012.
Kanchana posted a new forum topic in
11-02-2012.