1 / 58

Object Orientation in Oracle

Object Orientation in Oracle. April 23 rd , 2007 Kangpyo Lee Jaeseok Myung. Contents. Part 1: OO in Oracle Database 10g About Oracle Object-Relational Databases OO in Oracle Database 10g Part 2: OO in Oracle E-Business Suite 11i Background Oracle’s Solution Oracle E-Business Suite 11i

shantell
Download Presentation

Object Orientation in Oracle

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Object Orientation in Oracle April 23rd, 2007 Kangpyo Lee Jaeseok Myung

  2. Contents • Part 1: OO in Oracle Database 10g • About Oracle • Object-Relational Databases • OO in Oracle Database 10g • Part 2: OO in Oracle E-Business Suite 11i • Background • Oracle’s Solution • Oracle E-Business Suite 11i • References & Appendix

  3. About Oracle (1/4) • Oracle Corporation • One of the world’s greatest IT company, offering database and middleware S/W, and applications S/W • Has been an unchallenged leader in database market • Headquartered in Redwood Shores, California • Web Site: http://www.oracle.com

  4. About Oracle (2/4) • History • Oracle was founded by Lawrence J. Ellison in 1977 • He realized there was tremendous business potential in RDB model • The timeline highlights 30 years of Oracle innovation • Oracle has refined its technology by early adoptingpervasive ideas of those days

  5. About Oracle (3/4) • Market Share

  6. About Oracle (4/4) • Oracle Products Oracle Database Oracle Fusion Middleware Oracle Applications Oracle Enterprise Manager

  7. Contents • Part 1: OO in Oracle Database 10g • About Oracle • Object-Relational Databases • OO in Oracle Database 10g • Part 2: OO in Oracle E-Business Suite 11i • Background • Oracle’s Solution • Oracle E-Business Suite 11i • References & Appendix

  8. Object-Relational Database(1/4) • Object-Relational Data Model • Extends the relational data model to support • Complex data types • Type inheritance • Object identity Object-Relational Database Object- Oriented Concepts Relational Database

  9. Object-Relational Database(2/4) • Pure Object-Oriented Databases • Around 1985 • Information is represented in the form of objects • ODBMS • Object DataBase Management System • Database capabilities are combined with OO programming capabilities OOPL DB OOPL DB Extending an existing DB language with OO capabilities Extending an existing OOPL with DB capabilities

  10. Object-Relational Database(3/4) • RDB vs. OODB !!!

  11. Object-Relational Database(4/4) • Why Did OODB Lose the Game? • Benchmarks have shown that ODBMS can be clearly superior for certain kinds of tasks, but… • Eventually absorbed into RDB ⇒ORDB 4 1 2 3 Intentional resistance from major RDB vendors Failure to make great impact on mainstream commercial data processing For general-purpose queries, pointer-based techniques will tend to be slower and more difficult to formulate Lack of interoperability with a great # of tools/features

  12. Contents • Part 1: OO in Oracle Database 10g • About Oracle • Object-Relational Databases • OO in Oracle Database 10g • Part 2: OO in Oracle E-Business Suite 11i • Background • Oracle’s Solution • Oracle E-Business Suite 11i • References & Appendix

  13. OO in Oracle Database 10gOracle Objects(1/3) • Oracle Object Types • User-defined types • Make it possible to model the real-world entities as objects in the database • Attributes + methods

  14. OO in Oracle Database 10gOracle Objects(2/3) • Example for Creating an Object attributes methods

  15. OO in Oracle Database 10gOracle Objects(3/3) • Oracle Object Methods • Functions or procedures that you can declare in an object type definition to implement behavior • Written in PL/SQL Member function Member procedure

  16. OO in Oracle Database 10gObject Tables • Oracle Object Tables • A special kind of table where each row represents an object Returns object instances corresponding to rows of the table

  17. OO in Oracle Database 10gInheritance in Object Types(1/3) • Type Inheritance • The new subtype inherits all the attributes and methods that its parent type has • Supertypes & subtypes • No multiple inheritance is allowed • Determines whether subtypes can be derived from that type by • FINAL • NOT FINAL

  18. OO in Oracle Database 10gInheritance in Object Types(2/3) • Method Overloading & Overriding • Adding new methods • Adding new methods that have the same names as methods it inherits (overloading) • Redefining methods it inherits (overriding) • Example for Creating a Subtype with an Overloading Method

  19. OO in Oracle Database 10gInheritance in Object Types(3/3) • Example for Creating a Subtype with an Overriding Method Displays the newly added attribute major

  20. OO in Oracle Database 10gObject Identity(1/2) • Oracle REF • Oracle built-in datatype • A logical pointer to a row object constructed from the OID • Provides an easy mechanism for navigating between objects • Uses the dot (.) notation to follow the pointers • Scoped REF • Constrains a REF to contain only references to a specified object table

  21. OO in Oracle Database 10gObject Identity(2/2) • Example for Using a scoped REF to an Object contacts_ref person_obj_table

  22. OO in Oracle Database 10gSupport for Collection Datatypes(1/3) • Oracle Collection Datatypes • Varrays • Nested tables • Varrays • An ordered set of elements, all of the same datatype • Each element has an index phone_list

  23. OO in Oracle Database 10gSupport for Collection Datatypes(2/3) • Nested Tables • An unordered set of elements, all of the same datatype • No maximum & no order • A nested table has a single column • Elements of a nested table are actually stored in a separate table

  24. OO in Oracle Database 10gSupport for Collection Datatypes(3/3) • Multilevel Collection Types • Nested table of nested table type • Nested table of varray type • Varray of nested table type • Varray of varray type • Nested table or varray of a user-defined type that has an attribute that is a nested table or varray type

  25. OO in Oracle Database 10gObject Functions & Operators • Functions & Operators Useful with Objects • CAST • CURSOR • DEREF • IS OF type • REF • SYS_TYPEID • TABLE() • TREAT • VALUE • SELECT VALUE(p) • FROM person_obj_table p • WHERE VALUE(p) IS OF (student_typ); • SELECT name, SYS_TYPEID(VALUE(p)) typeid FROM person_obj_table p; • SELECT TREAT(VALUE(p) AS student_typ) • FROM person_obj_table p;

  26. OO in Oracle Database 10gObject Views(1/2) • Oracle Object View • A virtual object table • Each row in the view is an object • Useful in prototyping or transitioning to OO applications • The data in the view can be taken from relational tables and accessed • Can be used like tableviews • Presents only the data that you want users to see • CREATE TYPE employee_t AS OBJECT ( • empno NUMBER (5), • ename VARCHAR2 (20), • salary NUMBER (9,2), • job VARCHAR2 (20)); • CREATE TABLE emp_table ( • empnum NUMBER (5), • ename VARCHAR2 (20), • salary NUMBER (9,2), • job VARCHAR2 (20)); A pointer (REF) to the objects in the view • CREATE VIEW emp_view OF employee_t • WITH OBJECT IDENTIFIER (empno) AS • SELECT e.empnum, e.ename, e.salary, e.job • FROM emp_table e • WHERE job = 'Developer';

  27. OO in Oracle Database 10gObject Views(2/2) • Object View Hierarchies • A set of object views each of which is based on a different type in a type hierarchy • Superviews, subviews

  28. OO in Oracle Database 10gSupport for XML(1/3) • Oracle XML DB • Treats XML as a native data type in the database • Applications can use standard SQL and XML operators • to generate complex XML documents from SQL queries • to store XML documents • Benefits

  29. OO in Oracle Database 10gSupport for XML(2/3)

  30. OO in Oracle Database 10gSupport for XML(3/3) • Oracle XML Developer’s Kits (XDK) • Contain the basic building blocks for reading, manipulating, transforming, & viewing XML documents • XML Parsers • XSLT Processor • XML Schema Processor • XML Class Generator • XML Java Beans • XML SQL Utility • XSQL Servlet

  31. Summary of Pt. 1 • Oracle Database 10g • Fully supports the basic OO concepts such as • Object Types • Object Tables • Inheritance in Object Types • Object Identity • Support for Collection Datatypes • Object Views • Object Functions & Operators • Support for XML

  32. Contents Part 1: OO in Oracle Database 10g About Oracle Object-Relational Databases OO in Oracle Database 10g Part 2: OO in Oracle E-Business Suite 11i Background Oracle’s Solution Oracle E-Business Suite 11i References & Appendix 32

  33. BackgroundWhat Is the Business on IT’s Viewpoint? Performance Extensibility Availability Lowers TCO (Total Cost of Ownership) Integration Maintenance 33 33 33

  34. BackgroundProblems over the Business (1/3) Finances CRM Supply Chain Warehouse • Fragmented Systems and Data • Consistency • Each data source value may different • Accuracy • Can’t make a good decision • Performance • Need additional transactions • Integration • Difficult combine other systems 34 34 34

  35. Background Problems over the Business (2/3) Portal Business Intelligence ETL Business Intelligence Applications Server Database Server Architecture Problems Based on Multiple Vendors 35 35 35

  36. Background Problems over the Business (3/3) Human Resources Financials CRM SCM • Various Business Solutions • Separated applications take long time to be an expert • Separated applications cause many administration costs 36 36 36

  37. Contents Part 1: OO in Oracle Database 10g About Oracle Object-Relational Databases OO in Oracle Database 10g Part 2: OO in Oracle E-Business Suite 11i Background Oracle’s Solution Oracle E-Business Suite 11i References & Appendix 37 37

  38. Oracle’s Solution The Power of One (1/3) Develop Maintain Market Projects Sell Finance Order HR Plan Service Source Procure Fulfill Manufacture One Family of Applications 38 38 38

  39. Oracle’s Solution The Power of One (2/3) Develop Maintain Market Projects Sell Finance Order HR Plan Service Source Procure Fulfill Manufacture Customers, Products, & EverythingElse! • One Enterprise Data Model • Global Single Data Model (GSD) 39 39 39

  40. Oracle’s Solution The Power of One (3/3) Client Tier Application Tier Database Tier Application Logic Database Logic User Interface One Underlying Technology Platform 40 40 40

  41. Oracle FusionNext-Generation Enterprise Applications Oracle procured many application sets by greedy M&A Integrate those applications, is called “Fusion” 41 41 41

  42. Contents Part 1: OO in Oracle Database 10g About Oracle Object-Relational Databases OO in Oracle Database 10g Part 2: OO in Oracle E-Business Suite 11i Background Oracle’s Solution Oracle E-Business Suite 11i References & Appendix 42 42

  43. Oracle E-Business Suite 11iThe True Character of EBS • The Portal System for Enterprise • which contains many applications 43 43 43

  44. Oracle E-Business Suite 11i The Technology Stack of EBS Oracle AS and Database have technical components EBS has a framework to manipulate other layers EBS applications are developed by such framework 44 44 44

  45. Oracle E-Business Suite 11i How Can Make a View of EBS App? • All pages of EBS application consist of components A Hierarchy of Regionsand Components 45

  46. Oracle E-Business Suite 11i MVC Architecture • A component-based design with clean interfaces among model, view, and controller objects The controller responds to user actions and directs application flow Controller Model View The model encapsulates underlying data and business logic of the application The view formats and presents data from a model to the user 46

  47. Oracle E-Business Suite 11i The View – Using Java Objects Header Bean Each UI widget corresponds to one or more Java objects (beans) Submit button Bean Table Bean The Java objects are used to create HTML at runtime. 47

  48. Oracle E-Business Suite 11i The View – UIX (User Interface XML) <div xmlns="http://www.w3.org/TR/REC-html40" xmlns:ui="http://xmlns.oracle.com/uix/ui"> Hello world. <ul> <li>First list element</li> <li>Second list element</li> </ul> <ui:button text="Push me" destination="http://www.example.org"/> </div> ButtonBean button = new ButtonBean(); button.setText("Push me"); button.setDestination("http://www.example.org"); div.addIndexedChild(button); UIX 48

  49. Oracle E-Business Suite 11i The View – How It Works OA Framework Design time OA Framework Runtime Page Hierarchy UIX Bean Hierarchy UIX Renderers JSP/HTML Browser Cache .XML Metadata 49

  50. Oracle E-Business Suite 11i The Controller – User Interaction Controller Browsersendsrequest toController User takes an action Metadata Workflow Model Apply 1. Controller delegates data processing to Model 2. Determines next page 3. Invokes View to present the next page to user View 50

More Related