Svetoslav Kapralov. ContentsContents 1.DB4O Overview OODBMS vs. RDBMSOODBMS vs. RDBMS What is DB4OWhat is DB4O 2.DB4O Basics Object ContainerObject Container.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Database System Concepts and Architecture
1 Constraints, Triggers and Active Databases Chapter 9.
Database Concepts Lec. 5. What Is a Database? Data are unprocessed raw facts that include text, number, images, audio, and video. Information is processed.
Advantage Data Dictionary. agenda Creating and Managing Data Dictionaries –Tables, Indexes, Fields, and Triggers –Defining Referential Integrity –Defining.
Logins, Roles and Credentials Lesson 14. Skills Matrix.
Caching the MDSPlus Data via Hibernate By Ajith M Jose Comp6703 Project Client: Raju Karia Supervisor: Dr. Henry Gardner (Development of “WebScope”)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Introduction to SQL Programming Techniques.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Object-Oriented Application Development Using VB.NET 1 Chapter 13 Introduction to Data Access Classes and Persistence.
Fall 2009ACS-4902 R McFadyen1 OODBMS Native ODBMS db4o Consider the model for the Persistence example on the web site section student *
Oracle9i Database Administrator: Implementation and Administration
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Rice KRAD Data Layer JPA Design Eric Westfall July 2013.
Object Oriented Databases by Adam Stevenson. Object Databases Became commercially popular in mid 1990’s Became commercially popular in mid 1990’s You.
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Agenda Journalling More Embedded SQL. Journalling.
ASP.NET Programming with C# and SQL Server First Edition
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Group 15 Christopher Jonathan Jungwoo Jang Versant Object Database.
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
M1G Introduction to Database Development 6. Building Applications.
Goodbye rows and tables, hello documents and collections.
Stored Procedures, Transactions, and Error-Handling
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Database Unit Test MSSQL 2008 & VS 2010 Aung Kyaw Myo.
Introduction FREE Application Performance Analysis Workload Performance Series Software Software Installation Procedure Initial Performance Review Process.
Tallinna Tehnikaülikool Informaatikainstituut Javal baseeruv objektide püsivuse kiht Jakamar Bakalaureusetöö Üliõpilane:Erki Suurjaak Matrikli nr:
Entity Framework Code First – Beyond the Basics Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
© All rights reserved. U.S International Tech Support
JPA / HIBERNATE CSCI 6370 Nilayan Bhattacharya Sanket Sable.
Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
EbiTrack Architecture Version 1.0 September 24, 2012.
IT System Administration Lesson 3 Dr Jeffrey A Robinson.
Session 1 Module 1: Introduction to Data Integrity
1 Intro stored procedures Declaring parameters Using in a sproc Intro to transactions Concurrency control & recovery States of transactions Desirable.
SQL Server 2005 Implementation and Maintenance Chapter 6: Security and SQL Server 2005.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
Google Code Libraries Dima Ionut Daniel. Contents What is Google Code? LDAPBeans Object-ldap-mapping Ldap-ODM Bug4j jOOR Rapa jongo Conclusion Bibliography.
Silent Spaces Steven Danneman Ryan Phillips Lam Nguyen Burt Bielicki.
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.
Murat KARAÖZ1. Scope What is an “Object Database”? History Queries When / Where / Why ODMSs Murat KARAÖZ2.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe.
SQL Basics Review Reviewing what we’ve learned so far…….
 Project Team: Suzana Vaserman David Fleish Moran Zafir Tzvika Stein  Academic adviser: Dr. Mayer Goldberg  Technical adviser: Mr. Guy Wiener.
JDBC.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Oracle Announced New In- Memory Database G1 Emre Eftelioglu, Fen Liu [09/27/13] 1 [1]
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Databases (CS507) CHAPTER 2.
Running a Forms Developer Application
Introduction to Entity Framework
Database JDBC Overview CS Programming Languages for Web Applications
Oracle9i Database Administrator: Implementation and Administration
PitchBook For MS Dynamics Plugin
Appendix D: Network Model
Developing and testing enterprise Java applications
Chapter 11 Managing Databases with SQL Server 2000
Pig Hive HBase Zookeeper
Presentation transcript:

Svetoslav Kapralov

