Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational

Similar documents
Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Overview RDBMS-ORDBMS- OODBMS

Complex Data and Object-Oriented. Databases

Introduction to Databases

Introduction to Object-Oriented and Object-Relational Database Systems

The ObjectStore Database System. Charles Lamb Gordon Landis Jack Orenstein Dan Weinreb Slides based on those by Clint Morgan

Modern Databases. Database Systems Lecture 18 Natasha Alechina

XXI. Object-Oriented Database Design

Introduction to Database Systems

Object-Oriented Databases

Chapter 2. Data Model. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

CS352 Lecture - Object-Based Databases

Object Oriented Design with UML and Java. PART XVIII: Database Technology

Object-persistence formats. Files. Object-oriented databases. Data management layer design. Relational databases. Relational Database Example.

Course Notes on A Short History of Database Technology

Course Notes on A Short History of Database Technology

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

Object-Oriented & Object-Relational DBMS. Example App: Asset Management. An Asset Management Scenario. Object-Relational Databases

U III 5. networks & operating system o Several competing DOC standards OMG s CORBA, OpenDoc & Microsoft s ActiveX / DCOM. Object request broker (ORB)

Foundations of Business Intelligence: Databases and Information Management

Object Oriented Database Management System for Decision Support System.

Study Notes for DB Design and Management Exam 1 (Chapters 1-2-3) record A collection of related (logically connected) fields.

ObjectOrientedDatabaseManagementSystemsConceptsAdvantagesLimitationsandComparativeStudywithRelationalDatabaseManagementSystems

Database Management. Chapter Objectives

5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2

OBJECTS AND DATABASES. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 21

Applying Object Oriented Concepts to RDBMS

SECURITY MODELS FOR OBJECT-ORIENTED DATA BASES

1 File Processing Systems

Chapter 9: Object-Based Databases

Course MIS. Foundations of Business Intelligence


Chapter 6 FOUNDATIONS OF BUSINESS INTELLIGENCE: DATABASES AND INFORMATION MANAGEMENT Learning Objectives

Topics. Database Essential Concepts. What s s a Good Database System? Using Database Software. Using Database Software. Types of Database Programs

3. Relational Model and Relational Algebra

A COMPARATIVE STUDY BETWEEN THE PERFORMANCE OF RELATIONAL & OBJECT ORIENTED DATABASE IN DATA WAREHOUSING

Object Relational Database Mapping. Alex Boughton Spring 2011

1. INTRODUCTION TO RDBMS

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

THE BCS PROFESSIONAL EXAMINATIONS Professional Graduate Diploma. Advanced Database Management Systems

Object Database Management Systems (ODBMSs)

Foundations of Business Intelligence: Databases and Information Management

Databases and BigData

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Databases and Information Management

Lesson 8: Introduction to Databases E-R Data Modeling

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

Database programming made easier Master thesis of Roland Balk

The Relational Model. Why Study the Relational Model?

2. Background on Data Management. Aspects of Data Management and an Overview of Solutions used in Engineering Applications

12 File and Database Concepts 13 File and Database Concepts A many-to-many relationship means that one record in a particular record type can be relat

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

Foundations of Business Intelligence: Databases and Information Management

References. Introduction to Database Systems CSE 444. Motivation. Basic Features. Outline: Database in the Cloud. Outline

Introduction to Database Systems CSE 444

Basic Concepts of Database Systems

How To Design Software

Part VI. Object-relational Data Models

IT2305 Database Systems I (Compulsory)

The process of database development. Logical model: relational DBMS. Relation

Java Universal Binding: Storing Java Objects in Relational and Object-Oriented Databases

Author: Abhishek Taneja

Introduction to Computing. Lectured by: Dr. Pham Tran Vu

Relational Database Basics Review

BCA. Database Management System

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

Why & How: Business Data Modelling. It should be a requirement of the job that business analysts document process AND data requirements

