preview

Sql Lab 4 Essay

Better Essays

MET CS 669 Database Design and Implementation for Business
SQL Lab 4 Instructions: Procedural SQL

Objective
The objective of this lab is to teach you how to develop and use basic stored procedures and triggers the procedural language of your chosen DBMS.

Prerequisites
Before attempting this lab, it is best to read the textbook and lecture material covering the objectives listed above. While this lab shows you how to create and use these constructs in SQL, the lab does not explain in full the theory behind the constructs, as does the lecture and textbook. The second section in this lab builds on Lab 3. It is best to complete Lab 3 first before completing the second section in this lab.

Required Software
The …show more content…

These constructs greatly enhance the native capabilities of the DBMS. The procedural languages also support the ability to embed and use the results of SQL queries. The combination of the programming constructs provided by the procedural language, and the data retrieval and manipulation capabilities provided by the SQL engine, is powerful and useful. Database texts and DBMS documentation commonly refers to the fusion of the procedural language and the declarative SQL language as a whole within the DBMS.
Oracle’s implementation is named Procedural Language/Structured Query Language, and is more commonly referred to as PL/SQL, while SQL Server’s implementation is named Transact‐SQL, and is more commonly referred to as T‐SQL. SQL predates the procedural constructs in both DBMS, and therefore documentation for both DBMS refer to the procedural language as an extension to the SQL language. This idea can become confusing because database texts and documentation also refer to the entire unit, for example PL/SQL and T‐SQL, as a vendor‐specific extension to the SQL language. It is important for us to avoid this confusion by recognizing that there are two distinct languages within a relational DBMS – declarative and procedural – and that both are treated very differently within a DBMS in concept and in implementation. In concept, we use the SQL

Get Access