You are on page 1of 77

ODMG 3.

y ODL
y OQL


y SQL99
.


, :

y
y
y
y
y

CAD/CAM

y
y

y
y

ODMG 3.0
.


y
y

-
-

(state)


((behaviour))


y
y

(persistent objects)

10

y
y
y

y
y


(object identifier)

11

12


()
(),
.

13



((signature)
g
)
((interface))
y

, ,

(method) (body)

14

1.
y

2.

15

16

17

ODMG 3.0

.

18



:


.
,
(late binding)
y

19



.

.


.

21


.
(immutable).

.

.

.

22


.

.

23


.
.

.


.

24

:
(, ,
(
)
:

:

: ()
.

25

y
y
y
y
y
y

atom:
tuple:
set:
list:
bag:
array:

26

1
1.

atom

2
2.

tuple

3.

Set
List
Bag
Array

27

y
y
y
y
y

28

t l ( 1:
tuple(

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)

.

33

(
(
,

,

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

34

8:
t l
tuple


_
1:
atom

2:
atom

3:
atom

7:
tuple

19

_
3:
atom

_
4:
atom

_
5:
atom

35

(
(
,

,
)
)
1 = ((1, atom, )
)
2 = (2, atom, 2310890890)
3 = (3, atom, )
4 = (4, atom,
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 >)
9 = (9, tuple,
tuple < T_ONOMA:
T ONOMA: 5, T_:
T : 6 >)
10 = (10, set, <7, 8, 9>)
11 = (11, bag, <7, 8, 9, 8>)

36

,, ,, ,,

37

define
d
fi ttype D
Department
t
t
tuple ( D_Name: string,
D Fac lt : string,
D_Faculty
string
D_University : string)
define type Student
tuple ( S_Name:
S Name: string,
string
S_Surname: string,
S Age: integer,
S_Age:
integer
S_Dept: Department)
.

()
38

39

define
d
fi type
t

tuple (
: string,

_:
char,
char
: string,
: string,
_:
string
_: ,
: char,
char
: float,
: ,

: )

40

define type
tuple
p (
:
integer,
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
type tuple (
:
_:
:
_:
_:
:

:
:
:

operations
age:
create_emp:
t
destroy_emp:
end

string;
char;
string;
string;
date;
char;
h
float;
;
)
);
integer;

boolean;

46

define class
type tuple ( _:
_:
:
:
:
:

string;
integer;
tuple(: ,
_: date);
set(string);
set();
set());

operations
no_of_emps: integer;
create_dept: ;
destroy_dept: boolean;
assign_emp(e: ):boolean;
end
.

47


.


.

:
d.no_of_emps
d._

48

(transient 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


__

52




.

.

53

8:
t l
tuple


_
1:
atom

2:
atom

3:
atom

7:
tuple

19

_
3:
atom

_
4:
atom

_
5:
atom

54


RDBMS ORDBMS
ORDBMS



.
OODBMS
.

55

( )

56

()


,
.

57

,
_:

,
_

: 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
y

(Bitmap images)


.


.

70




,
.

71

define class
type tuple ( _:
_:
:
:
:
:

string;
integer;
tuple(: ,
_: date);
set(string);
set();
set());

operations

end
6 .
.
.

72

define class
type tuple (
_:
_:

string;
integer;

:
:
:
:

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

operations

end
4 .

,
,
.

73

define
d
fi class
l

type tuple (
_:
_:

string;
integer;

ttuple(:
l (
,

_: date);

set(string);

:
:

set();
set());

operations

end
1 .

(_)
(
_
)

(().
)

74

(
(/)

/ )



.
:
y

_, _,


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


.

75

(
(/)

/ )


(
) .
:

, ,


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

.

76

You might also like