Data Integration using Agent based Mediator-Wrapper Architecture. Tutorial Report For Agent Based Software Engineering (SENG 609.

Cache Database: Introduction to a New Generation Database

Overview of Database Management Systems

NoSQL systems: introduction and data models. Riccardo Torlone Università Roma Tre

Database Management Systems: Relational, Object-Relational, and Object-Oriented Data Models COT/4-02-V1.1

Chapter 1 Databases and Database Users

How To Improve Performance In A Database

Object-Oriented Databases Course Review

Foundations of Business Intelligence: Databases and Information Management

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 1 Outline

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

Schema Mappings and Data Exchange

Relational Division and SQL

CS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #5: En-ty/Rela-onal Models- - - Part 1

History of Database Systems

Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

Chapter 13. Introduction to SQL Programming Techniques. Database Programming: Techniques and Issues. SQL Programming. Database applications

Overview of Data Management

3. Database Design Functional Dependency Introduction Value in design Initial state Aims

Database Resources. Subject: Information Technology for Managers. Level: Formation 2. Author: Seamus Rispin, current examiner

Transcription:

Object Oriented Databases (OODBs) Relational and OO data models. Advantages and Disadvantages of OO as compared with relational databases. 1

A Database of Students and Modules Student Student Number {PK} 0..* takes 0..* Module Module Code {PK} 2

Relational Model Student Student Number {PK} Student Name Module Module Code {PK} Module Title 1..1 1..1 Takes 0..* Student Number {PK} Module Code {PK} 0..* 3

Relational Schema Student {Student Number, Student Name} Module {Module Code, Module Title} Takes {Student Number, Module Code } 4

Relational Model Each of these relations is implemented as a two dimensional table, whose columns are called attributes, and whose rows are called tuples or instances. Student Number Name 12486 Fred Jones 43292 Clare Adams 42403 Priscilla White 52212 J. Bigshott 77123 Clare Adams 5

Relational Model Module Code Title C66 Computing is Fun C80 Extremely Difficult Computing C89 Practical Business Computing.................. 6

Relational Model Takes Code Number C66 43292 C89 52212 C66 12486 C80 52212 C40 43292 C89 12486 C66 52212 C40 52212 C42 77123 C35 52212 C42 52212 C89 43292 7

Relational Model Queries can be written using relational algebra, relational calculus or SQL. Suppose mynumber is my student number. Then the query list the codes and titles of my modules might look like this in SQL: SELECT Module.code, Module.title FROM Takes, Module WHERE Takes.number = mynumber AND Module.code = Takes.code 8

Relational Model or like this: SELECT Module.code, Module.title FROM Modules WHERE Module.code IN SELECT Takes.code FROM Takes WHERE Takes.number = mynumber 9

Relational Model Terminology Entity instance: represents an object of interest. For example, a student record is an entity instance that represents an individual student. Entity class: a collection of entity instances with a common structure. For example, a whole collection of student records forms an entity class. Attribute: a piece of interesting information, about the instances of an entitity class. For example, name is a fact about students that is represented as an attribute of all the instances of the class Student. 10

In a relational data model, the identity of an entity instance is defined by the values of its attributes; no two entity instances can have the same attribute values. Relationship: an association between entities. Entities are often identified by nouns in a requirements specification, and relationships by verbs. For example, takes indicates a relationship between Student and Module. Relationships can be between entity classes, or between entity instances. Mathematically, a relation has a heading, which is a subset of the Cartesian product of a set of (attribute name, domain) pairs, and a body, which contains (attribute name, value) pairs.

For example, Student could be represented as a heading, (student number, integer), (student name, text) and a body containing values like (student number, 12486),(student name, Fred Jones) A relation is implemented as a table in a relational database.

Object Model Student Student Number {PK} Student Name set Student Name get Student Name take Module lookup Modules 0..* takes 0..* Module Module Code {PK} Module Title set Title get Title print Register 11

Classes and Instances in the Object Data Model An object oriented data model (OODM) is a logical data model that captures the meaning of objects of the kind used in object oriented programming. It defines object classes, like Student and Module, and object instances that have the attributes defined by the object class but with particular values for each instance. Instances of Student have instance variables studentnumber and studentname, with values like 12486 and Fred Jones respectively. 12

Object Identity The object instances in an OODM have an identity that is independent of the values of their attributes (contrast with the relational model). 13

Complex Objects, Implementing relationships The relationship, takes, could be represented as an instance variable of Student. This could be a set, bag, list or other container of references to instances of Module. The container would then be accessed using the message (method invocation) lookupmodules. Notice how an object oriented data model allows complex objects (contrast with the relational model). 14

Bidirectional relationships Instances of Module have state variables modulecode and moduletitle. Instances of Module could also implement taken by, the reverse of the relationship Takes, by means of a container of references to instances of student. ObjectStore, an OODBMS described in C&B, implements relationships like Takes by bidirectional links. The DBMS automatically maintains referential integrity between the two. 15

Queries in an Object Oriented Data Model Queries are responses to messages, and are implemented as method invocations. For example, if astudent is an instance of Student, then an invocation like astudent.lookupmodules() queries the modules taken by Student. Queries are intimately bound up with object classes; object instances have their own queries, which are defined by their class. (Contrast with SQL queries and the relational model). The object query language (OQL) uses an SQL-like syntax to access the database; updates are performed by the methods defined in the classes. 16

Encapsulation and Inheritance The object classes in the OODM allow for encapsulation. For example, the implementation of takes is hidden by Student and Module, and can only be accessed by invoking the relevant methods. The object classes in the OODM allow for inheritance. This means that attributes that are shared by different kinds of entity can be represented once, using superclasses or generalization. Subclasses, or specializations of a superclass can inherit these shared attributes. 17

For example, we could define a class Person, of which Student and e.g. staff member were specializations. This reduces redundancy in the database schema (contrast with the relational model... though table inheritance is supported by modern DBMSs).

Object Oriented Database An object oriented database (OODB) is a persistent and shareable collection of objects modelled by an OODM. An object oriented database management system (OODBMS) is a software system that provides the functionality that is normally required of a database management system, but whose underlying model is an OODM, rather than, for example, the relational data model. 18

Applications Object oriented database management systems were developed (largely) in response to engineering needs. Applications include computer aided design, and integrated software development environments (IDEs). Relational database systems were developed (largely) in response to commercial needs, 19

Requirements on Commercial Databases information can largely be described before the database is implemented infrequent schema update, controlled by DBA atomic, fixed-length data few entity types, with many instances large initial data load, with slow constant growth thereafter 20

single value for each data item; updates in situ short transactions can be used as a basis for concurrency control

Requirements on Engineering Databases continuous changes to the schema, made by different users large, complex, variable length data items many entity types, few instances, complex relationships small initial data load, rapid early growth, slowing after design need for configuration and version management 21

long transactions, periods of inconsistency, problems with concurrency control

Advantages of Object Oriented compared with Relational Databases Object model intuitively closer to real world Extensibility inheritance Complex values Removal of impedance mismatch More expressive query language 22

Tight coupling between data and applications allows schema to capture more of the meaning of applications Support for long transactions Better support for applications like software engineering or computer aided design (CAD) Arguably better performance, though benchmarks have mainly been applied in areas like engineering support to which OODBMS are better suited.

Disadvantages of Object Oriented compared with Relational Databases Lack of a theoretical foundation, so exact meaning of OODM is not well defined (though this is mitigated by the ODMG model) More difficult to get staff experienced with OODBMSs Lack of standards (mitigated by ODMG s OQL) Competition from relational and object-relational DBMS s 23

Encapsulation compromised to optimize queries (but in RDBMS s, normalization may be compromised to improve performance). OODBMS s usually control concurrency by locking; locking an inheritance hierarchy is difficult and may affect performance. OODM is inherently more complex than relational data model; OODBMS provides more complex functionality than RDBMS; complexity leads to higher implementation and maintenance costs. Lack of views; but are views necessary with an object model?

OODBMS s usually provide for coarse-grained access control; finer grained security mechanisms are needed for most commercial applications.

Trends Some OODBMS have emerged and seem likely to continue in use (e.g. ObjectStore) The Object Data Management Group have proposed a standard covering an obect data model, an object data definition language (ODL) an object query language (OQL) an an object manipulation language (OML) Currently, though the object relational data model seems to be more widely used 24

and for the future, it looks as though some form of e.g. Java persistence will become the norm for persistent object oriented data.