Download presentation
Presentation is loading. Please wait.
Published bySherman Chapman Modified over 9 years ago
1
1 ODMG
2
2 Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital Equipment, Hewlett-Packard, Itasca, Intellitic, Poet Software, Servio, Texas Instruments Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital Equipment, Hewlett-Packard, Itasca, Intellitic, Poet Software, Servio, Texas Instruments
3
3 ODMG Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital Equipment, Hewlett-Packard, Itasca, Intellitic, Poet Software, Servio, Texas Instruments R.G.C. Cattell The Object Database Standard : ODMG, Release 1.2, 1996 Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital Equipment, Hewlett-Packard, Itasca, Intellitic, Poet Software, Servio, Texas Instruments R.G.C. Cattell The Object Database Standard : ODMG, Release 1.2, 1996
4
4 ODMG Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital Equipment, Hewlett-Packard, Itasca, Intellitic, Poet Software, Servio, Texas Instruments R.G.C. Cattell The Object Database Standard : ODMG, Release 1.2, 1996 R.G.C. Cattell, D.K. Barry The Object Database Standard: ODMG 2.0, 1997 Object Database Management Group (ODMG) ODMG has been formed in late 1991 by: ObjectDesign, Ontos, O2 Technology, Versant, Objectivity, Digital Equipment, Hewlett-Packard, Itasca, Intellitic, Poet Software, Servio, Texas Instruments R.G.C. Cattell The Object Database Standard : ODMG, Release 1.2, 1996 R.G.C. Cattell, D.K. Barry The Object Database Standard: ODMG 2.0, 1997
5
5 ODMG Aims To put forward a set of standards allowing an ODBMS customer to write portable applications, i.e. application that could run on more than one ODBMS Aims To put forward a set of standards allowing an ODBMS customer to write portable applications, i.e. application that could run on more than one ODBMS
6
6 ODMG ODMG versus Relational DBMS
7
7 ODMG ODMG versus Relational DBMS
8
8 ODMG Architecture
9
9 ODMG Architecture
10
10 ODMG Components
11
11 ODMG Components Framework A portion of ODMG that is common to all programming languages Components Framework A portion of ODMG that is common to all programming languages
12
12 ODMG Components Framework A portion of ODMG that is common to all programming languages Framework consist of: »Object Model »Object Definition Language »Object Query Language Components Framework A portion of ODMG that is common to all programming languages Framework consist of: »Object Model »Object Definition Language »Object Query Language
13
13 ODMG Components Bindings Bindings for each programming language in which ODBMS is used (currently: C++, Smalltalk) Components Bindings Bindings for each programming language in which ODBMS is used (currently: C++, Smalltalk)
14
14 ODMG Basic concepts
15
15 ODMG Basic concepts The model is based on objects with object identifiers Basic concepts The model is based on objects with object identifiers
16
16 ODMG Basic concepts The model is based on objects with object identifiers Objects are categorised into types Basic concepts The model is based on objects with object identifiers Objects are categorised into types
17
17 ODMG Basic concepts The model is based on objects with object identifiers Objects are categorised into types The behaviour of objects is defined by a set of operations Basic concepts The model is based on objects with object identifiers Objects are categorised into types The behaviour of objects is defined by a set of operations
18
18 ODMG Basic concepts The model is based on objects with object identifiers Objects are categorised into types The behaviour of objects is defined by a set of operations The state of objects is determined by a set of properties (attributes, relationships) Basic concepts The model is based on objects with object identifiers Objects are categorised into types The behaviour of objects is defined by a set of operations The state of objects is determined by a set of properties (attributes, relationships)
19
19 ODMG Basic concepts Each object may have a unique name Basic concepts Each object may have a unique name
20
20 ODMG Basic concepts Each object may have a unique name Operations are defined by operation signatures Basic concepts Each object may have a unique name Operations are defined by operation signatures
21
21 ODMG Basic concepts Each object may have a unique name Operations are defined by operation signatures Attributes are defined by attribute signatures Basic concepts Each object may have a unique name Operations are defined by operation signatures Attributes are defined by attribute signatures
22
22 ODMG Basic concepts Each object may have a unique name Operations are defined by operation signatures Attributes are defined by attribute signatures Relationships are specified by relationship signatures Basic concepts Each object may have a unique name Operations are defined by operation signatures Attributes are defined by attribute signatures Relationships are specified by relationship signatures
23
23 ODMG Basic concepts Collection types include sets, bags, lists and arrays Basic concepts Collection types include sets, bags, lists and arrays
24
24 ODMG Basic concepts Collection types include sets, bags, lists and arrays Object types are related in subtype/supertype graph Basic concepts Collection types include sets, bags, lists and arrays Object types are related in subtype/supertype graph
25
25 ODMG Basic concepts Collection types include sets, bags, lists and arrays Object types are related in subtype/supertype graph An extent set can be declared to contain all instances of a given type Basic concepts Collection types include sets, bags, lists and arrays Object types are related in subtype/supertype graph An extent set can be declared to contain all instances of a given type
26
26 ODMG Basic concepts Individual instances can be uniquely identified by the value they carry for some property or set of properties (keys) Basic concepts Individual instances can be uniquely identified by the value they carry for some property or set of properties (keys)
27
27 ODMG Type hierarchy
28
28 ODMG Type hierarchy
29
29 ODMG Object Definition Language
30
30 ODMG Object Definition Language Employee Teaching Assistant Professor Section Student Course teaches is taught by assists has TA has prerequisites is prerequisite belongs to consists of has of
31
31 ODMG Object Definition Language interface Course (extent courses keys name, number ) Object Definition Language interface Course (extent courses keys name, number )
32
32 ODMG Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number;
33
33 ODMG Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; relationship List has_sections inverse Section::is_section_of { order by Section::number }; Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; relationship List has_sections inverse Section::is_section_of { order by Section::number };
34
34 ODMG Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; relationship List has_sections inverse Section::is_section_of { order by Section::number }; relationship Set has_prerequisites inverse Course::is_prerequisite_for; Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; relationship List has_sections inverse Section::is_section_of { order by Section::number }; relationship Set has_prerequisites inverse Course::is_prerequisite_for;
35
35 ODMG Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; relationship List has_sections inverse Section::is_section_of { order by Section::number }; relationship Set has_prerequisites inverse Course::is_prerequisite_for; relationship Set is_prerequisite_for inverse Course::has_prerequisites; Object Definition Language interface Course (extent courses keys name, number ) { attribute String name; attribute String number; relationship List has_sections inverse Section::is_section_of { order by Section::number }; relationship Set has_prerequisites inverse Course::is_prerequisite_for; relationship Set is_prerequisite_for inverse Course::has_prerequisites;
36
36 ODMG Object Definition Language Boolean offer( in Unsigned Short semester) raises(already_offered); Boolean drop( in Unsigned Short semester) raises(not_offered); }; Object Definition Language Boolean offer( in Unsigned Short semester) raises(already_offered); Boolean drop( in Unsigned Short semester) raises(not_offered); };
37
37 ODMG Object Definition Language interface Section (extent sections key (is_section_of, number) ) Object Definition Language interface Section (extent sections key (is_section_of, number) )
38
38 ODMG Object Definition Language interface Section (extent sections key (is_section_of, number) ) { attribute String number; relationship Professor is_taught_by inverse professor::teaches; relationship TA has_TA inverse TA::assists; relationship Course is_section_of inverse Course::has_sections; relationship Set is_taken_by inverse Student::takes; }; Object Definition Language interface Section (extent sections key (is_section_of, number) ) { attribute String number; relationship Professor is_taught_by inverse professor::teaches; relationship TA has_TA inverse TA::assists; relationship Course is_section_of inverse Course::has_sections; relationship Set is_taken_by inverse Student::takes; };
39
39 ODMG Object Definition Language interface Employee (extent employees key (name. id) ) { attribute String name; attribute Short id; attribute Unsigned Short annual_salary; void hire(); void fire() raises (no_such_employee); }; Object Definition Language interface Employee (extent employees key (name. id) ) { attribute String name; attribute Short id; attribute Unsigned Short annual_salary; void hire(); void fire() raises (no_such_employee); };
40
40 ODMG Object Definition Language interface Professor:Employee (extent professors ) {attribute Enum Rank { full, associate, assistant} ; relationship Set teaches inverse section::is_taught_by; Short grant_tenure() raises(ineligible_for tenure); } interface TA: Employee, Student() { relationship Section assists inverse Section::has_TA; }; Object Definition Language interface Professor:Employee (extent professors ) {attribute Enum Rank { full, associate, assistant} ; relationship Set teaches inverse section::is_taught_by; Short grant_tenure() raises(ineligible_for tenure); } interface TA: Employee, Student() { relationship Section assists inverse Section::has_TA; };
41
41 ODMG Object Definition Language interface Student (extent students keys name, student_id ) {attribute String name; attribute String student_id; attribute Struct Address {String college, String room_number, } dorm_address; relationship Set takes inverse Section::is_taken_by; Object Definition Language interface Student (extent students keys name, student_id ) {attribute String name; attribute String student_id; attribute Struct Address {String college, String room_number, } dorm_address; relationship Set takes inverse Section::is_taken_by;
42
42 ODMG Object Definition Language) Boolean register_for_course( in Unsigned Short Course, in Unsigned Short Section ) raises(unsatisfied_prerequisites, section_full, course_full ); void drop_course( in Unsigned Short Course ) raises( not_registered_for_that_course); void assign_major( in Unsigned Short Department ); Object Definition Language) Boolean register_for_course( in Unsigned Short Course, in Unsigned Short Section ) raises(unsatisfied_prerequisites, section_full, course_full ); void drop_course( in Unsigned Short Course ) raises( not_registered_for_that_course); void assign_major( in Unsigned Short Department );
43
43 ODMG Object Definition Language Short transfer( in Unsigned Short old_section, in Unsigned Short new_section ); }; Object Definition Language Short transfer( in Unsigned Short old_section, in Unsigned Short new_section ); };
44
44 ODMG Programming language (C++) binding
45
45 ODMG Programming language (C++) binding There is single unified type system across the programming language and the database Programming language (C++) binding There is single unified type system across the programming language and the database
46
46 ODMG Programming language (C++) binding There is single unified type system across the programming language and the database The programming language-specific binding for ODL/OML respects the syntax and semantics of the base programming language into which it is being inserted Programming language (C++) binding There is single unified type system across the programming language and the database The programming language-specific binding for ODL/OML respects the syntax and semantics of the base programming language into which it is being inserted
47
47 ODMG Programming language (C++) binding There is single unified type system across the programming language and the database The programming language-specific binding for ODL/OML respects the syntax and semantics of the base programming language into which it is being inserted The binding is structured as a small set of additions to the base programming language Programming language (C++) binding There is single unified type system across the programming language and the database The programming language-specific binding for ODL/OML respects the syntax and semantics of the base programming language into which it is being inserted The binding is structured as a small set of additions to the base programming language
48
48 ODMG Programming language (C++) binding Expressions in OML compose freely with expressions from the base programming language and vice versa Programming language (C++) binding Expressions in OML compose freely with expressions from the base programming language and vice versa
49
49 ODMG C++ binding
50
50 ODMG C++ binding Persistent-capable classes class Professor : public Persistent_Object C++ binding Persistent-capable classes class Professor : public Persistent_Object
51
51 ODMG C++ binding Persistent-capable classes class Professor : public Persistent_Object { public: Ref dept inverse Department::professors; C++ binding Persistent-capable classes class Professor : public Persistent_Object { public: Ref dept inverse Department::professors;
52
52 ODMG C++ binding Persistent-capable classes class Professor : public Persistent_Object { public: Ref dept inverse Department::professors; Set > advises inverse Student::advisor; }; C++ binding Persistent-capable classes class Professor : public Persistent_Object { public: Ref dept inverse Department::professors; Set > advises inverse Student::advisor; };
53
53 ODMG C++ binding Ref-based approach For each persistence-capable class T, an ancillary class Ref is defined C++ binding Ref-based approach For each persistence-capable class T, an ancillary class Ref is defined
54
54 ODMG C++ binding Ref-based approach For each persistence-capable class T, an ancillary class Ref is defined Ref profP; Ref deptRef; profP->grant_tenure(); deptRef = profP->dept; C++ binding Ref-based approach For each persistence-capable class T, an ancillary class Ref is defined Ref profP; Ref deptRef; profP->grant_tenure(); deptRef = profP->dept;
55
55 ODMG Mapping ODMG Model into C++
56
56 ODMG Mapping ODMG Model into C++ Object type -> C++ class Mapping ODMG Model into C++ Object type -> C++ class
57
57 ODMG Mapping ODMG Model into C++ Object type -> C++ class Structure ->struct or class Mapping ODMG Model into C++ Object type -> C++ class Structure ->struct or class
58
58 ODMG Mapping ODMG Model into C++ Object type -> C++ class Structure ->struct or class Collections -> template classes Mapping ODMG Model into C++ Object type -> C++ class Structure ->struct or class Collections -> template classes
59
59 ODMG Mapping ODMG Model into C++ Object type -> C++ class Structure ->struct or class Collections -> template classes template class Set: public Collection {...}; class Ship {...}; Set > Cunard_Line; Mapping ODMG Model into C++ Object type -> C++ class Structure ->struct or class Collections -> template classes template class Set: public Collection {...}; class Ship {...}; Set > Cunard_Line;
60
60 ODMG Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes
61
61 ODMG Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes operations -> C++ functions Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes operations -> C++ functions
62
62 ODMG Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes operations -> C++ functions relationships -> methods that traverse relationship Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes operations -> C++ functions relationships -> methods that traverse relationship
63
63 ODMG Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes operations -> C++ functions relationships -> methods that traverse relationship arrays of objects -> Varray C++ class Mapping ODMG Model into C++ subtype/supertype hierarchy -> hierarchy of classes operations -> C++ functions relationships -> methods that traverse relationship arrays of objects -> Varray C++ class
64
64 ODMG Mapping ODMG Model into C++ keys -> ? extents -> ? name -> ? Mapping ODMG Model into C++ keys -> ? extents -> ? name -> ?
65
65 ODMG C++ ODL
66
66 ODMG C++ ODL Attributes class Student : public Persistent_Object {Stringname; Datebirth_date; Phone_Numberdorm_phone; C++ ODL Attributes class Student : public Persistent_Object {Stringname; Datebirth_date; Phone_Numberdorm_phone;
67
67 ODMG C++ ODL Attributes class Student : public Persistent_Object {Stringname; Datebirth_date; Phone_Numberdorm_phone; struct {intPO_box; Stringuniversity; Stringcity; Stringstate; Stringzip_code; } university_address; C++ ODL Attributes class Student : public Persistent_Object {Stringname; Datebirth_date; Phone_Numberdorm_phone; struct {intPO_box; Stringuniversity; Stringcity; Stringstate; Stringzip_code; } university_address;
68
68 ODMG C++ ODL Attributes class Student : public Persistent_Object {Stringname; Datebirth_date; Phone_Numberdorm_phone; struct {intPO_box; Stringuniversity; Stringcity; Stringstate; Stringzip_code; } university_address; List favorite_friends; }; C++ ODL Attributes class Student : public Persistent_Object {Stringname; Datebirth_date; Phone_Numberdorm_phone; struct {intPO_box; Stringuniversity; Stringcity; Stringstate; Stringzip_code; } university_address; List favorite_friends; };
69
69 ODMG C++ ODL Relationships class Department : public Persistent_Object { public: Set > professors inverse Professor::dept; }; C++ ODL Relationships class Department : public Persistent_Object { public: Set > professors inverse Professor::dept; };
70
70 ODMG C++ ODL Relationships class Department : public Persistent_Object { public: Set > professors inverse Professor::dept; }; class Professor : public Persistent_Object { Ref dept inverse Department::professors; Set > advisees inverse Student::advisor; }; C++ ODL Relationships class Department : public Persistent_Object { public: Set > professors inverse Professor::dept; }; class Professor : public Persistent_Object { Ref dept inverse Department::professors; Set > advisees inverse Student::advisor; };
71
71 ODMG C++ ODL Relationships class Student : public Persistent_Object { public: Ref advisor inverse Professor::advisees; Set > classes inverse Course::students_enrolled; }; C++ ODL Relationships class Student : public Persistent_Object { public: Ref advisor inverse Professor::advisees; Set > classes inverse Course::students_enrolled; };
72
72 ODMG C++ ODL Relationships class Student : public Persistent_Object { public: Ref advisor inverse Professor::advisees; Set > classes inverse Course::students_enrolled; }; class Course : public Persistent_Object {public: Set > students_enrolled inverse Student::classes; }; C++ ODL Relationships class Student : public Persistent_Object { public: Ref advisor inverse Professor::advisees; Set > classes inverse Course::students_enrolled; }; class Course : public Persistent_Object {public: Set > students_enrolled inverse Student::classes; };
73
73 ODMG C++ ODL Unidirectional Relationships struct Responsible { Stringdept; Ref e; Datedue_date; }; C++ ODL Unidirectional Relationships struct Responsible { Stringdept; Ref e; Datedue_date; };
74
74 ODMG C++ ODL Unidirectional Relationships struct Responsible { Stringdept; Ref e; Datedue_date; }; class Order { public: Set >who; Stringwhat; Responsiblecontact; }; C++ ODL Unidirectional Relationships struct Responsible { Stringdept; Ref e; Datedue_date; }; class Order { public: Set >who; Stringwhat; Responsiblecontact; };
75
75 ODMG C++ ODL Object Creation static const Database * const Database::transient_memory; C++ ODL Object Creation static const Database * const Database::transient_memory;
76
76 ODMG C++ ODL Object Creation static const Database * const Database::transient_memory; Forms of new operator: (i)void * operator new( size_t size, const char* typename = 0); C++ ODL Object Creation static const Database * const Database::transient_memory; Forms of new operator: (i)void * operator new( size_t size, const char* typename = 0);
77
77 ODMG C++ ODL Object Creation static const Database * const Database::transient_memory; Forms of new operator: (i)void * operator new( size_t size, const char* typename = 0); (ii)void * operator new( size_t size, constRef &clustering, const char* typename =0); C++ ODL Object Creation static const Database * const Database::transient_memory; Forms of new operator: (i)void * operator new( size_t size, const char* typename = 0); (ii)void * operator new( size_t size, constRef &clustering, const char* typename =0);
78
78 ODMG C++ ODL Object Creation static const Database * const Database::transient_memory; Forms of new operator: (i)void * operator new( size_t size, const char* typename = 0); (ii)void * operator new( size_t size, constRef &clustering, const char* typename =0); (iii)void * operator new( size_t size, Database * database, const char* typename =0); C++ ODL Object Creation static const Database * const Database::transient_memory; Forms of new operator: (i)void * operator new( size_t size, const char* typename = 0); (ii)void * operator new( size_t size, constRef &clustering, const char* typename =0); (iii)void * operator new( size_t size, Database * database, const char* typename =0);
79
79 ODMG C++ ODL Object creation Database *yourDB, *myDB; C++ ODL Object creation Database *yourDB, *myDB;
80
80 ODMG C++ ODL Object creation Database *yourDB, *myDB; Ref temp_sched1 = new Schedule; C++ ODL Object creation Database *yourDB, *myDB; Ref temp_sched1 = new Schedule;
81
81 ODMG C++ ODL Object creation Database *yourDB, *myDB; Ref temp_sched1 = new Schedule; Ref prof2 = new( yourDB, "Professor") Professor; C++ ODL Object creation Database *yourDB, *myDB; Ref temp_sched1 = new Schedule; Ref prof2 = new( yourDB, "Professor") Professor;
82
82 ODMG C++ ODL Object creation Database *yourDB, *myDB; Ref temp_sched1 = new Schedule; Ref prof2 = new( yourDB, "Professor") Professor; Ref student1 = new(myDB) Student; Ref student2 = new(student1) Student; Ref temp_student = new(Database::transient_memory) Student; C++ ODL Object creation Database *yourDB, *myDB; Ref temp_sched1 = new Schedule; Ref prof2 = new( yourDB, "Professor") Professor; Ref student1 = new(myDB) Student; Ref student2 = new(student1) Student; Ref temp_student = new(Database::transient_memory) Student;
83
83 ODMG C++ ODL Object Deletion Ref obj_ref; // set obj_ref to refer to persistent object obj_ref.delete_object(); C++ ODL Object Deletion Ref obj_ref; // set obj_ref to refer to persistent object obj_ref.delete_object();
84
84 ODMG C++ ODL Object Deletion Ref obj_ref; // set obj_ref to refer to persistent object obj_ref.delete_object(); Object Modification obj_ref->mark_modified(); C++ ODL Object Deletion Ref obj_ref; // set obj_ref to refer to persistent object obj_ref.delete_object(); Object Modification obj_ref->mark_modified();
85
85 ODMG C++ ODL Object References –Object references are instances of Ref C++ ODL Object References –Object references are instances of Ref
86
86 ODMG C++ ODL Object References –Object references are instances of Ref –All accesses to persistent objects are made via methods defined on classes Ref, Persistent_Object, Database C++ ODL Object References –Object references are instances of Ref –All accesses to persistent objects are made via methods defined on classes Ref, Persistent_Object, Database
87
87 ODMG C++ ODL Object References –Object references are instances of Ref –All accesses to persistent objects are made via methods defined on classes Ref, Persistent_Object, Database –The dereference operator -> is used to access members of the persistent object "addressed" by a given object reference C++ ODL Object References –Object references are instances of Ref –All accesses to persistent objects are made via methods defined on classes Ref, Persistent_Object, Database –The dereference operator -> is used to access members of the persistent object "addressed" by a given object reference
88
88 ODMG C++ ODL Attributes prof->id_number = next_id; cout id_number; C++ ODL Attributes prof->id_number = next_id; cout id_number;
89
89 ODMG C++ ODL Relationships 1-1 class A {Ref inverse B::ra } class B {Ref inverse ::rb; } C++ ODL Relationships 1-1 class A {Ref inverse B::ra } class B {Ref inverse ::rb; }
90
90 ODMG C++ ODL Relationships 1-1 class A {Ref inverse B::ra } class B {Ref inverse ::rb; } a.rb = &b;//add relationship a.rb.clear();// remove relationship a.rb = &bb; //modify relationship C++ ODL Relationships 1-1 class A {Ref inverse B::ra } class B {Ref inverse ::rb; } a.rb = &b;//add relationship a.rb.clear();// remove relationship a.rb = &bb; //modify relationship
91
91 ODMG C++ ODL Relationships 1:M class A {Set > sb inverse B::ra; } class B {Ref ra inverse A::sb; } C++ ODL Relationships 1:M class A {Set > sb inverse B::ra; } class B {Ref ra inverse A::sb; }
92
92 ODMG C++ ODL Relationships 1:M class A {Set > sb inverse B::ra; } class B {Ref ra inverse A::sb; } a.sb.insert_element(&b); // add relationship a.sb.remove_element(&b); // remove relationship. or b.ra.clear(); b.ra = &&aa; // modify relationship C++ ODL Relationships 1:M class A {Set > sb inverse B::ra; } class B {Ref ra inverse A::sb; } a.sb.insert_element(&b); // add relationship a.sb.remove_element(&b); // remove relationship. or b.ra.clear(); b.ra = &&aa; // modify relationship
93
93 ODMG C++ ODL Relationships M:N class A {Set > sb inverse B::sa; } class B {Set > sa inverse A:sb; } C++ ODL Relationships M:N class A {Set > sb inverse B::sa; } class B {Set > sa inverse A:sb; }
94
94 ODMG C++ ODL Relationships M:N class A {Set > sb inverse B::sa; } class B {Set > sa inverse A:sb; } a.sb.insert_element(&b); // add relationship a.sb.remove_element(&b); // remove relationship or b.sa.remove_element(&a); a.sb.replace_element_at(&bb, 3);// modify relationship C++ ODL Relationships M:N class A {Set > sb inverse B::sa; } class B {Set > sa inverse A:sb; } a.sb.insert_element(&b); // add relationship a.sb.remove_element(&b); // remove relationship or b.sa.remove_element(&a); a.sb.replace_element_at(&bb, 3);// modify relationship
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.