FEN 09-09-2007NOEA/IT - Databases/ODB1 ODB – Object DataBases Object-Oriented – Fundamental Concepts UML and EE/R OO and Relational Databases Introduction.

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

Jane Reid, BSc/IT DB, QMUL, 25/2/02 1 Object-oriented DBMS Background to ODBMS ODBMS requirements Object components ODB conceptual design –Graphical ODB.
Session 07: C# OOP 4 Review of: Inheritance and Polymorphism. Static and dynamic type of an object. Abstract Classes. Interfaces. FEN AK - IT:
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
OBJECTS Object Oriented ???????. OBJECTS Object-Oriented n OO convenient label for a collection of interconnected ideas n OO approach views computer.
Object Oriented System Development with VB .NET
Chapter 14 (Web): Object-Oriented Data Modeling
Object-Oriented Databases
Fundamentals, Design, and Implementation, 9/e Chapter 16 Object-Oriented Database Processing.
Chapter 4: Object-Oriented Data Modeling
Object Oriented Databases - Overview
July 13, 2015ADBS: OODB1 Concepts for Object-Oriented Databases Chapter 20.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
Chapter 14: Object-Oriented Data Modeling
Database Management COP4540, SCS, FIU An Introduction to database system.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
Object Relational Database Comparison by Neil Black, Steven Bruce & Marisa Di Filippo.
Chapter 14: Object-Oriented Data Modeling
Object-Relational DBMSs By Yao-Wen Tu CS157b12/09/2003 Prof. Sin-Min Lee.
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Programming Languages and Paradigms Object-Oriented Programming.
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
FEN  Conceptual modelling: The Entity-Relation (ER) Model Conceptual models Entity – Relation (ER) models.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
FEN Introduction to the database field:  Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
© 2005 course technology1 1 University Of Palestine UML for The IT Business Analyst A practical guide to Object Oriented Requirement Gathering Hoard Podeswa.
FEN  Concepts and terminology  Operations (relational algebra)  Integrity constraints The relational model.
Modern Database Techniques Part 1: Object Oriented Databases 3. Different Kinds of OODB.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
1 The Relational Model. 2 Why Study the Relational Model? v Most widely used model. – Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. v “Legacy.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
Domain Model Classes and Objects Association Structure Requirement Specification Domain Model.
Object-Oriented Data Modeling
1 CS457 Object-Oriented Databases Chapters as reference.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
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.
Session 02 and 03: C# OOP 1 OOP in C#: Classes and Objects in C#. Object-Oriented Design. UML Class Diagram. Object Interaction. FEN AK IT:
FEN NOEA/IT - Databases/ORDB1 Object-Relational Databases The Evolutionary Approach to Closing the Gap between Relational Tables and Object Models.
© D. Wong Security and User Authorization in SQL 8.7 pp. 410  Authorization ID = user name  Special authorization ID: PUBLIC  Privileges for:
OOP Review CS 124.
The ODMG Standard for Object Databases
FEN Mapping from Class Diagram (Domain Model) to Relational Model Table Design.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
CSCE 240 – Intro to Software Engineering Lecture 3.
Relational vs. Object Oriented Database Management System Syazwani Nur Dayana Nur Fatin Syafiqa M3cs2305B.
Completeness Criteria for Object- Relational Database Systems by Won Kim April 2002 Sang Ho Lee School of Computing, Soongsil University
Object-Oriented Database Management System (ODBMS)
Chapter 12 Outline Overview of Object Database Concepts
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.
ITEC 3220A Using and Designing Database Systems
Presentation transcript:

FEN NOEA/IT - Databases/ODB1 ODB – Object DataBases Object-Oriented – Fundamental Concepts UML and EE/R OO and Relational Databases Introduction to ODB Chap. 20

FEN NOEA/IT - Databases/ODB2 Object-Orientation Aims: To develop modifiable software which is robust in relation to: Changes in physical data representation (”the Y2K- problem”) Changes in functional requirements Means: –Modularity bases on logical data structure: data at some appropriate conceptual level is much more stable over time than functionality. –Data abstraction: data are described as classes – that is in term of the logical behaviour of their operations, and not by their internal representation

FEN NOEA/IT - Databases/ODB3 Means (cont…) –Inheritance and polymorphism: Classes may be defined as extensions/specialisations of existing classes (reuse) New features may be added in the subclass Inherited features may be redefined in the subclass Dynamic binding (run-time) determines which specialised version of a given feature is to be applied (which class does the object actually belongs to)

FEN NOEA/IT - Databases/ODB4 Example – Recall MiniBank The company MiniBank stores information about clients and accounts About a client name, address, cprno (unique) and status (A= special clients, B= standard clients or C= problem clients) are stored. About accounts accountno (unique), balance and interest rate are stored. An account is always associated with exactly one client, a client may be associated with none or more accounts.

FEN NOEA/IT - Databases/ODB5 MiniBank – the OO-way Minibank: Find classes: Problem specific classesClient Account Library classes:Address CPRClass AccNoClass List

