ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.

Slides:



Advertisements
Similar presentations
Conceptual Design using the Entity-Relationship Model
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.
Relational Database Design Via ER Modelling
Chapter 3 : Relational Model
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Database Systems: Design, Implementation, and Management Tenth Edition
Object Databases Baochuan Lu. outline Concepts for Object Databases Object Database Standards, Languages, and Design Object-Relational and Extended-Relational.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
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 9 Relational Database Design by ER- and EER-to- Relational Mapping.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Databases Illuminated Chapter 7 The Object-Oriented Model.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
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.
Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity-Relationship Model
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
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.
Chapter 21 B Mapping to ODL Copyright © 2004 Pearson Education, Inc.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide Introduction Object Oriented (OO) Data Models since mid-90’s Reasons for creation of.
11-1 CHAPTER 11 Concepts for Object-Oriented Databases.
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.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Data Modeling Using the Entity- Relationship (ER) Model
COP Introduction to Database Structures
Concepts for Object Databases
CSE202 Database Management Systems
Databases (CS507) CHAPTER 7.
Logical Database Design and the Rational Model
Data Modeling Using the Entity- Relationship (ER) Model
Database Management Systems
Entity- Relationship (ER) Model
Relational Database Design by ER- and EER-to- Relational Mapping
Enhanced Entity-Relationship (EER) Modeling
Object-Oriented Database Management System (ODBMS)
Object – Oriented Databases
Relational Database Design by ER- and EER-to-Relational Mapping
ER- and EER-to-Relational
Appendix D: Network Model
Chapter 12 Outline Overview of Object Database Concepts
 DATAABSTRACTION  INSTANCES& SCHEMAS  DATA MODELS.
Seminar 9: OODB Design (Self Study)
Chapter 10 Thinking in Objects
Lec 3: Object-Oriented Data Modeling
Entity Relationship Diagrams
Chapter 4 Entity Relationship (ER) Modeling
Chapter 8: Mapping a Conceptual Design into a Logical Design
Chapter 20 Object-Oriented Analysis and Design
Relational Database Design by ER- and EER-to-Relational Mapping
The Entity-Relationship Model
Review of Week 1 Database DBMS File systems vs. database systems
Relational Database Design by ER- and EER-to-Relational Mapping
ITEC 3220A Using and Designing Database Systems
Chapter 3: Modeling Data in the Organization
Relational Database Design by ER- and EER-to- Relational Mapping
CHAPTER 2 - Database Requirements and ER Modeling
Chapter 4 Entity Relationship (ER) Modeling
Appendix D: Network Model
4/27/2019.
Presentation transcript:

ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi

10.1 Overview of Object-Oriented Concepts(1) Main Claim: OO databases try to maintain a direct correspondence between real-world and database objects so that objects do not lose their integrity and identity and can easily be identified and operated upon Object: Two components: state (value) and behavior (operations) Similar to program variable in programming language, except that it will typically have a complex data structure as well as specific operations defined by the programmer

Overview of Object-Oriented Concepts (2) In OO databases, objects may have an object structure of arbitrary complexity in order to contain all of the necessary information that describes the object. In contrast, in traditional database systems, information about a complex object is often scattered over many relations or records, leading to loss of direct correspondence between a real-world object and its database representation.

Overview of Object-Oriented Concepts (3) The internal structure of an object in OOPLs includes the specification of instance variables, which hold the values that define the internal state of the object. An instance variable is similar to the concept of an attribute, except that instance variables may be encapsulated within the object and thus are not necessarily visible to external users

10.1.2 Object Identity, Object Structure, and Type Constructors (1) Unique Identity: An OO database system provides a unique identity to each independent object stored in the database. This unique identity is typically implemented via a unique, system-generated object identifier, or OID The main property required of an OID is that it be immutable Specifically, the OID value of a particular object should not change. This preserves the identity of the real-world object being represented.

Object Identity, Object Structure, and Type Constructors (2) In OO databases, the state (current value) of a complex object may be constructed from other objects (or other values) by using certain type constructors. The three most basic constructors are atom, tuple, and set. Other commonly used constructors include list, bag, and array. The atom constructor is used to represent all basic atomic values, such as integers, real numbers, character strings, Booleans, and any other basic data types that the system supports directly.

Object Identity, Object Structure, and Type Constructors (3) Example 1 One possible relational database state corresponding to COMPANY schema

Object Identity, Object Structure, and Type Constructors (4) Example 1 (contd.):

Object Identity, Object Structure, and Type Constructors (5) Example 1 (contd.)

Object Identity, Object Structure, and Type Constructors (6) Example 1 (contd.) We use i1, i2, i3, . . . to stand for unique system-generated object identifiers. Consider the following objects: o1 = (i1, atom, ‘Houston’) o2 = (i2, atom, ‘Bellaire’) o3 = (i3, atom, ‘Sugarland’) o4 = (i4, atom, 5) o5 = (i5, atom, ‘Research’) o6 = (i6, atom, ‘1988-05-22’) o7 = (i7, set, {i1, i2, i3})

