9.OODBMS

77
ΚΕΡΑΜΟΠΟΥΛΟΣ ΕΥΚΛΕΙΔΗΣ

description

Object Oriented DBMS

Transcript of 9.OODBMS

  • ODMG 3.0y ODLy OQL

    y y y SQL99

    . 2

  • , :y CAD/CAMy y y y y

    . 4

  • y y y

    . 5

  • y y

    ODMG 3.0

    . 6

  • .

    y -y -

    . 7

  • (state) (behaviour) ( )

    . 9

  • y y (persistent objects) y (persistent objects)

    y y

    . 10

  • y y y ,

    y

    (object identifier) (object identifier)y

    . 11

  • y

    .

    y

    . 12

  • y

    () (), .

    y

    y ,

    . 13

  • (signature) (interface) ( g ) ( )y , , (method) (body) (method) (body)y

    . 14

  • 1. y

    2.

    . 15

  • .

    . 16

  • . y :

    . 17

  • ODMG 3.0 .y

    .

    . 18

  • .

    y y ,

    : . , (late binding) (late binding)

    . 19

  • .

    .

    . .

    . 21

  • . (immutable).

    .

    . .

    . 22

  • .

    .

    .

    .

    . 23

  • .

    .

    .

    .

    . 24

  • .

    :( )(, , ): : : ()

    . 25

  • y atom: y tuple: y set: set: y list: y bag: y bag: y array:

    . 26

  • :

    1 1. atom

    2 2. . tuple

    3. 3. Set List Bag Array

    . 27

  • :y y y y y y

    . 28

  • t l ( )tuple(1: 1, 2: 2, , : )

    , i i

    (, , )

    .

    . 29

  • set(i1, i2, , i)

    ii

    . 30

  • list(i1, i2, , i)

    ii () ()

    . 31

  • array(i1, i2, , i)

    .

    . 32

  • bag(i1, i2, , i)bag(i1, i2, , i)

    .

    . 33

  • ( )( , , )

    1 = (1, atom, )1 ( 1 )2 = (2, atom, )3 = (3, atom, 19) = ( atom )4 = (4, atom, )5 = (5, atom, )6 = (6, atom, )7 = (7, tuple, < T_ONOMA: 6, T_: 5, T_: 4>)8 = (8, tuple, )

    . 34

  • 88:t l

    8tuple

    8

    _ _ _ _

    7:1: 2: 3:1 2 3 7

    19

    7:tuple

    1:atom

    2:atom

    3:atom

    1 2 2 7

    19

    _ _ _

    3 4 53:atom

    4:atom

    5:atom

    . 35

    543

  • ( )( , , )

    1 = (1, atom, )1 ( 1 )2 = (2, atom, 2310890890)3 = (3, atom, ) = ( atom 2371076567)4 = (4, atom, 2371076567)5 = (5, atom, )6 = (6, atom, 2106564321)7 = (7, tuple, < T_ONOMA: 1, T_: 2 >)8 = (8, tuple, < T_ONOMA: 3, T_: 4 >) = ( tuple < T ONOMA: T : >)9 = (9, tuple, < T_ONOMA: 5, T_: 6 >)10 = (10, set, )11 = (11, bag, )

    . 36

  • , , , , , , , , , , , ,

    . 37

  • d fi t D t tdefine type Department tuple ( D_Name: string,

    D Fac lt stringD_Faculty : string,D_University : string)

    define type Student tuple ( S Name: stringtuple ( S_Name: string,

    S_Surname: string,S Age: integerS_Age: integer,S_Dept: Department) ()

    . 38

  • . 39

  • d fi t define type tuple ( : string,

    char_: char,: string, : string_: string,_: ,: char

    : char,: float,: : ,: )

    . 40

  • define type tuple ( : integer,p ( g ,

    : integer, i t ): integer)

    . 41

  • define type tuple (_: string,

    _: integer,: tuple(: ,

    _: ),: set(string),: set(),: set());

    . 42

  • .

    .

    y y y y

    . 43

  • .

    .

    , : , , : , ,

    .

    . 44

  • : . .

    .

    . 45

  • define class define class type tuple ( : string;

    _: char;: string;: string;_: string;_: date; h: char;

    : float;: ; ): );

    operationsage: integer;

    t create_emp: ;destroy_emp: boolean;

    end

    . 46

  • define class define class type tuple ( _: string;

    _: integer;: tuple(: ,

    _: date);: set(string);: set(string);: set();: set());

    operationsoperationsno_of_emps: integer;create_dept: ;destroy_dept: boolean;assign_emp(e: ):boolean;

    end end

    . 47

  • . . :d.no_of_empsd._

    . 48

  • (transient objects) .

    (persistent objects) (persistent objects) .

    .

    . 49

  • .

    . 50

  • define class _type set()operation add_dept(d:): boolean;

    persistent name __:___ . set . __ .

    . 51

  • d := create_dept; b := __.add_dept(d); d d __

    . 52

  • . .

    . 53

  • 88:t l

    8tuple

    8

    _ _ _ _

    7:1: 2: 3:1 2 3 7

    19

    7:tuple

    1:atom

    2:atom

    3:atom

    1 2 2 7

    19

    _ _ _

    3 4 53:atom

    4:atom

    5:atom

    . 54

    543

  • RDBMS ORDBMS

    ORDBMS .

    OODBMS .

    . 55

  • ( ) .

    . 56

  • () , .

    .

    . 57

  • _: , , _

    : subtype-of :: subtype-of _: ,

    : subtype-of _: 1, 2,

    : subtype-of _:

    . 58

  • . 59

  • .

    , .

    .

    . 60

  • , (.. OBJECT ODMG 3.0)

    OBJECT

    . 61

  • OBJECT

    . 62

  • .

    . 63

  • .

    .

    . 64

  • . 65

  • 1. / / / / .

    2 2. .

    3. 3 / / .

    . 66

  • / .

    . 67

  • :1.

    2.

    , .

    . 68

  • .

    , .

    . 69

  • BLOB (Binary Large OBject) , : :y (Bitmap images) y .

    . .

    . 70

  • , .

    . 71

  • define class define class type tuple ( _: string;

    _: integer;: tuple(: ,

    _: date);: set(string);: set(string);: set();: set());

    operationsoperations

    end

    6 . . .

    . 72

  • define class type tuple ( _: string;

    _: integer;

    : tuple(: , : date);_: date);

    : set(string);: set();: set());: set());

    operations

    end end

    4 . , , .

    . 73

  • d fi l define class type tuple ( _: string;

    _: integer;

    t l ( : tuple(: ,_: date);

    : set(string);: set();: set());

    operations

    end

    1 . (_) (). ( _ ) ( )

    . 74

  • ( / ) (/) .

    :y _, _,

    (is part of) -- (is-part-of) -- (is-component-of)

    .

    . 75

  • ( / ) (/) ( ) .

    :y , ,

    (is associated ith) - (is-associated-with)

    .

    .

    . 76