1 object-relational model object-oriented database system

31
1 Object-Relational Model Object-Oriented database system

Upload: derrick-richards

Post on 12-Jan-2016

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Object-Relational Model Object-Oriented database system

1

Object-Relational ModelObject-Relational Model

• Object-Oriented database system• Object-Oriented database system

Page 2: 1 Object-Relational Model Object-Oriented database system

2

Object-Relational ModelObject-Relational Model

• Object-Oriented database system

A programming language with a type system that allows any data to be persistent and supports XIII Commandments

• Object-Oriented database system

A programming language with a type system that allows any data to be persistent and supports XIII Commandments

Page 3: 1 Object-Relational Model Object-Oriented database system

3

Object-Relational ModelObject-Relational Model

• Object-Relational database system• Object-Relational database system

Page 4: 1 Object-Relational Model Object-Oriented database system

4

Object-Relational ModelObject-Relational Model

• Object-Relational database system

A relational database system with:

• Object-Relational database system

A relational database system with:

Page 5: 1 Object-Relational Model Object-Oriented database system

5

Object-Relational ModelObject-Relational Model

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

Page 6: 1 Object-Relational Model Object-Oriented database system

6

Object-Relational ModelObject-Relational Model

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

Page 7: 1 Object-Relational Model Object-Oriented database system

7

Object-Relational ModelObject-Relational Model

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

– object identity

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

– object identity

Page 8: 1 Object-Relational Model Object-Oriented database system

8

Object-Relational ModelObject-Relational Model

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

– object identity

– reference types

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

– object identity

– reference types

Page 9: 1 Object-Relational Model Object-Oriented database system

9

Object-Relational ModelObject-Relational Model

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

– object identity

– reference types

– inheritance

• Object-Relational database system

A relational database system with:

– user defined Abstract Data Types (ADT)

– type constructors

– object identity

– reference types

– inheritance

Page 10: 1 Object-Relational Model Object-Oriented database system

10

Object-Relational ModelObject-Relational Model

• Abstract Data Type (ADT) (B. Liskov, S. Ziles, 1976)

• Abstract Data Type (ADT) (B. Liskov, S. Ziles, 1976)

Page 11: 1 Object-Relational Model Object-Oriented database system

11

Object-Relational ModelObject-Relational Model

• Abstract Data Type (ADT) (B. Liskov, S. Ziles, 1976)

Combination of atomic data types and their associated methods

• Abstract Data Type (ADT) (B. Liskov, S. Ziles, 1976)

Combination of atomic data types and their associated methods

Page 12: 1 Object-Relational Model Object-Oriented database system

12

Object-Relational ModelObject-Relational Model

• Type constructor• Type constructor

Page 13: 1 Object-Relational Model Object-Oriented database system

13

Object-Relational ModelObject-Relational Model

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

Page 14: 1 Object-Relational Model Object-Oriented database system

14

Object-Relational ModelObject-Relational Model

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

Page 15: 1 Object-Relational Model Object-Oriented database system

15

Object-Relational ModelObject-Relational Model

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type )

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type )

Page 16: 1 Object-Relational Model Object-Oriented database system

16

Object-Relational ModelObject-Relational Model

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type ) array-of( base type )

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type ) array-of( base type )

Page 17: 1 Object-Relational Model Object-Oriented database system

17

Object-Relational ModelObject-Relational Model

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type ) array-of( base type ) set-of( base type)

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type ) array-of( base type ) set-of( base type)

Page 18: 1 Object-Relational Model Object-Oriented database system

18

Object-Relational ModelObject-Relational Model

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type ) array-of( base type ) set-of( base type) bag-of( base-type )

• Type constructor

A mapping of atomic data types and user-defined abstract data types into complex abstract data types

row( n1 : t1, n2 : t2, …, nk : tk ) where ni is a field name and ti is a type

list-of( base type ) array-of( base type ) set-of( base type) bag-of( base-type )

Page 19: 1 Object-Relational Model Object-Oriented database system

19

Object-Relational ModelObject-Relational Model

• Operations for constructed types• Operations for constructed types

Page 20: 1 Object-Relational Model Object-Oriented database system

20

Object-Relational ModelObject-Relational Model

• Operations for constructed types

Field extraction (dot operation)

• Operations for constructed types

Field extraction (dot operation)

Page 21: 1 Object-Relational Model Object-Oriented database system

21

Object-Relational ModelObject-Relational Model

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

Page 22: 1 Object-Relational Model Object-Oriented database system

22

Object-Relational ModelObject-Relational Model

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

List operations

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

List operations

Page 23: 1 Object-Relational Model Object-Oriented database system

23

Object-Relational ModelObject-Relational Model

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

List operations

Index reference

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

List operations

Index reference

Page 24: 1 Object-Relational Model Object-Oriented database system

24

Object-Relational ModelObject-Relational Model

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

List operations

Index reference

Other

• Operations for constructed types

Field extraction (dot operation)

Set and multiset operations

List operations

Index reference

Other

Page 25: 1 Object-Relational Model Object-Oriented database system

25

Object-Relational ModelObject-Relational Model

• Objects, object identifiers, reference types• Objects, object identifiers, reference types

Page 26: 1 Object-Relational Model Object-Oriented database system

26

Object-Relational ModelObject-Relational Model

• Objects, object identifiers, reference types

In object-relational model every tuple (row) can be considered as object

• Objects, object identifiers, reference types

In object-relational model every tuple (row) can be considered as object

Page 27: 1 Object-Relational Model Object-Oriented database system

27

Object-Relational ModelObject-Relational Model

• Objects, object identifiers, reference types

In object-relational model every tuple (row) can be considered as object

Every tuple (row) can be given object identifier

• Objects, object identifiers, reference types

In object-relational model every tuple (row) can be considered as object

Every tuple (row) can be given object identifier

Page 28: 1 Object-Relational Model Object-Oriented database system

28

Object-Relational ModelObject-Relational Model

• Objects, object identifiers, reference types

In object-relational model every tuple (row) can be considered as object

Every tuple (row) can be given object identifier

Object identifier can be used to refer to it from elsewhere in data

ref(base type)

• Objects, object identifiers, reference types

In object-relational model every tuple (row) can be considered as object

Every tuple (row) can be given object identifier

Object identifier can be used to refer to it from elsewhere in data

ref(base type)

Page 29: 1 Object-Relational Model Object-Oriented database system

29

Object-Relational ModelObject-Relational Model

• Inheritance• Inheritance

Page 30: 1 Object-Relational Model Object-Oriented database system

30

Object-Relational ModelObject-Relational Model

• Inheritance

Inheritance allows to reuse and refine already defined types

• Inheritance

Inheritance allows to reuse and refine already defined types

Page 31: 1 Object-Relational Model Object-Oriented database system

31

Object-Relational ModelObject-Relational Model

• Inheritance

Inheritance allows to reuse and refine already defined types

Substitution principle:

Given a supertype A and a subtype B, it is always possible to substitute an object of type B into a legal expression written for objects of type B, without producing errors

• Inheritance

Inheritance allows to reuse and refine already defined types

Substitution principle:

Given a supertype A and a subtype B, it is always possible to substitute an object of type B into a legal expression written for objects of type B, without producing errors