ContentsContents 1.DB4O Overview OODBMS vs. RDBMSOODBMS vs. RDBMS What is DB4OWhat is DB4O 2.DB4O Basics Object ContainerObject Container CRUDCRUD ActivationActivation TransactionsTransactions 1.DB4O Overview OODBMS vs. RDBMSOODBMS vs. RDBMS What is DB4OWhat is DB4O 2.DB4O Basics Object ContainerObject Container CRUDCRUD ActivationActivation TransactionsTransactions

DB4O Overview

OОDBMS (db4o) vs. RDBMS Object-oriented programming (OOP) and relational databases (RDBMS) do not match upObject-oriented programming (OOP) and relational databases (RDBMS) do not match up An object database (ODBMS) stores objects directlyAn object database (ODBMS) stores objects directly Object-oriented programming (OOP) and relational databases (RDBMS) do not match upObject-oriented programming (OOP) and relational databases (RDBMS) do not match up An object database (ODBMS) stores objects directlyAn object database (ODBMS) stores objects directly

What is db4o? Open source object databaseOpen source object database Designed for embeddedDesigned for embedded 1,000,000 downloads,1,000,000 downloads, 20,000 registered community members20,000 registered community members 200 customers200 customers Dual license model (GPL / commercial)Dual license model (GPL / commercial) db4o is up to 55x faster than Hibernate + RDBMS!db4o is up to 55x faster than Hibernate + RDBMS! Open source object databaseOpen source object database Designed for embeddedDesigned for embedded 1,000,000 downloads,1,000,000 downloads, 20,000 registered community members20,000 registered community members 200 customers200 customers Dual license model (GPL / commercial)Dual license model (GPL / commercial) db4o is up to 55x faster than Hibernate + RDBMS!db4o is up to 55x faster than Hibernate + RDBMS!

What is db4o? No Database Administrator requiredNo Database Administrator required No conversion or mapping needed since objects are stored as they areNo conversion or mapping needed since objects are stored as they are Only one line of code to store objects of any complexity nativelyOnly one line of code to store objects of any complexity natively Installation by adding a single library fileInstallation by adding a single library file No Database Administrator requiredNo Database Administrator required No conversion or mapping needed since objects are stored as they areNo conversion or mapping needed since objects are stored as they are Only one line of code to store objects of any complexity nativelyOnly one line of code to store objects of any complexity natively Installation by adding a single library fileInstallation by adding a single library file

DB4O Basics

Object Container Represents db4o databasesRepresents db4o databases Supports local file mode or client connections to db4o serverSupports local file mode or client connections to db4o server All operations are executed transactionalAll operations are executed transactional Maintains references to stored and instantiated objectsMaintains references to stored and instantiated objects Represents db4o databasesRepresents db4o databases Supports local file mode or client connections to db4o serverSupports local file mode or client connections to db4o server All operations are executed transactionalAll operations are executed transactional Maintains references to stored and instantiated objectsMaintains references to stored and instantiated objects

Storing Objects Objects stored using method set of ObjectContainerObjects stored using method set of ObjectContainer Stores objects of arbitrary complexityStores objects of arbitrary complexity Objects stored using method set of ObjectContainerObjects stored using method set of ObjectContainer Stores objects of arbitrary complexityStores objects of arbitrary complexity ObjectContainer database = Db4o.openFile("test.db"); // create a publication Book book = new Book(“db4o"); // create authors Author lambo = new Author(“Lambo"); Author gruiu = new Author(“Gruiu"); // assign authors to book book.addAuthor(lambo); book.addAuthor(gruiu); //store complex object database.set(book);

Retrieving Objects db4o supports three query languagesdb4o supports three query languages QBEQBE Native queryNative query SODASODA db4o supports three query languagesdb4o supports three query languages QBEQBE Native queryNative query SODASODA

Query by Example ObjectContainer database = Db4o.openFile("test.db"); // get author “Lambo" Author proto = new Author(“Lambo"); ObjectSet authors = database.get(proto); for (Author author: authors) { System.out.println(author.getName()); } // get all books ObjectSet books = database.get(Book.class); for (Book book: books) { System.out.println(book.getTitle()); } simple method based on prototype objects simple method based on prototype objects

Native Queries ObjectContainer database = Db4o.openFile("test.db"); // find all books after 1995 ObjectSet books = database.query( new Predicate () { public boolean match(Book book) { return book.getYear() > 1995; } ); for (Book book: books) { System.out.println(book.getTitle()); } type safe type safe transformed to SODA and optimized transformed to SODA and optimized type safe type safe transformed to SODA and optimized transformed to SODA and optimized

