Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1:
'''Object-PL/SQL''' ('''[[Object-oriented programming|Object]]-Procedural Language/[[Structured Query Language]]''' or simply '''O-PL/SQL''') is a methodology of using 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.|last2=Due, Jacob Steen|date=13 June 2000
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 mainly include the ''Java embedding code''<ref name="STKOVER">{{cite web|url=https://stackoverflow.com/questions/70072/when-should-you-use-java-stored-procedures-with-an-oracle-database-what-are|title=When Should you use Java Stored Procedures with an Oracle Database, what are the Drawbacks?|publisher=Stack Overflow|
The mixing and embedding of [[Database trigger|triggers]] and [[stored procedure]]s was one of the breakthrough points up to support the use of [[PL/SQL]] in a ''OO'' paradigm.<ref name="SAMS">Benett, 2002:144</ref> The inclusion in the SQL syntax of statements such as {{mono|[class].[object]}}, and 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>
== Autonomy, notoriety and importance of O-PL/SQL ==
The O-PSL/SQL isn't simply the use a version of a programming language but it's identified as ''how to use it'', and it defines the autonomy of the theme.<ref name="JAVA2">{{cite web|url=http://www.java2s.com/Tutorial/Oracle/0620__Object-Oriented/UseObjectPLSQL.htm|title=Use Object PL/SQL|publisher=java2s.com|
== A confusing of ''objects'' ==
There can be confusion of the notions of ''object of DBMS'' and of ''class object''. This is very important as we live with both significances in one language. It's necessary to identify when the documentation refers to an ''object'' as one of the two definitions.
''Database objects'' are concepts that refer to [[Relational model|relational]] or sequential databases and persist being valid in new models. ''Tables'', ''triggers'', ''columns'', ''indexes'' are examples of database objects,<ref name="TOP10">{{cite web|url=http://www.codeproject.com/Articles/43629/Top-10-steps-to-optimize-data-access-in-SQL-Server|title=Optimize Database Files and Apply Partitioning|author=Shubho, Al-Farooque|date=8 November 2009|publisher=The Code Project|
== The PL/SQL ==
Line 17:
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
O-PL/SQL allows the definition of classes and instantiating these as objects,
Line 23:
== Examples of uses of syntax of O-PL/SQL ==
Here is a small set of examples of O-PL/SQL syntax, extracted from the official documentation<ref name="ORADOC">{{cite web|url=http://docs.oracle.com/|title=Oracle Documentatio|publisher=Oracle|
A simple example of object-oriented PL/SQL<ref>{{cite web|url=http://www.adp-gmbh.ch/ora/plsql/oo/example_1.html|title=Object Oriented Oracle, example 1|publisher=René Nyffenegger's collection of things on the web|
<syntaxhighlight lang="plpgsql">
create or replace type base_type as object (
Line 118:
* [[Database management system]]
== Bibliography ==
* {{cite book|url=https://books.google.com/books?id=1RwFA-vlwX8C&
* {{cite book|url=https://books.google.com/books?id=FqUKI3MSuHYC
* {{cite book|chapter-url=http://my.safaribooksonline.com/book/databases/oracle-pl-sql/9780596805401|title=Oracle PL/SQL Programming|
*{{cite book|url=http://218.92.71.5:1085/trebook/book/book36/2009986047703.pdf|
==References==
Line 128:
== External sources ==
* [https://web.archive.org/web/20120917012254/http://elearning.algonquincollege.com/coursemat/dat2355d/oracle-oo.html Examples of O-Pl/SQL]
* Another example of stored procedure in Java embedded in Oracle Documentation: {{anchor|ORA2}}{{cite web|url=http://docs.oracle.com/cd/B19306_01/java.102/b14187/chthree.htm#CACFGDCI|title=Calling Java Methods in Oracle Database|publisher=Oracle|
<!-- NOTE
|