TPTP Data Model 1 Database support for TPTP EMF based data models using Elver/Hibernate Guru Nagarajan July 14, 2006.

Slides:



Advertisements
Similar presentations
Introduction to NHibernate By Andrew Smith. The Basics Object Relation Mapper Maps POCOs to database tables Based on Java Hibernate. V stable Generates.
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Introduction to Rails.
Tom Sugden EPCC OGSA-DAI Future Directions OGSA-DAI User's Forum GridWorld 2006, Washington DC 14 September 2006.
5 Copyright © 2005, Oracle. All rights reserved. Accessing the Database with Servlets.
21 Sep 2005LCG's R-GMA Applications R-GMA and LCG Steve Fisher & Antony Wilson.
2 A bank application needs to access information from the customer database and integrate it with loan credit history information stored in a legacy database.
Database System Concepts and Architecture
WaveMaker Visual AJAX Studio 4.0 Training
Persistence and Datastore
Rapid Persistence Layer Development with Hibernate Rapid Persistence Layer Development with Hibernate Tyler Mendenhall E-gineering,
.NET Database Technologies: Open-Source Frameworks.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Session-02.
Session-01. Hibernate Framework ? Why we use Hibernate ?
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
An Introduction to Hibernate Matt Secoske
Rapid Persistence Layer Development with Hibernate Rapid Persistence Layer Development with Hibernate Tyler Mendenhall E-gineering,
1 INTRO TO BUSINESS COMPONENTS FOR JAVA (BC4J) Matt Fierst Computer Resource Team OracleWorld Session
CSCI 6962: Server-side Design and Programming
Agenda What is Hibernate Spring Integration Questions Overview
Databases and LINQ Visual Basic 2010 How to Program 1.
Enticy GROUP THE A Framework for Web and WinForms (Client-Server) Applications “Enterprise Software Architecture”
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Intro-Part 1 Introduction to Database Management: Ch 1 & 2.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
Introduction to Database Development Using Borland Data Providers 2128 Martin Rudy.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database.
Spring Database Access Ojitha Kumanayaka Copyright © Virtusa, 2007.
Hibernate 3.0. What is Hibernate Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it.
Java Data Persistence Using Hibernate Jack Gardner October 2004.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Ganymede Simultaneous Release | © 2008 by Springsite B.V., The Netherlands made available under the EPL v1.0 Teneo Ganymede Simultaneous Release.
JPA / HIBERNATE CSCI 6370 Nilayan Bhattacharya Sanket Sable.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
ESG-CET Meeting, Boulder, CO, April 2008 Gateway Implementation 4/30/2008.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
Overview of C/C++ DB APIs Dirk Düllmann, IT-ADC Database Workshop for LHC developers 27 January, 2005.
Introduction – ORM, Helloworld Application
Fundamentals of MyBATIS
IS-907 Java EE Introduction to JPA. Java Persistence API A framework for using relational databases in Java programs mapping between tables and classes,
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Sean Chambers.  ORM stands for Object Relational Mapper  Maps your POCO (plain old clr objects) to your relational model using XML config  Relieves.
EJB Enterprise Java Beans JAVA Enterprise Edition
Interacting with LexEVS 5.0 LexEVS in a Distributed Environment November 2009.
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
CS422 Principles of Database Systems Object-Relational Mapping (ORM) Chengyu Sun California State University, Los Angeles.
CS520 Web Programming Object-Relational Mapping with Hibernate and JPA (I) Chengyu Sun California State University, Los Angeles.
Hibernate Online Training. Introduction to Hibernate Hibernate is a high-performance Object-Relational persistence and query service which takes care.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
HIBERNATE/Java Overview of technology for Hibernate by محمد حسن کاظمی پوران Master : M.M.Nematollahi.
Chengyu Sun California State University, Los Angeles
Apache Ignite Data Grid Research Corey Pentasuglia.
ODBC, OCCI and JDBC overview
A very brief introduction
Persistence – Iteration 4 Vancouver Bootcamp
Entity Framework By: Casey Griffin.
Java Data Persistence Using Hibernate
Hibernate Bayu Priyambadha, S.Kom.
Jeff Webb Maria Baron Chris Hundersmarck
Teneo Ganymede Simultaneous Release Graduation Review
Teneo Ganymede Mini Deck
Chengyu Sun California State University, Los Angeles
Database SQL.
Presentation transcript:

