Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Each tool <a href="http://databases.aspfaq.com/database/should-i-use-a-view-a-stored-procedure-or-a-user-defined-function.html" rel="nofollow noreferrer">has its uses</a>. Your choices will depend on the nature of the application, and its security, performance, and agility requirements.</p> <p>Nowadays many programmers use Data Access Layers (<a href="http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software" rel="nofollow noreferrer">DALs</a>) for this sort of thing. Many DALs allow you to specify views and stored procedures to call. But you can also run queries against the tables directly, without the need for stored procedures or views.</p> <p>Unless you are using an object database, you will be dealing with <a href="http://en.wikipedia.org/wiki/Table_(database)" rel="nofollow noreferrer">tables</a> rather than objects. Most applications nowadays use table-based database systems, <a href="http://en.wikipedia.org/wiki/List_of_relational_database_management_systems" rel="nofollow noreferrer">because they are so common</a>, and you can use DALs to manage the <a href="http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch" rel="nofollow noreferrer">object-relational impedance mismatch</a>.</p> <p><a href="http://en.wikipedia.org/wiki/Stored_procedure" rel="nofollow noreferrer">Stored procedures</a> are used when high-performance is needed, and programmatic things need to be accomplished on the database itself (the addition of a timestamp value perhaps, or the addition/subtraction of child records). A good DAL will provide high performance without necessarily requiring the use of stored procedures.</p> <p><a href="http://en.wikipedia.org/wiki/View_(database)" rel="nofollow noreferrer">Views</a> are used to manage the interface between the database and the consumer of the data. In particular, the data can be filtered for security purposes. In large database scenarios, a DBA designs and creates the tables, and manages the views and stored procedures that the user is allows to use to access the data.</p> <p>If you are looking for ultimate flexibility, most of what you need to do can be accomplished in the DAL, without the need for views or stored procedures. But again, it depends on what your application's requirements are. I would say that the larger your application and user base is, the more likely you are to use views and stored procedures in your application.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload