Tallinna Tehnikaülikool Informaatikainstituut Javal baseeruv objektide püsivuse kiht Jakamar Bakalaureusetöö Üliõpilane:Erki Suurjaak Matrikli nr: 970772.

Slides:



Advertisements
Similar presentations
Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Advertisements

Active Databases as Information Systems
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Overview Distributed vs. decentralized Why distributed databases
Introduction to Databases Transparencies
Chapter 14 The Second Component: The Database.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Object-Oriented Methods: Database Technology An introduction.
Chapter 1 Introduction to Databases
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Service Broker Lesson 11. Skills Matrix Service Broker Service Broker, provides a solution to common problems with message delivery and consistency that.
Who am I? ● Catalin Comanici ● QA for 10 years, doing test automation for about 6 years ● fun guy and rock star wannabe.
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Data Access Patterns. Motivation Most software systems require persistent data (i.e. data that persists between program executions). In general, distributing.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Think Possibility Integrating Web Applications With Databases.
CSE470 Software Engineering Fall Database Access through Java.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
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.
Introduction to Microsoft Access Overview 1. Introduction What is Access? A relational database management system What is a Relational Database? Organized.
1 Dr Alexiei Dingli Web Science Stream Introducing Rails.
CS 405G: Introduction to Database Systems Database programming.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Object Persistence (Data Base) Design Chapter 13.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
© 2005 Prentice Hall10-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
1 Mapping to Relational Databases Presented by Ramona Su.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Chapter 38 Persistence Framework with Patterns 1CS6359 Fall 2011 John Cole.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
PL/SQLPL/SQL Oracle10g Developer: PL/SQL Programming Chapter 3 Handling Data in PL/SQL Blocks.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
SQL Basic. What is SQL? SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database.
JPA / HIBERNATE CSCI 6370 Nilayan Bhattacharya Sanket Sable.
What is a Package? A package is an Oracle object, which holds other objects within it. Objects commonly held within a package are procedures, functions,
An Architecture to Support Context-Aware Applications
JDBC CS 124. JDBC Java Database Connectivity Database Access Interface provides access to a relational database (by allowing SQL statements to be sent.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Oracle10g Developer: PL/SQL Programming1 Objectives SQL queries within PL/SQL Host or bind variables The %TYPE attribute Include queries and control structures.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Oracle11g: PL/SQL Programming Chapter 3 Handling Data in PL/SQL Blocks.
Object storage and object interoperability
Secure middleware patterns E.B.Fernandez. Middleware security Architectures have been studied and several patterns exist Security aspects have not been.
Chapter 1 Database Access from Client Applications.
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS. The Problem: Persistent Objects persistent object An object that can survive the process or thread that.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
CS422 Principles of Database Systems Object-Relational Mapping (ORM) Chengyu Sun California State University, Los Angeles.
JDBC Statements The JDBC Statement, CallableStatement, and PreparedStatement interfaces define the methods and properties that enables to send SQL or PL/SQL.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Instructor: Jinze Liu Fall /8/2016Jinze University of Kentucky 2 Database Project Database Architecture Database programming.
Don't Know Jack About Object-Relational Mapping?
Advanced Web Automation Using Selenium
Chapter 4 Relational Databases
SQL – Application Persistence Design Patterns
Database Application Development
Jeff Webb Maria Baron Chris Hundersmarck
Using a Database with JDBC
Chapter 8 Advanced SQL.
DATABASES WHAT IS A DATABASE?
Handling Data in PL/SQL Blocks
SQL – Application Persistence Design Patterns
Presentation transcript:

Tallinna Tehnikaülikool Informaatikainstituut Javal baseeruv objektide püsivuse kiht Jakamar Bakalaureusetöö Üliõpilane:Erki Suurjaak Matrikli nr: Juhendaja:Tarmo Veskioja

Defence Overview What is object persistence What solution did I propose What is Jakamar Benefits and tradeoffs

What is object persistence objects existing beyond application’s lifetime Data Store Application Objects

Concerns using OOP and RDBMS handling changes in the data structure possible to reuse persistence logic

What solution did I propose Persistence Broker design pattern enables full separation of business and persistence logic easily customizable for different applications offers useful functionality, like object caching

Architecture Database User Interface Classes Business classes Persistence Broker Cache Database User Interface Classes Business classes Simple architectureUsing a Persistence Broker

What is Jakamar a reusable component provides automated persistence

Jakamar in the thesis architecture program flow functionality error handling security concurrent use logging configuration

Benefits Easier maintenance Less program code to write: access to persistence via simple operations like –store(object) –delete(object) –retrieve(query criteria)

Benefits (2) Connection connection = DriverManager.getConnection("jdbc:odbc:emt"); Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM PERSON WHERE location = 'Jõhvi'"); Collection results = new ArrayList(); while (rs.next()) { Person person = new Person(); person.id = rs.getInt("id"); person.firstName = rs.getString("firstName"); person.lastName = rs.getString("lastName"); person.location = rs.getString("location"); results.add(person); Statement stmtSub = connection.createStatement(); ResultSet rsSub = stmtSub.executeQuery( "SELECT * FROM PHONE WHERE personId = " + person.id); while (rsSub.next()) { Phone phone = new Phone(); phone.id = rsSub.getInt("id"); phone.personId = rsSub.getInt("personId"); phone.phone = rsSub.getString("phone"); person.phones.add(phone); } stmtSub.close(); } stmt.close(); connection.close(); PersistenceBroker broker = PersistenceBrokerFactory.create("conf.xml"); Person param = new Person(); param.location = "Jõhvi"; Query query = broker.createQuery(param, new String[]{"location"}, null); Collection results = broker.retrieveCollection(query); Using JakamarAccessing the database directly

Tradeoffs decrease in functionality –with embedded SQL,extremely complex queries accessible as easily as simple retrieval –with Jakamar, restrictions on query complexity

Benchmarks better performance on object retrieval worse performance on storing objects Repeated? - whether the same operation was repeated multiple times

Conclusion the Persistence Broker pattern is a good approach Jakamar is a viable component –faster development –better modularized application structure –possibly better performance on retrieval

Further development cursors transactions Object Query Language distributed use extent classes graphical configuration interface

Database Persistence Broker Reflection Persistence Mapping Cache Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Query Mechanism Application Applications Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Identities Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Field Values Persistent Objects Persistent Objects Field Values Persistent Objects Persistent Objects SELECT Results Persistent Objects Persistent Objects ACTION Queries Persistent Objects Persistent Objects SELECT Queries Conversion Persistent Objects Persistent Objects Field Values Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Queries Persistent Objects Persistent Objects Field Values Persistent Objects Persistent Objects Column Values Storing and deleting Handles executing SQL statements Converts object field values to table column values and vice versa Contains mappings between classes and tables Caches persistent objects Accesses object fields dynamically Looking up cached instances Deleting storage and deletion Persistent Objects Persistent Objects Persistent Objects Delegating queries from the application to lower level Specifying the field values of objects to store or delete Returning the field values for retrieved objects Persistent Objects Persistent Objects Field Values Specifying the criteria field values Retrieving Database-specific SQL queries Persistent Objects Persistent Objects Queries Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects Persistent Objects

Object relations