As noted in 4.6. Enabling Versioned Views, database views allow useful queries to be saved and reused as though they were database tables. The SQL queries used in a view can be complex and can include data from other views such as those described in 4.8. Composite Views. However, the definition of each view is defined by a single SQL query.
Stored procedures and functions provide an another way to define reusable resources in a database. The key difference between these database views, stored procedures and functions are summarized in
Caption reference |
---|
CapRefId | views-procedures-functions |
---|
CapRefType | Table |
---|
|
Footnote Macro |
---|
The features of stored procedures and functions shown in the table are those that apply to MySQL. Some of these features may differ in other database environments. |
. From a practical perspective these differences enable stored procedures to facilitate some types of access to a SNOMED CT data that cannot be supported by using database views. The following subsections describe a few examples of stored procedures that are included in the SNOMED CT example database.
Caption label |
---|
CapId | views-procedures-functions |
---|
CapType | Table |
---|
|
Features of Views, Stored Procedures and Functions (in MySQL) |