Update / Delete Objects Update procedure for persistent objectUpdate procedure for persistent object retrieve desired object from the databaseretrieve desired object from the database perform the required changes and modificationperform the required changes and modification store object back to the database by calling the set methodstore object back to the database by calling the set method Delete procedure for persistent objectDelete procedure for persistent object retrieve desired object from the databaseretrieve desired object from the database method delete of ObjectContainer removes objectsmethod delete of ObjectContainer removes objects Update procedure for persistent objectUpdate procedure for persistent object retrieve desired object from the databaseretrieve desired object from the database perform the required changes and modificationperform the required changes and modification store object back to the database by calling the set methodstore object back to the database by calling the set method Delete procedure for persistent objectDelete procedure for persistent object retrieve desired object from the databaseretrieve desired object from the database method delete of ObjectContainer removes objectsmethod delete of ObjectContainer removes objects

CRUD Summary Storing of new objects using the set methodStoring of new objects using the set method object graph is traversed and all referenced objects are storedobject graph is traversed and all referenced objects are stored Updating of existing objects using the set methodUpdating of existing objects using the set method by default update depth is set to oneby default update depth is set to one only primitive and string values are updatedonly primitive and string values are updated object graph is not traversed for reasons of performanceobject graph is not traversed for reasons of performance Storing of new objects using the set methodStoring of new objects using the set method object graph is traversed and all referenced objects are storedobject graph is traversed and all referenced objects are stored Updating of existing objects using the set methodUpdating of existing objects using the set method by default update depth is set to oneby default update depth is set to one only primitive and string values are updatedonly primitive and string values are updated object graph is not traversed for reasons of performanceobject graph is not traversed for reasons of performance

CRUD Summary Deleting existing objects using the delete methodDeleting existing objects using the delete method by default delete operations are not cascadedby default delete operations are not cascaded referenced objects have to be deleted manuallyreferenced objects have to be deleted manually cascading delete can be configured for individual classescascading delete can be configured for individual classes Deleting existing objects using the delete methodDeleting existing objects using the delete method by default delete operations are not cascadedby default delete operations are not cascaded referenced objects have to be deleted manuallyreferenced objects have to be deleted manually cascading delete can be configured for individual classescascading delete can be configured for individual classes

ActivationActivation Activation controls instantiation of object fieldsActivation controls instantiation of object fields object field values are loaded into memory only to a certain depth when a query retrieves objectsobject field values are loaded into memory only to a certain depth when a query retrieves objects activation depth denotes the length of the reference chain from an object to anotheractivation depth denotes the length of the reference chain from an object to another fields beyond the activation depth are set to null for object references or to default values for primitive typesfields beyond the activation depth are set to null for object references or to default values for primitive types Activation controls instantiation of object fieldsActivation controls instantiation of object fields object field values are loaded into memory only to a certain depth when a query retrieves objectsobject field values are loaded into memory only to a certain depth when a query retrieves objects activation depth denotes the length of the reference chain from an object to anotheractivation depth denotes the length of the reference chain from an object to another fields beyond the activation depth are set to null for object references or to default values for primitive typesfields beyond the activation depth are set to null for object references or to default values for primitive types

ActivationActivation Activation depth trade-offActivation depth trade-off set to maximumset to maximum set to minimumset to minimum Controlling activationControlling activation default activation depth is 5default activation depth is 5 methods activate and deactivate of ObjectContainermethods activate and deactivate of ObjectContainer per class configurationper class configuration Activation depth trade-offActivation depth trade-off set to maximumset to maximum set to minimumset to minimum Controlling activationControlling activation default activation depth is 5default activation depth is 5 methods activate and deactivate of ObjectContainermethods activate and deactivate of ObjectContainer per class configurationper class configuration

TransactionsTransactions ACID transaction modelACID transaction model Data transaction journalingData transaction journaling zero data loss in case of system failurezero data loss in case of system failure automatic data recovery after system failureautomatic data recovery after system failure db4o core is thread-safe for simultaneous operationsdb4o core is thread-safe for simultaneous operations db4o uses the read committed isolation leveldb4o uses the read committed isolation level ACID transaction modelACID transaction model Data transaction journalingData transaction journaling zero data loss in case of system failurezero data loss in case of system failure automatic data recovery after system failureautomatic data recovery after system failure db4o core is thread-safe for simultaneous operationsdb4o core is thread-safe for simultaneous operations db4o uses the read committed isolation leveldb4o uses the read committed isolation level