Content deleted Content added
New page about model of database systems usage, already referenced |
mNo edit summary |
||
Line 2:
'''Object-PL/SQL''' ('''[[Object-oriented programming|Object]]-Procedural Language/[[Structured Query Language]]''' or simplly '''O-PL/SQL''') is a methodology of usage of the [[Oracle Corporation]]'s [[Procedural programming|procedural]] extension [[programming language|language]] for [[SQL]] and the [[Oracle Database|Oracle relational database]]<ref name="CITDK">{{cite web|url=http://www.cit.dk/cot/reports/reports/Case4/18/cot-4-18.pdf|title=Experiences with Object Oriented Development in PL/SQL|author=Lassan, Alan R., Due, Jacob Steen|date=13 June 2000|publisher=The danish Nationl Center for IT Research|accessdate=15 April 2012}}</ref> after the features of the version 7 and further improvement<ref name="DBAORA">{{cite web|url=http://www.dba-oracle.com/t_edb_pl_sql_features_release.htm|title=PL/SQL Features by Release|author=Cunningham, Lewis|publisher=Burleson Consulting|accessdate=15 April 2012}}</ref>, leading to one of the means of large-scale environment implementations of the [[object-oriented database]] paradigm.
Although PL/SQL's general [[Syntax (programming languages)|syntax]] formerly used to resemble that of [[Ada (programming language)|Ada]] or [[Pascal (programming language)|Pascal]], there were many improvements that include mainly the ''Java embedding code''<ref name="STKOVER">{{cite web|url
The mixing and embedding, in [[Database trigger|triggers]] and [[stored procedure]]s of the Java and the SQL languages was one of the breakthrough points up to support the us of [[PL/SQL]] in a ''OO'' paradigm<ref name="SAMS">Benett, 2002:144</ref>. The including in the SQL syntax of statements like <nokiki>[class].[object]</nowiki>, the implementation of the object ''type''<ref name="TOP10"/> (like any OO language) completed the minimum requisites to a mapping approach in an extended SQL language without use of [[Persistence framework|specific mapping software]]<ref name="BALES">Bales, 2007:107-209</ref>.
Line 18:
'''''PL/SQL''''' is the extended SQL language used by [[Oracle Database]].
PL/SQL is available in Oracle Database (since version 7), [[TimesTen|TimesTen in-memory database]] (since version 11.2.1), and [[IBM DB2]] (since version 9.7).<ref name="IBM>{{cite web|url=http://www.ibm.com/developerworks/data/library/techarticle/dm-0907oracleappsondb2/index.html|title=DB2 10: Run Oracle applications on DB2 10 for Linux, UNIX, and Windows|publisher=IBM|accessdate=20 April 2012}}</ref>
O-PL/SQL allows the definition of classes and instantiating these as objects, creating user-defined datatypes as and writing constructors, beyond using Java in stored procedures and triggers.
Line 84:
end;
/</source>
Results
* 0
* 4
* 24
* 30
The created types have become real types and can be used in tables:<source lang="SQL">
create table table_base (
Line 102 ⟶ 103:
select t.b.func() from table_base t;
T.B.FUNC()</source>
Results:
* 0
<source lang="SQL"> select avg(t.b.func()) from table_base t;
AVG(T.B.FUNC())</source>
Result:
* 36
=== Example 2 ===
|