Transcript Document
Standard Metamodel for Object
Databases (1): Introduction
Piotr Habela
Polish-Japanese Institute of Information Technology, Warsaw
Kazimierz Subieta
Polish-Japanese Institute of Information Technology, Warsaw
Institute of Computer Science PAS, Warsaw
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 1
Database metamodel...
• Description of all database properties that are
independent on a particular database state.
• Stores a database schema, together with other data, such
as physical organization of database files, optimization
information, access and security rules, etc.
• Metamodels are relatively simple in relational systems
due to simplicity of relational data structures. Not so
simple for O-R metamodels.
• The relational metamodel is implemented as a collection
of system tables (catalogs).
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 2
A metamodel in object databases
• OODBMS: rich data model inevitably increases the
metamodel complexity.
• Won Kim: OODBMS leads to "metadata management
nightmare". Is it true? Is it better for an O-R model?
• ODMG standard: ca. 150 interfaces, bi-directional
relationships, inheritance relationships and operations.
• Some complexity of a metamodel is a minor cost of major
advantages of an OO model.
• The metamodel proposed by ODMG is not a solution, but a
starting point for research.
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 3
ODMG metamodel: complexity...
A part of the metamodel (~25%):
RepositoryObject
type
Specifier
* name
Type
size_of
Operand
case_in
value
*
*
*
structure_type
UnionCase
*
union_type
Constant
Parameter
parameter_mode
*
operation
Union
references
the_operands
Expression
operator
Structure
UnionCase
value_of
case_labels
Member
Collection
Literal
literal_value
ConstOperand
Operation
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 4
Roles of a metamodel
• Description of a data model, for understanding it by all
parties: system developers, users, administrators,...
• Implementation of DBMS: organization of a database
catalog. Implementation of database operations, including
administration, data access, security,...
• Schema evolution. Metamodel + operations on catalogs
are necessary (but not sufficient) for schema evolution.
• Generic programming. Metamodel + access to catalogs
become a part of the programmer’s interface to enable
generic programming through reflection.
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 5
Description of a data model
• It is important to provide possibly clear and unambiguous
definition of data model primitives and their interrelations.
• Unified Modeling Language (UML): a metamodel
provides informal definition of language constructs.
• Such a metamodel is not a description of UML semantics.
It suffers from the ignotum per ignotum logical flaw.
• UML semantics should be defined through states and
actions: mapping diagrams onto sets of states/actions.
• UML metamodel presents abstract syntax of diagrams,
dependencies and constraints among introduced concepts.
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 6
UML metamodel
ModelElement
A part of the metamodel (~10%):
Relationship
Dependency
+ mapping: Uninterpreted
dependency
source
Stereotype
classification
+value: Uninterpreted
0..1
0..*
target
0..*
Element
name: Name
0..*
TaggedValue
+value: Uninterpreted
0..1
characteristic
name: Name
tagset
0..*
0..*
/dependency
Note
0..* 0..* +value: Uninterpreted
target source
target
/dependency
0..*
source
Constraint
+value: Uninterpreted
0..1
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 7
ODMG metamodel...
• The ODMG standard follows the UML metamodel style.
• It presents interdependencies among concepts introduced
in the object model and covers the abstract syntax of ODL.
• In contrast to UML, the ODMG metamodel is associated
with a number of retrieval/manipulation capabilities.
• The intention behind the metamodel is the description of
database catalogs rather than pure description of concepts.
• The style is taken from the CORBA Interface Repository.
• Ambiguous! - undefined terms, no semantics, no
explanation, no diagrams, no motivation, no examples.
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 8
Metamodel in DBMS Implementation
•
•
•
•
Simplicity: easy to understand and use.
Universality: support for all database operations.
Performance: fast run-time access and updating.
Information on physical data structures: file
organizations, indices, data for optimization, etc.
• Privacy and security: information on the rules.
• Extensibility, to support further development and
extensions of DBMS functionalities.
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 9
Schema Evolution
• Operations introduced in the ODMG metamodel suggest
this goal.
• Some 100 papers on schema evolution by the database
community
• A fundamental question:
Is the community working on a right problem?
• Our opinion: People producing papers on schema evolution
do not understand the problem.
• The problem is in between the metadata management,
software change management, and
software configuration management
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 10
Software change management
• Organizing the process of reporting problems in software
and/or in (changing) user or system requirements.
• Decision process concerning the scope of software changes
and/or making new versions of the software.
• Planning software changes, including estimating costs and
time, scheduling, software configuration, etc.
• Organizing of a team responsible for the design and
implementation of software changes.
• Organizing software tests after a change, including
regression tests of unchanged modules.
• ..... many other actions ....
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 11
Software configuration management
• SCM is a discipline for establishing and maintaining the
integrity of the products of a software project.
• SCM consists of planning, organizing, surveillance,
controlling and coordinating activities making it
possible to identify, store and secure all components of
the software and its documentation during the entire
software life cycle, including change management.
• SCM keeping consistency within configuration items,
including software versions and revisions.
• Changes to a database schema disciplined by SCM.
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 12
Sample SCM repository structure
older/newer version
*
Configuration item
(logical document)
*
Company
*
Client
Baseline
refers to
had/has
*
Installation
*
*
*
*
*
*
Composite CI
linked with
used in
*
Release
belongs to
0..1
Project
Responsibility
related to
Supplier
Physical location
0..1 *
0..1
*
Library item
(physical document)
*
supplied
0..1
employs
*
stores *
Binder
*
Loan
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
*
*
Lock
*
*
Access right
*
*
Activity
*
*
is duty of done by
done by
0..1
*
Project role
* has
*
Copy
*
SCM Standards:
IEEE 1042
IEEE 828
IEEE 610.12
ISO/IEC 12207
*
*
*
assigned to
for
*
0..1
Person
by
by
November 2001, Slide 13
Metamodel repository + SCM
repository: storing dependencies
Configuration dependency: consistent sets of software units.
Standardization dependency: consistency with standards.
Forward dependency: which module is called from A?
Backward dependency: which module calls A?
Parametric dependency: which module is a parameter of A?
Side effects dependency: which hardware/software/network unit
can be read and/or affected by A?
Event dependency: which event is rised/caught by A?
Typing dependency: which module has the same type as A?
Redundancy dependency: which module holds the same
information as A?
Stylistic dependency: which module has the design style of A?
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 14
Schema Evolution Management of
Dependencies
• The entire population of hardware, software and
documentation units forms a colored graph, where each
colored edge represents some dependency between units.
• The dependencies can be stored within a metabase
repository or within a software configuration repository.
• The schema evolution problem: establishing dependencies
between hardware, software and documentation units.
• It should determine benefits of storing dependencies for
particular phases and aspects of the software life cycle.
• ODMG : none of the above aspects is considered
operations on the metamodel are unmotivated!
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 15
Reflection Mechanism
Steps of reflection (Dynamic SQL, CORBA DII):
• Accessing meta-information to retrieve data necessary to
formulate a dynamic request.
• Construction of the dynamic request, e.g. as a query string.
• Executing the request through a special utility, which takes
the request as an argument.
• Utilizing the result of the request. The type of the result
can be unknown, hence a special utility is necessary to
return the type.
ODMG metamodel supports only the first step
(in contrast to the CORBA Dynamic Invocation Interface).
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 16
Conclusion of the Part 1:
• The ODMG database metamodel is
doubtful concerning all aspects.
• How to improve it? How to avoid the
"metadata management nightmare"?
(see Part 2)
P.Habela, K.Subieta: Standard Metamodel for Object Databases (1)
November 2001, Slide 17