TPTP Data Model 1 Database support for TPTP EMF based data models using Elver/Hibernate Guru Nagarajan July 14, 2006

TPTP Data Model 2 Outline What is Hibernate? Overview of the Elver-Hibernate architecture Source Sample Current TPTP database support Questions

TPTP Data Model 3 What is the Problem statement? EMF objects can be persisted in relational databases and retrieved. The persistence and retrieval should support Most used Relational Databases Support the retrieval of the EMF objects using the EMF Resource approach Capitalize on the query and caching capabilities of Relational Databases and use them in building the required EMF Objects

TPTP Data Model 4 Challenges of Persistence In-Memory data and Persistence must be kept in sync The Object Model requirements could change and the persistence data store definition must be modified Portability of the persistence is an item not to be ignored Object-Relation Mapping to be seamless Solution: Application should not need to know that its data is being persisted

TPTP Data Model 5 What is Hibernate? Basically, a Object-Relational Mapping tool Maps Objects -> Relational Databases Implements those Mappings Knows about the underlying Database and provides an elegant abstraction How does Hibernate work? At runtime, Hibernate reads the mapping and dynamically builds Java classes that manages database-object interaction. Provides an API to manage, query the objects from the database, and create objects Your App Hibernate Mapping Object Database

TPTP Data Model 6 What is Elver? EMF Model Hibernate Mapping Object Database Elver basically adds the EMF support to Hibernate OR It consists of primarily two components Mapping Tier Support for EMF annotations Runtime Tier Query, Save, Create objects using EMF EMF Datastore

TPTP Data Model 7 Elver Runtime Arch.

TPTP Data Model 8 Elver Code Sample // Create the DataStore. final String dataStoreName = YourModelDataStore"; final HbDataStore dataStore = HbHelper.INSTANCE.createRegisterDataStore(dataStoreName); // Configure the EPackages used by this DataStore. dataStore.setEPackages(new EPackage[] { EMFPackagePackage.eINSTANCE }); // Initialize the DataStore. This sets up the Hibernate mapping and creates the corresponding tables in the database. dataStore.initialize(); //start a transaction final SessionFactory sessionFactory = dataStore.getSessionFactory(); // Open a new Session and start Transaction. Session session = sessionFactory.openSession(); session.beginTransaction(); Create and populate Model Model model = ModelFactory.eINSTANCE.createModel(); //Set Model Properties // Make it persistent. session.save(model); Commit Transaction and close Session session.getTransaction().commit(); session.close();

TPTP Data Model 9 Sample – Creating SQL & HQL Queries, Resource SQL Query query = session.createQuery("SELECT count(allbooks) FROM Model model WHERE >= >"); Hibernate Query (HQL) Query query = session.createQuery("FROM Model.member"); List modelmember = query.list(); Creating and Loading Resource String uriStr = "hibernate://?" + YourSessionFactory"; final URI uri = URI.createURI(uriStr); ResourceSet resourceSet = new ResourceSetImpl(); final Resource res = resourceSet.createResource(uri); //Load the resource res.load(Collections.EMPTY_MAP); Iterator it = res.getContents().iterator(); //Iterate through the iyterator to get your model objects

TPTP Data Model 10 TPTP Database Support - Overview TPTP database interface is very similar to Hibernate Database Interface TypeMap Paging … Query Builder Object Query – Subset of HQL (Hibernate Query) Reference Query – EMF Query Support for Log database schema For other models you have to extend, provide the schema

TPTP Data Model 11 Why Elver? Multi-Database support MySql, Oracle, DB2, Access etc. Database specific SQL (SQL Diaelect) supported Exposes the Database performance via SQL queries (Hibernate ftr) Automatic Schema Generation Provide a EMF model, set its characteristics and Elver/Hibernate creates the mapping, schema for runtime Not Model Specific Exception Handling & Logging Very good exception handling Log4J Logging Annotations Support Preserve the Annotations in the Database Database Transaction support

TPTP Data Model 12 Q & A

TPTP Data Model 13 Useful Links Elver Page: Hibernate: License: Elver: Apache 2.0 Hibernate: LGPL