150 likes | 293 Views
Object-Relational Mapping with O b J ectRelational B ridge (OJB). Presented by Igor Seremet Alex Berezhnoy. Presentation Preview. Goal of this presentation The need for Object-Relational Mapping OJB and other O-R Mapping tools OJB Tutorial Mapping Classess to Tables via XML
E N D
Object-Relational Mapping with ObJectRelationalBridge (OJB) Presented by Igor Seremet Alex Berezhnoy
Presentation Preview • Goal of this presentation • The need for Object-Relational Mapping • OJB and other O-R Mapping tools • OJB Tutorial • Mapping Classess to Tables via XML • Coding with PersitanceBroker • ODMG, JDO and more about OJB
O-R Mapping Relational Model O-R Mapping Object Oriented Model Manual JDBC coding O-R Mapping Tools
Signsoft intelliBO FireStorm Infobjects ObjectDRIVER LiDO InterSystems Cache SimpleOrm VBSF The ProductivityEnvironmentForJava (PE:J) JDX Cayenne TopLink EnterpriseObjectsFramework Jakarta ObjectRelationalBridge Jaxor Hibernate Expresso DataBind JdoGenie Abra KodoJdo Persistence FrontierSuite for J2EE & J2SE FrontierSuite for JDO BasicWebLib iBATIS DB Layer Java Ultra-Lite Persistence (JULP) Castor O-R Mapping Tools ObJectRelationalBridge (OJB) • One of the most popular • Open source, supported by Jakarta • Pure Java • Used by someone we know
Getting Started with OJB • Downloading OJB • Installing OJB • Specifying Database Connection • http://db.apache.org/ojb/
SQL Table Definition: OJB XML Mapping (repository.xml): Java Class Definition: O-R Mapping
PersistenceBroker: storing How much JDBC code would this take?
SQL Table Definitions: Java Class Definitions: OJB XML Mapping (repository.xml)
Other Ways of Using OJB • ODMG: Object Data Management Group • The standard for storing objects • OJB is fully complient • JDO: Java Data Objects • Sun’s API for transparent persistance of Java objects • Complete implementation is in the works
Mapping support for 1:1, 1:M, M:N relationships Persistance by reachability: all objects associated to a persistent object by references are made persistent too Classess can be mapped to any number of JDBC data sources Configurable Lazy Materialization through Proxy support Support for Polymorphism and ODMG Extents Managed and Native sequence numbering PreparedStatement reuse Integrates with EJB Prefetched relationships Supports 4 transaction isolation levels: Read uncommited Read commited Repeatable read Serializable Many Features of OJB
Summary • O-R Mapping • OJB • Mapping via XML • PersistanceBroker • Creation • Retrieval • Update • Deletion • ODMG & JDO