Object Databases: Logical Data Modeling

Slides:



Advertisements
Similar presentations
OO databases 1 Object Oriented databases. OO databases 2 Developing OODBMS - motivation motivation more and more application areas require systems that.
Advertisements

Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Object Databases Baochuan Lu. outline Concepts for Object Databases Object Database Standards, Languages, and Design Object-Relational and Extended-Relational.
ODMG Standard: Object Model1 OBJECT-ORIENTED DATABASE SYSTEMS ODMG Standard: Object Model Susan D. Urban and Suzanne W. Dietrich Department of Computer.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
1 Relational Model. 2 Relational Database: Definitions  Relational database: a set of relations  Relation: made up of 2 parts: – Instance : a table,
Object-Oriented Databases
Object Oriented Databases - Overview
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
The Relational Model These slides are based on the slides of your text book.
Agenda  TMA03  M877 Block 3 Databases with Objects.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
Relational Data Model, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 The Relational Model Chapter 3.
The Relational Model. Review Why use a DBMS? OS provides RAM and disk.
1 The Relational Model Chapter 3. 2 Why Study the Relational Model?  Most widely used model  Vendors: IBM, Informix, Microsoft, Oracle, Sybase  Recent.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
1 Object Databases: Introduction. 2 Why OO? v Relational Systems are limited: –Structural restrictions on data –Missing semantics (value-based relationships)
1 The Relational Model. 2 Why Study the Relational Model? v Most widely used model. – Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. v “Legacy.
FALL 2004CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
1.1 CAS CS 460/660 Relational Model. 1.2 Review E/R Model: Entities, relationships, attributes Cardinalities: 1:1, 1:n, m:1, m:n Keys: superkeys, candidate.
Relational Data Model Ch. 7.1 – 7.3 John Ortiz Lecture 3Relational Data Model2 Why Study Relational Model?  Most widely used model.  Vendors: IBM,
1 CS457 Object-Oriented Databases Chapters as reference.
Scaling Heterogeneous Databases and Design of DISCO Anthony Tomasic Louiqa Raschid Patrick Valduriez Presented by: Nazia Khatir Texas A&M University.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
OODBMS: Introduction and Logical Database Design
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
CMPT 258 Database Systems The Relationship Model PartII (Chapter 3)
11-1 CHAPTER 11 Concepts for Object-Oriented Databases.
Session 1 Module 1: Introduction to Data Integrity
The ODMG Standard for Object Databases
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Relational Model Chapter 3.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
CENG 351 File Structures and Data Management1 Relational Model Chapter 3.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Logical Database Design and the Rational Model
IST 220 – Intro to Databases
Chapter 5 Database Design
Chapter 6 - Database Implementation and Use
OBJECTS & DATABASES Arnaud Sahuguet – CIS-550.
Foreign Keys Local and Global Constraints Triggers
Object-Oriented Database Management System (ODBMS)
Object-Relational DBMSs
Physical Database Design for Relational Databases Step 3 – Step 8
Chapter 12 Outline Overview of Object Database Concepts
Translation of ER-diagram into Relational Schema
Introduction lecture1.
From ER to Relational Model
The Relational Model Relational Data Model
Lec 3: Object-Oriented Data Modeling
ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.
Primary key Introduction Introduction: A primary key, also called a primary keyword, is a key in a relational database that is unique for each record.
The Relational Model The slides for this text are organized into chapters. This lecture covers Chapter 3. Chapter 1: Introduction to Database Systems Chapter.
ITEC 3220A Using and Designing Database Systems
Appendix D: Network Model
Database Design: Relational Model
C++ Object Oriented 1.
Presentation transcript:

Object Databases: Logical Data Modeling

Object Databases: Review Object Identity Behavioral modeling via methods Subclasses and inheritance Rich type system Encapsulation and information hiding

Object Databases: Advantages Better suited for many “new” applications Non-tabular data Large or variable-sized objects More realistic data structuring Explicit relationships Easier embedding in a host language (e.g. C++) Ease of design and querying (sometimes) “Support” for ordered data

Object Databases: Disadvantages Not as established as relational technology May be overkill for some systems Schema design not well understood Query processing still being researched

Logical Object Database Design We will focus on O2, an OODBMS OO features generally subsume OR features O2 is representative and mostly ODMG-compliant Other OO/OR systems make other choices Can do first-level logical design directly: Use ODL or other OO modeling languages Can skip E/R entirely One less level of translation (applause, please…) No standards or theory for logical design (boo…)