Object Identity, Object Structure, and Type Constructors (7) Example 1(contd.) o8 = (i8, tuple, <dname:i5, dnumber:i4, mgr:i9, locations:i7, employees:i10, projects:i11>) o9 = (i9, tuple, <manager:i12, manager_start_date:i6>) o10 = (i10, set, {i12, i13, i14}) o11 = (i11, set {i15, i16, i17}) o12 = (i12, tuple, <fname:i18, minit:i19, lname:i20, ssn:i21, . . ., salary:i26, supervi­sor:i27, dept:i8>) . . .

Object Identity, Object Structure, and Type Constructors (8) Example 1 (contd.) The first six objects listed in this example represent atomic values. Object seven is a set-valued object that represents the set of locations for department 5; the set refers to the atomic objects with values {‘Houston’, ‘Bellaire’, ‘Sugarland’}. Object 8 is a tuple-valued object that represents department 5 itself, and has the attributes DNAME, DNUMBER, MGR, LOCATIONS, and so on.

Object Identity, Object Structure, and Type Constructors (9) Example 2: This example illustrates the difference between the two definitions for comparing object states for equality. o1 = (i1, tuple, <a1:i4, a2:i6>) o2 = (i2, tuple, <a1:i5, a2:i6>) o3 = (i3, tuple, <a1:i4, a2:i6>) o4 = (i4, atom, 10) o5 = (i5, atom, 10) o6 = (i6, atom, 20)

Object Identity, Object Structure, and Type Constructors (10) Example 2 (contd.): In this example, The objects o1 and o2 have equal states, since their states at the atomic level are the same but the values are reached through distinct objects o4 and o5. However, the states of objects o1 and o3 are identical, even though the objects themselves are not because they have distinct OIDs. Similarly, although the states of o4 and o5 are identical, the actual objects o4 and o5 are equal but not identical, because they have distinct OIDs.

Object Identity, Object Structure, and Type Constructors (11)

Object Identity, Object Structure, and Type Constructors (12)

10.1.4 Encapsulation of Operations, Methods, and Persistence (1) One of the main characteristics of OO languages and systems Related to the concepts of abstract data types and information hiding in programming languages

10.1.6 Other Objected-Oriented Concepts (1) Polymorphism (Operator Overloading): This concept allows the same operator name or symbol to be bound to two or more different implementations of the operator, depending on the type of objects to which the operator is applied For example + can be: Addition in integers Concatenation in strings (of characters)

Object Database Conceptual Design Object Database (ODB) vs. Relational Database (RDB) Relationships are handled differently Inheritance is handled differently Operations in ODB are expressed early on since they are a part of the class specification

Relationships: ODB vs. RDB (1) Relationships in ODB: relationships are handled by reference attributes that include OIDs of related objects single and collection of references are allowed references for binary relationships can be expressed in single direction or both directions via inverse operator

Relationships: ODB vs.. RDB (2) Relationships in RDB: Relationships among tuples are specified by attributes with matching values (via foreign keys) Foreign keys are single-valued M:N relationships must be presented via a separate relation (table)

Inheritance Relationship in ODB vs. RDB Inheritance structures are built in ODB (and achieved via “:” and extends operators) RDB has no built-in support for inheritance relationships; there are several options for mapping inheritance relationships in an RDB (see Chapter 7)

Early Specification of Operations Another major difference between ODB and RDB is the specification of operations ODB: Operations specified during design (as part of class specification) RDB: Operations specification may be delayed until implementation

Mapping EER Schemas to ODB Schemas Mapping EER schemas into ODB schemas is relatively simple especially since ODB schemas provide support for inheritance relationships Once mapping has been completed, operations must be added to ODB schemas since EER schemas do not include an specification of operations

Mapping EER to ODB Schemas Step 1 Create an ODL (Object Definition Language) class for each EER entity type or subclass Multi-valued attributes are declared by sets, bags or lists constructors Composite attributes are mapped into tuple constructors

Mapping EER to ODB Schemas Step 2 Add relationship properties or reference attributes for each binary relationship into the ODL classes participating in the relationship Relationship cardinality: single-valued for 1:1 and N:1 directions; set-valued for 1:N and M:N directions Relationship attributes: create via tuple constructors

Mapping EER to ODB Schemas Step 3 Add appropriate operations for each class Operations are not available from the EER schemas; original requirements must be reviewed Corresponding constructor and destructor operations must also be added

Mapping EER to ODB Schemas Step 4 Specify inheritance relationships via extends clause An ODL class that corresponds to a sub-class in the EER schema inherits the types and methods of its super-class in the ODL schemas Other attributes of a sub-class are added by following Steps 1-3

Mapping EER to ODB Schemas Step 5 Map weak entity types in the same way as regular entities Weak entities that do not participate in any relationships may alternatively be presented as composite multi-valued attribute of the owner entity type

Mapping EER to ODB Schemas Step 7 Map n-ary relationships whose degree is greater than 2 Each relationship is mapped into a separate class with appropriate reference to each participating class