Using OpenPetra's DataAccess Objects

From OpenPetra Wiki
Revision as of 10:03, 2 August 2011 by Christiankatict (talk | contribs) (Created page with '==Purpose of OpenPetra's DataAccess Objects== OpenPetra's DataAccess Objects form an Object-Relational Mapper (ORM [http://searchwindevelopment.techtarget.com/definition/object-r…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose of OpenPetra's DataAccess Objects

OpenPetra's DataAccess Objects form an Object-Relational Mapper (ORM [1]). The ORM relieves the programmer from the need to write SQL commands and provides compile-time checks as the DataAccess Objects expose Methods with Typed Arguments. Contrast that with SQL commands, which are simple strings embedded in source code. No compile-time checks (such as for correctness of syntax and existence of a certain DB table) can be done on those!

OpenPetra's DataAccess Objects are auto-generated from the \db\petra.xml file and use the RDMBS-agnostic Database Access Object for the execution of SQL commands (DataAccess Objects are therefore not tied to a specific RDBMS!).

An overview of OpenPetra's DataAccess Objects can be found here.


Reading Data From The Database

Writing And Deleting Data From The Database

Counting of Data And Checking For Existence of Data In The Database

Other Functionalities