Logical DB Design in O2 Class concept captures Object structure (type) Object behavior (methods) Inheritance (single and multiple) Type extents Many ICs Actual data created using named DB objects like persistent global variables within a DB “points of entry” into DB for browser, OQL Application programs model other aspects

Classes: Attributes Standard scalar types integer, char, etc. set (really a multiset; allows duplicates) unique set (a “real” set) list (indexable) object tuple Object vs. tuple: different semantics, storage “types” not always tuples !!!

Classes: Methods Model object behavior Only way to access data of private types Used to update an object Can also use browser directly if class is public The init method: Like a C++ constructor Invoked whenever a new object is created Very handy for maintaining extents Not inherited

Classes: Inheritance Type (structure) and methods (behavior) are both inherited by subclasses Exception: “init” method not inherited Semantics: substitutability Example: a Student can appear wherever a Person is allowed to appear (students are people too!) Collection types can participate in inheritance Multiple Inheritance: Two or more direct superclasses (e.g. WorkStudy) Must resolve naming conflicts (none in this case)

Classes: Inheritance (cont.) Can override method, attribute definitions in a subclass Type of redefined attribute must be subtype of inherited attribute’s type All types in a redefined method signature must be subtypes of corresponding types in inherited method Problem: Which fire_emp method is invoked on a nextDept? Unknown until run-time: late binding for (nextDept in Departments) nextDept->fire_emp;

Classes: Extents An extent is a (unique, persistent) set containing (the OIDs of) every object of the class and its subclasses Optional for every class Similar to relations Built in to ODL In some actual systems, must create and maintain “manually” Keys can be specified for a class iff it has an extent

Classes: Referential Integrity OIDs can refer to an object anywhere in DB Objects can be referenced from anywhere in DB Insertion or deletion of a reference can never violate referential integrity Assume automatically maintained extents Deletion of a referenced object, default: Same as SQL-92: disallow deletion from extent Methods can enforce other delete semantics Cascading delete, set NULL, or set default

Named DB Objects These are the roots of persistence They are the only way to access data Can use browser to examine all our data: Start at a named DB object and follow OIDs Can do some limited updates via browser also Can’t do “real” queries in browser Can’t “link” two existing objects in browser OQL queries (next class) must use named DB objects to retrieve any data

Object Deletion Object physically removed when all sources of its persistence are removed Thus deleting a named DB object doesn’t physically remove object unless nothing else in DB references that object One solution: reference counts Remove object when reference count = 0 Performance problems Must ensure that copying a ref. incrs. ref. count Used in early versions of O2 Can use periodic garbage collection instead

Object Deletion (cont.) An alternative (not available in O2): Allow explicit object deletion at any time Replace the physical object with a tombstone Tombstone is a special marker (similar to a NULL) When some object follows an OID to the deleted object, it encounters the tombstone The reference that was just followed can be set to NULL or some default value or other action taken This approach can make implementation of SET NULL semantics, etc. much easier!!! Avoids the dangling references problem

Application Programs Associated with an O2 schema Used for non-object-specific tasks Frequently-performed tasks that can’t or shouldn’t be coded as methods Tasks that involve changing or examining more than one object Examples: Prompt for a department name and display it Display all departments Move an employee from one dept. to another

Physical Design: Indexing Can index named list, set, unique set objects Search key must be: An atomic value (e.g. integer) An OID A collection (list, set, unique set) of the above Elements of an index path must all be tuples, not OIDs (except possibly the last element) Sample indices: Companies: name, address.Country, address.city.name Departments: emps

Physical Design: Clustering When an object becomes persistent, by default it is clustered near its parent DBA can specify clusters based on cluster trees: subsets of the schema composition graph can be sorted defined on classes or collection objects deep cluster trees can impede performance Examples: cluster Person /* all Person objects clustered */ cluster Department on (chair) /* Departments stored with chairs; emps, majors stored elsewhere */

Summary Classes reflect behavior and complex structure Inheritance provides new semantics Methods and OIDs help enforce integrity Named DB objects are “entry points” into DB Method, application language has same type system as DBMS !!! Physical design options are numerous Much of this also applies, in a modified way, to Object-Relational DBMSs!!!

State of the Art (logical ODB modeling) Indexing techniques Temporal OODB modeling Deductive OODB modeling Active OODB modeling More sophisticated ordered type support (e.g. trees, graphs) Heterogeneous database integration Garbage collection techniques Storage and clustering techniques