FEN NOEA/IT - Databases/ODB6 MiniBank – the OO-way Library classes – designed, implemented and tested once and for all: (In #C/Java++ something) class CPRClass { private: > public: setCpr(-)//checking modulus 11 string getCprAsString(); int getAge(); ---- //and many more operations on CPR numbers } Similar for Address and AccNoClass. List is a generic Collection from the standard library of the programming language.

FEN NOEA/IT - Databases/ODB7 MiniBank – the OO-way Find structure: ClientAccount n As an alternative to the status attribute in Client, it may be specialised using inheritance

FEN NOEA/IT - Databases/ODB8 MiniBank – the OO-way Define problem specific classes : class Account{ private: float balance; float inRate; public: float getAvailable(){return balance;} void addInterestRate(){balance = balance + foo();} //other operations }

FEN NOEA/IT - Databases/ODB9 MiniBank – the OO-way class Client{ private: CPRClass cpr; //other attributtes list clientAccounts;//clients holds a //list of his accounts public: setClient(CPRClass clCpr,,,) {.. cpr.setCpr(clCpr);..} float getEngagement(){ float sum=0; for(int i=0;i<clientAccounts.len();i++) sum=sum+clientAccount[i].getAvailable(); return sum; } //other operations }

FEN NOEA/IT - Databases/ODB10 MiniBank – the OO-way Now MiniBank wants to offer a new type of account to its clients: A BudgetAccount which as an agreed limit This class may be defined as a specialisation of the existing Account using inheritance: –A new attribute lendingRate is added (the interest rate when the balance is negative) –Also an attribute limit is added (the limit that is agreed) –The operations addInterestRate redefined so interest rates are added according to the balance of the accaount –The operation getAvailable is redefined so balance+limit is returned Polymorphism allows objects of type BudgetAccount to be stored in the clientAccounts-list of a Client-object

FEN NOEA/IT - Databases/ODB11 MiniBank – the OO-way Client Account n Budget Account

FEN NOEA/IT - Databases/ODB12 MiniBank – the OO-way class BudgetAccount: Account{ private: float lendIR; float limi; public: float getAvailable(){return balance + limit;} void addInterestRate(){ balance= balance + fooNew();} //other operations } Note:No changes in Client!!!

FEN NOEA/IT - Databases/ODB13 MiniBank – the OO-way class Client{ private: CPRClass cpr; //other attributtes list clientAccounts;//clients holds a //list of his accounts public: setClient(CPRClass clCpr,,,) {.. cpr.setCpr(clCpr);..} float getEngagement(){ float sum=0; for(int i=0;i<clientAccounts.len();i++) sum=sum+clientAccount[i].getAvailable(); return sum; } //other operations } Due to polymorphism subtypes of Account may be stored here Dynamic binding assures that the right version of getAvailable() is called

FEN NOEA/IT - Databases/ODB14 UML: Unified Modelling Language Fig 3-15 ER model: Many similarities with UML Class Diagrams

FEN NOEA/IT - Databases/ODB15 Fig 3-16 UML Class Diagram: Many similarities with ER models

FEN NOEA/IT - Databases/ODB16 Specialisation in EER

FEN NOEA/IT - Databases/ODB17 Fig 4-10 Specialisation in UML

FEN NOEA/IT - Databases/ODB18 Comparing: OO and RDB - a conflict? OO: –data is described abstractly and represented as encapsulated objects –a model of arbitrary complex data structures are created – structure may be composite and repeating and may change dynamically –Changes in functional requirements are met by inheritance and polymorphism –OO-code is a good model of the domain RDB: –data is describes as simple atomic values in rows in tables –no encapsulation, data abstraction, inheritance or polymorphism –normalisation leads spreading related data over many different tables and hence a more poor model of the domain

FEN NOEA/IT - Databases/ODB19 Transformation is needed when using RDBMS

FEN NOEA/IT - Databases/ODB20 Or in a picture…

FEN NOEA/IT - Databases/ODB21 Two trends Object Databases (“pure ODBs”) –ObjectStore –O2 –FastObjects (Versant FastObjects.NET ) ORDB: Extensions to SQL and RDBMSs in order to support OO-concepts: –SQL3 (SQL-99) –Oracle8 (and higher) –Informix Universal Server (now IBM) –IBM DB2 Universal Database

FEN NOEA/IT - Databases/ODB22 Object-oriented DBMSs –Extensions or APIs (libraries) to OOPLs –Still immature –Mostly used in applications with relatively few instances of large complex objects (as CAD/CAM, case tools, IDEs etc.)

FEN NOEA/IT - Databases/ODB23 Object-oriented DBMSs OO systems are characterised by objects interacting in doing the job. This includes: –Object identity (every object has a unique identity) –Object state (attribute values) –Features (functions/methods that can be applied to the object – the class) –Structure Specialisation/Generalisation (inheritance). Aggregation (objects may be composed of other objects – have attributes that refer to other objects including collections of other objects) Association (objects refers to each other dynamically. OODBMSMust store all above.

FEN NOEA/IT - Databases/ODB24 OODB – object identity (OID) OO systems are based upon object references (conceptual pointers, memory locations) Object identity (OID): –OIDs are persistent pointers –OIDs are assigned to objects on creation –OIDs are immutable, that is are never changed and are not reused –OIDs are transparent to the user and managed by the DBMS –OIDs are not primary keys! Primary keys may be found in the domain and Primary keys may have semantics Primary keys are local to a table (class/relation) – OIDs are global to the system OIDs are simple, atomic values, primary keys may be composite

FEN NOEA/IT - Databases/ODB25 Object Structure Any object may be represented by a triple: –(i, c, v), where i is the OID of the object –c is the type constructor of the object –v is the state (or the current value) of the object

FEN NOEA/IT - Databases/ODB26 Type Constructors atom –simple value (primitive data type) tuple –, where each a is an attribute name and each i is an OID collection type –Some collection of OIDs –Collections may be: set list bag array

FEN NOEA/IT - Databases/ODB27 Example Fig 20-2

FEN NOEA/IT - Databases/ODB28 Features (operations)

FEN NOEA/IT - Databases/ODB29 Persistent Objects

FEN NOEA/IT - Databases/ODB30 Inheritance In OOPL: type perspective In ODB: inheritance are also to be viewed as an constraint on the extension of a class: –Any object belonging to the extension of subtype must also belong to the extension of the super type Multiple and selective inheritance Extension of class. What is that?