Вы находитесь на странице: 1из 18

Tamkang Journal of Science and Engineering, vol.1, No. 2, pp.

97-113 (1998) 97

Formal Specification in Software Reuse Designs: an Object-Oriented Database Example


Huan-Chao Keh and Timothy K. Shih
Department of Computer Science and Information Engineering Tamkang University, Tansui, Taiwan 25137, R.O.C. email: TSHIH@CS.TKU.EDU.TW fax: Intl. (02) 2620 9749

Abstract
The advantages of using a formal specification are in its precise definition of object properties and its declarative description of operations of a system. The Z notation is used widely in the literature of formal system designs and the research of language semantics. In line with the rapid growth of multimedia omputation research, we use the Z notation to describe a multimedia database that supports the reuse of multimedia presentations. The database consists of two layers: the frame layer and the resource layer. A frame group in the first layer is the basic presentation unit to be reused. A resource group in the second layer is a collection of resources to be used by a frame, or a frame group. In the hierarchy, we use four types of links to group frames and/or resources. The main contribution of this paper is in its reuse mechanism of multimedia objects in a multimedia database.

Keywords: Multimedia Database, Object Reuse, Multimedia Presentation, Z Notation, Formal Specification 1 Introduction
multimedia data modeling [9] suggests a mechanism to manage multimedia data. In addition to the general discussion on multimedia database management systems (MDBMSs), there are other articles take a similar approach to ours. The work discussed in [5] proposes a multimedia data model and a database to support hypermedia presentations and the management of video objects. Its specialized video server with an incremental retrieval method supports VCR like functions for heterogeneous video clips. The design of multimedia DBMS is from the scratch, which is similar to our approach. The system also supports object composition/decomposition. However, no specific reuse mechanism is emphasized in the discussion. Only an object-oriented data model was proposed. The system also provides a global data sharing mechanism, including a video and an image collaboration tools, which are integrated with a distributed environment. A multimedia database for news-on-demand

A high quality multimedia presentation can be an effective and attractive means of delivering a message. Hence, easy to use, high quality presentation design systems have became important to many academic researchers as well as commercial software builders. To support the creation of multimedia presentations, many articles suggest that a multimedia database supporting fast indexing and large data retrieval is essential [29, 25, 14, 2]. The discussion of issues in multimedia database management systems can be found in [25]. A distributed database supporting the development of multimedia applications is introduced in [29]. A mechanism for formal specification and modeling of multimedia object composition is found in [30]. The work discussed in [30] also considers the temporal properties of multimedia resources. A database system for video objects is discussed in [19]. A content-based querying mechanism for retrieving images is given in [2]. Layered

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

98

applications is proposed in [20]. The database follows international standards, such as SGML (Standard Generalized Mark-up Language), and HyTime (Hypermedia/Time-Based Structural Language). Its Visual Query Interface supports presentation, navigation, and querying. A multimedia type system, especially useful for structured text and presentation information, is also proposed. This database takes an object-oriented approach, which is also used by us. Similar to their standardization approach, we follow standard multimedia file formats by Microsoft, which are worldwide used. The work discussed in [20] has a multimedia type system, which provides a limited object composition mechanism. However, similar to the work discussed in [5], no explicit reuse mechanism is provided. The research in [29] uses an object-oriented approach to design a client-server database environment and a multimedia class library to support multimedia applications. Its graphical object editor based on OCPN (Object Composition Petri Net) allows scheduling and composing of multimedia objects. The implementation uses the Raima Data Manager/Object Manager (a database system) for its storage model, which is similar to our early approach. However, we re-design the system from the scratch later due to some reasons for extension. CORBA (Common Object Request Broker Architecture) is a specification and architecture standard supported by the OMG (Object Management Group). CORBA aims to obtain distributed open architecture and specification through an object-oriented client-server structure that achieves interoperability among independently developed applications. Based on the CORBA Object Broker standard, the work discussed in [11] proposes a database component of the VORTEL project. The implementation relies on the MOSS (Media Object Storage System) and the AMOS (Active Media Object Store) projects for underlying support. The distribution of database structure and the interoperability are based on the DEC's implementation of the CORBA compliant Object Request Broker. Another database design following CORBA is discussed in [13]. The Multiware database, as one portion of the Multiware Platform project, takes an object-oriented approach and adopts an object database standard (ODMG-93) announced by ODMG (Object Database Management Group). Using specialized servers for each media type, the prototype uses the Orbix implementation of CORBA, and the ObjectStore object oriented

database system. 1.1 Multimedia Database Design In spite of the many proposed MDBMS, there still exists a problem. To increase the efficiency of a multimedia presentation design, the reuse of previously designed presentations is key. Not many presentation design systems have an underlying database management system to support presentation reuse. In our research, the development of a reuse mechanism was a necessity from the beginning. As exhibited in the systems described above, the strategies for storing multimedia resources have four basic approaches:
rely on a regular file system use a traditional database management system (e.g., relational DBMS), with the support of an object-oriented interface use an object-oriented database management system, with user interface function support design the database from the scratch, base on object-oriented concepts

The first approach relies on the users to manage multimedia resources by themselves. There is no support for reuse of presentations. Most presentation systems allow the user to cut and paste portions of a presentation. However, this is not an ideal strategy due to the general limitations of a file system, such as the inflexibility of object composition and sharing. The second approach relies on a relational DBMS. However, due to the nature of multimedia presentations, it is easier to organize a presentation using an object-oriented methodology [5, 28, 20, 21]. The difference between the table-based organization and the object-oriented nature of multimedia information makes the usage of a relational database system become inefficient [20]. Thus, the third approach overcomes the second by using an object-oriented DBMS as the underlying system. Even though the underlying system may not be designed specially for multimedia data, we found that most object-oriented DBMSs provide a binary data type, which is useful for storing picture, sound, video, etc. The last approach results in the most efficient system in general. However, it is quite time-consuming to design everything from the scratch. An early version of our database takes the third approach. However, as we attempted to extend the database to a distributed environment, we found it difficult to solve some implementation

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

99

problems due to the lack of control over the object-oriented DBMS and the special requirements of a MDBMS specified below: Quality of Service: Multimedia resources require a guarantee of the presentation quality. We have to use our own file structure and program to guarantee the Quality of Service (QoS). A traditional OODBMS does not support QoS multimedia objects. Synchronization: Synchronization of multiple resource streams plays an important role in a multimedia presentation, especially when the presentation is running across a network. We are not currently dealing with this inter-stream synchronization problem 1 . However, in the future we plan to break multimedia resources into small pieces in order to implement inter-stream synchronization which is especially important in a distributed environment. Networking: A distributed database requires a locking mechanism for concurrent access controls. Using our own low level design, it is easy for us to control some implementation issues, such as the two phase locking mechanism, and the database administration and control of traffic on the network. Also, as pointed out by the work discussed in [5],most OODBMSs are designed for non-multimedia information. The multimedia database implemented in [5] takes the last approach. For these reasons, we also took the last approach in our new version of database implementation. There are other challenges in developing a multimedia DBMS. For instance, the design of a visual query language for content-based retrieval [2] of multimedia information is a difficult problem yet to be solved. Since multimedia information is not stored as text or numbers, traditional database query commands are no longer suitable. Quick retrieval of information based on the semantics of a multimedia resource is an important research topic. In our system, we did not address content-based retrieval. However, we developed a visual database browser that facilitates selection of resources. Another important issue

relates to the Quality of Service [24]. Within the limits of hardware and operating system performance, we must organize multimedia information on the disk and across the network in such a way that we can guarantee to exceed a minimum level of presentation quality. In our system, we have a sophisticated storage management and indexing mechanism for the efficient retrieval of large multimedia resources.

The issues raised above are specific to multimedia databases. From a software engineering perspective, the well-defined specification of any system is key to the success of the system's implementation. The reason we take a formal specification approach is that formal specifications use mathematical notations to precisely describe what properties a system needs, without being overly concerned with how these properties are implemented. The Z specification language is
widely used in Europe. The notation we use here follows the one in [15]. We find that, by using the mathematical tool-kit provided in [15], we can easily describe the formal specification of our multimedia database. 1.2 Reusability Nevertheless, the well-defined specification does not realize an improved functionality of a system. From the perspective of software development, reusability is one of the most important factors in improving the efficacy of a multimedia database. This paper focuses on a mechanism to support reuse. Many articles discuss reusability - one of them [34] analyzes nine commonly believed software reuse myths, and points out why reusability has not played a major role in improving software productivity. Another article [8] points out that there are three common approaches to achieve software reuse: subroutine libraries, software generators, and object-oriented languages. However, each individual approach raises problems. Therefore, the author takes the best features from each of these and develops an object-oriented language, called Meld. Another reuse mechanism via building blocks is proposed in [22]. The authors apply the concept to systems programming and achieve great success. The authors also indicate that there are three important aspects of reusability: the abstraction level, customization methods, and reusability conditions. In [1], reusability criteria are proposed for the Ada language. The author suggests that, to be reusable,

We use an event-based synchronization mechanism in the current system. Inter-stream and other synchronization issues are left for future development.

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

100

a program must: be transportable, be context independent, and be independent of the runtime environment. According to the discussion given in [27], there are two levels of reuse: the reuse of knowledge and the reuse of software components. In order to support the fast retrieval of reusable objects, a classification scheme is required to group together objects sharing a common characteristic. A classification scheme organizing a software reuse library is proposed in [26]. Instead of using a centralized repository, the author proposes a generic design that can be applied to different environments. Another article [12] proposes two concepts, domain and theme, to allow software component classification by the services that they offer and by application domain. The value of object reuse needs to be evaluated. A quantitative study of reuse through inheritance is found in [17]. The author studies several software systems containing a large number of classes. The results show that reuse through inheritance is far less frequent than expected. Another article [18] measures cohesion versus reuse through inheritance, and determines that reuse through inheritance results in lower cohesion. Fortunately, many articles propose solutions to software reusability. The RSL (Reusable Software Library) prototype [3] is a software system incorporating interactive design tools and a passive database of reusable software components. Each component is associated with some attributes to be used in their automatic retrieval. Another author [10] claims that, reusable components are not enough. Software engineers need an intelligent support system to help them learn and understand how to reuse components in a software environment. A set of tool kits are implemented to support object reuse. The NUT [6, 7] is an object-oriented programming language/environment that supports class and object reuse. In NUT, classes are prototypes; when they are reused, initial values (could be nil values) are assigned according to the class specification. Objects can also be implicitly generated. For instance, program objects can be generated when equations are processed. Knowledge in the NUT environment can be reused in the following ways:
1 2 3 As a superclass; When a new object is created via the "new" operator; As a prototype for specifying components of

another class; 4 5 As the specification of a predicate; and As a specification of problem conditions in problem statements.

Only the first two are typical at conventional object-oriented systems. The above discussions consider reusability from the perspective of software development. A multimedia presentation contains a collection of presentation components as does a software system. To achieve object reuse in a multimedia database, we consider four tasks:
1.

Declare Building Blocks: Presentation sections are the building blocks of a multimedia presentation. These sections are objects to be reused. Retrieve Building Blocks: A presentation system should provide a tool to assist the user in retrieving appropriate building blocks. Modify Building Blocks: The building blocks to be reused may be modified to fit the need of a new presentation. Reorganize Database Storage: Database storage should be reorganized so that information sharing is feasible and disk space is used efficiently.

2.

3.

4.

Building block declaration is achieved by means of an object grouping mechanism at different levels of our database. These reusable objects can be retrieved using a browser. After finding the reusable presentation components, the presentation designer establishes links and possibly modifies the component. Finally, we have a storage management mechanism to allow information sharing on the disk.. The paper is organized as the following. Section 2 presents the hierarchy of our database and defines the domain of database objects. Some important properties of multimedia resources and presentations are also addressed. In section 3, we discuss the reuse mechanism of our database, the focus of our research. The implementation details are given in section 4. We evaluate our system and compare it to others in section 5. Finally, a short conclusion and discussion of future work is given in section 6.

2 The Database Object Domain

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

101

We begin our discussion of database modeling with the attributes of database objects, followed by the hierarchy of the database. In the discussion, following the conventions of other Z specifications in the literature, a domain has its name completely capitalized, a schema name starts with a capital letter followed by lower case letters, and variables or functions are all in lower case. The hierarchy of the proposed multimedia database consists of two layers: the frame object layer and the resource object layer. The two types of objects in our database are frames and resources. A frame is denoted by a box while a resource is represented by a circle with its associated properties given in an attached rounded box. The actual data of a resource is stored in a commercial multimedia file format on the hard disk2. This approach allows our system to be fully portable. Since the underlying multimedia file format is independent of the operating system (such as MS Windows 95), the database server program can be re-compiled and used in a different environment (such as UNIX). In the database architecture, the frame object layer contains presentation frames. A frame, similar to a presentation window, may contain a number of presentation items, such as video clips, music background, etc. These presentation items are stored in the resource object layer. In the frame object layer, each frame is associated with a number of attributes: name: a unique name of the frame. keyword: one or more keywords are used to describe the frame. inheritance links: pointers to other frames that inherit properties from the current frame. usage links: messages from the current frame to the destination frames, including possible parameters. aggregation links: pointers to resources that are used in the current frame. presentation knowledge: presentation properties and knowledge represented as logic facts, rules, and a query used in the frame
2

[31]. frame layouts: resources. screen coordinates of

2.1 Formal Specification Now, we present the formal specification of our multimedia database. Firstly, we define the domain of objects. In Z notation, basic types are declared in a pair of square brackets. Basic types are given with no details of their representation. We declare, messages, frame layouts, and predicates (used in our presentation inference system) as basic types:

[MSG, LAYOUT, P]
Similarly, the multimedia resource binary data, ASCII strings, and integers are declared as basic types:

[MRDATA, ASCII, INTEGER]


An abbreviation definition, using a = = sign, introduces a new domain from the composition of other domains. Frame names (type FNAME) and keywords (type KEYWORD) are ASCII strings. The knowledge set of a presentation consists of three types of objects: a set of rules (type KR), a set of facts (type KF), and a set of queries (type KQ). Note that, in Z, , X denotes the power set of objects in domain X. And, 1Y represents the non-empty power set of objects in domain Y. We treat the knowledge set of a frame as a number of facts, rules, and queries (similar to those used in the logic programming language Prolog):

In the database, objects are connected by links. Four types of links are used, as discussed in the following definitions. Definition: An inheritance link represents a property inheritance between two frames. Inheritance links are used to collect knowledge inherited by an activated frame before any logical inference required by the frame proceeds [4, 31].

For the current implementation, our database still relies on the file system. However, we are seeking techniques that allow fast indexing of multimedia resources for the future versions of our multimedia database.

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

102

Definition: A usage link, represented by a labeled thin straight line, is a link representing a message passed between two frames. A message, with or without parameters, shows the usage relation between two frames. Note that, usage links are messages created and passed when a presentation is run. They are not stored statically as database objects. We use logic predicates and procedure calls to create messages. These logic predicates and procedure calls are stored as part of the presentation script. Definition: An aggregation link connects frames and resources in the two layers of the database. An aggregation link connects frames and resources in the two layers of the database. Definition: An association link is represented by a bi-direction curve arrow between two resources. An association may exist between two resources. For example, an animation resource may be associated with a MIDI (Musical Instrument Digital Interface) resource that is used as background music. Links are divided into two categories: internal and external, to support the presentation reuse process (to be discussed in section 3). Thus, a link type (LTYPE) is defined by a free type definition (by using a ::= sign). A free type definition introduces a new data type in Z. LTYPE is a type containing only two constants: internal and external. We define four kind of links as follows:

as well as a good presentation design environment. Multimedia resources are recorded or captured via camera, tape recorder, or video camera, converted to their digital formats, and saved on the disk. Each resource can be associated with a number of attributes. We use the following attributes for multimedia resources in the resource object layer of our database: name: a unique name of the resource. keyword: one or more keywords are used as the description of a multimedia resource. For instance, Paris is a keyword of a bitmapped picture of Paris. usage: how the resource is used (e.g., background, navigation, or focus). medium: what multimedia device is used to carry out this resource (e.g., sound, animation, MPEG-coded video, or picture). model: how the resource is presented (e.g., table, map, chart, or spoken language). temporal endurance: how long the resource lasts in a presentation (e.g., 20 seconds or permanent). synchronization tolerance: how does a participant feel about the synchronization delay of a resource. For instance, a user typically expects an immediate response after pushing a button for the next page of text, however, one might be able to tolerate a 2 second delay for a video playback. detectability: how strongly a resource attracts attention (e.g., high, medium, or low). startup delay: the time between a request and the presentation of the corresponding resource starts, especially when the resource is on a remote computer connected via network. hardware limitation: what kind of hardware is essential to present the resource ensuring a minimal quality of service (e.g., MPC level 1, level 2, level 3, or other limitations). version: the version of this resource file. date/time: the date and time this resource file was created. resolution: the resolution of this resource file, specified as X x Y screen units, or 8-bit/16-bit for sound. start/end time: for non-permanent resources,

where IL is the type of inheritance links, UL is for usage links, AGL is the type of aggregation links, and ASL is for association links. Finally, a frame (type FRAME) is defined by: where FATTR is the type of frame attributes that contain a frame name, one or more keywords, presentation knowledge, and presentation layout.

To create a high quality multimedia presentation, one needs good multimedia resources

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

103

the starting cycle and the ending cycle of the piece of video, sound, or other kind of resources. A cycle can be a second, one-tenth of a second, or an interval between two consecutive video frames of a video clip. resource descriptor: a logical descriptor to a physical resource data segment on the disk. association links: pointers to other resources who have the coexistence relation with the current resource. These attributes are either declared as abbreviations, or defined as free types. Note that, the free type, DEGREE, contains three constants indicating the intensities of acceptance with respect to an attribute. For instance, a synchronization tolerance could be small, medium, or large:

Each rule describes an if-then relation between two attributes. For example, the following are some of the rules used in our system:

Thus, the attributes of a multimedia resource is a Cartesian product of the above items. And, a multimedia resource type is defined below:

The attributes in the two object layers are used in database queries to retrieve suitable objects for a multimedia presentation. These attributes are specified in a database browser when a query is launched by the user. Since each resource has a number of attributes, it would be cumbersome to require each query searching for a resource to contain all of these attributes. Thus, we propose an intelligent mechanism to simplify a query. The system contains several inference rules.

In this way, un-specified attributes can be deduced from others. Thus, a user does not need to specify all attributes of a resource when he/she is using a query to search for the resource. Recently, Data Mining has became a hot research topic in the community of database systems. We can analyze the dependencies among the above multimedia attributes and use Data Mining techniques to improve our system. For instance, we found that many presentation designers use a bit mapped picture with a low detectability for background. A MIDI resource is often used as background music. We are constructing an interactive database subsystem to collect the ways that presentation designers use our database. Based on past usage, the subsystem may suggest a suitable resource, to a designer. A presentation is a heterogeneous collection of resource groups and frame groups. A multimedia class database is a heterogeneous collection of resource object classes and frame object classes. Groups in a presentation are co-related since aggregation links and usage links are used among groups for resource access and navigation. However, in a class database, object classes are individual elements. We are led to a two layered approach by the nature of reusable objects. The reuse of a presentation script (i.e., in a frame group) and the reuse of multimedia resources (i.e., a resource group) are the two levels of reuse. Other reuse processes can be modelled by a combination of the two levels. For instance, the reuse of a whole presentation can be achieved by grouping the presentation as a frame group with several resource groups. The reuse of a single resource can be achieved by treating the single resource as a resource group. Therefore, the two layer approach is a natural design. A multimedia presentation is a collection of frame groups and resource groups. Strictly speaking, a presentation is not a part of the database, at least from the database modeling perspective. Similarly, the underlying storage

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

104

management layer is not a part of the database model. However, the two layered model is to emphasize the two levels of object reuse. There are also other models that can be used for presentations (e.g., the Petri net model). Petri nets, especially timed Petri nets, are suitable for inter-stream synchronization, which is not the mechanism used in our presentation system. Our system, on the other hand, relies on event-based synchronization with assistance from a message passing mechanism. Therefore, the Petri net model was not adopted. So far, we have presented objects inside the multimedia database. In section 3 , we present database operations and the semantics of object reuse.

Semantics of Object Reuse

Based on our early experience with the design of multimedia presentations, we found that most multimedia authoring systems either provide a very primitive reuse function, or provide no reuse mechanism at all. In the development of our multimedia presentation system, object reuse becomes one of the most important goals. In this section, following the object domains and the hierarchy discussed in section 2, we present the object reuse support provided by our database. The reuse of objects in our system is based on the concept of object groups. An object group is a collection of objects that serve as a basic unit in a presentation. For example, a piece of presentation showing the history of computers, consisting of several frames associated with a number of resources, can be defined as a reusable object. This piece of presentation can then be reused in several computer related presentations. Two types of object groups are defined in the database: the frame groups and the resource groups. A frame group or a resource group will become a reusable object stored in the database, if the group is so declared by the user via our graphical user interface. After the declaration, an object group becomes an object class. These frame object and resource object classes are reused when instantiated. Before an object group can be stored as an object class in the database, some links must be discarded while some links will be maintained. For the frames in a frame group, the usage (or inheritance) links are divided into two parts: the internal usage (or inheritance) links and the external usage (or inheritance) links. An internal usage (or inheritance) link has its source and

destination frames both in the same frame group. An external usage (or inheritance) link, on the other hand, has its destination frame outside the frame group. When a frame group becomes a frame object class, our system keeps the internal inheritance links, the internal usage links, and the aggregation links. But the system will discard all external links of the frame group. Similarly, when a resource group becomes a resource object class, our system keeps the internal association links and discards all external association links. The process of instantiation requires the allocation of memory or disk storage for the newly instantiated object group, and the re-establishment of external links to other objects in the presentation. For a frame group instantiation, the external usage links and the external inheritance links will be restored by the user. The associated resource groups used by the instantiated frame group are also reused, with the aggregation links kept intact. However, these aggregation links can be changed to use other resources. For a resource group instantiation, the external association links need to be given. An instantiation process creates a new object group with new links connected to other objects in the presentation. The instantiation process does not duplicate information that can be shared among instances, such as video binary data stored on the disk. In the following Z abbreviation definitions, GNAME is a group name specified in ASCII characters. We also declare resource groups and resource object classes as sets of resources. Frame groups and frame object classes are treated as sets of frames. A class database is thus declared as the Cartesian product of the non-empty set of resource object classes and the non-empty set of frame object classes. A multimedia presentation, on the other hand, is declared as the Cartesian product of the resource group set and the frame group set. A presentation database is a non-empty set of presentations. And finally, a multimedia database contains a non-empty set of presentation databases and a unique class database:

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

105

Next, we introduce some global database functions by two axiomatic descriptions. An axiomatic description introduces global variables or functions in the Z specification, with possible restrictions on their values. These functions allow the user to create, insert, delete, or update resource (or frame) group objects. Note that, in a Z specification, if p is a variable of the current state, p' represents the value of that variable at the next state. These database functions are used in schemata ManageResourceGroup and ManageFrameGroup, which states restrictions on the use of database objects. Note that, in Z, a schema introduces a named collection of variables and relationships among those variables. Also, if s is a set, #s represents the number of elements of that set. These axiomatic descriptions and schemata are given below:

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

106

Note that, the sign represents an unknown value, used here to indicate that the destinations of all external association links are discarded. The global function instantiate_resource_group instantiates a resource group from a resource object class. A resource object class is duplicated as a resource group. Attributes as well as BLOBs are shared and the association links are reused. The new resource group can be changed by adding new association links. New aggregation links can be constructed so that the new resource group is used by one or more frames. In the instantiation, the destinations are restored by the user via the graphical user interface.

Operations of object classes can be defined in a similar manner. The reuse of database objects is described by four axiomatic descriptions of Z. In the global function make\_resource\_class, a resource group in the presentation database is duplicated as a resource object class in the class database. Resource attributes and Binary Large OBjects (i.e., BLOBs, such as the video data) are shared between the group and the class. The structure of the resource group (i.e., association links) is reused. make\_resource\_class takes as input a resource group and produces a resource object class, as specified in the following axiom:

In the same manner, frame object classes and frame groups are defined and instantiated. However, different type of links are discarded and restored:

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

107

is reused. In instantiate_frame_group, a frame object class is duplicated as a frame group. Attributes are shared and the inheritance links are reused. The new frame group can be changed by adding new inheritance links. New aggregation links need to be constructed so that the new frames in the group can use other resources. The above axiomatic descriptions give the reuse semantics of presentation objects. In the following subsection, we discuss examples of object reuse. These axiomatic descriptions are used in the examples. Finally, we use the following schema to define the construction and reuse process of presentations. As shown in between two horizontal lines leading by a name, schema ConstructPresentation holds a multimedia presentation mmp in domain PRESENTATION and a multimedia database mdb, where the presentation extracts presentation resources and frames. The two instantiation functions instantiate_resource_group and instantiate_frame_group are used in creating the presentation. Similarly, schema ReusePresentation presents the reuse semantics:

In make_frame_class, a frame group in the presentation database is duplicated as a frame object class in the class database. Frame attributes are shared between the group and the class. The structure of the frame group (i.e., inheritance links)

Storage Management of the Database

In this section, we present an overview of the database storage management, which includes memory management and disk storage

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

108

management. Procedures accessing the disk are given with the analysis of their space and time complexities. Memory anagement is used to run a presentation. A presentation contains a number of object groups (frame groups and resource groups). Each object group is a set, represented by a dynamic array, that contains addresses of frames or resource descriptors. Object classes are also represented using dynamic arrays. A DAG (Directed Acyclic Graph) is used to store frames and the inheritance links among them. At the resource object level, a digraph with bidirectional pointers (association links) is used to store resource descriptor addresses. Each resource descriptor contains a resource file name. The binary resource data is loaded at run time. This strategy avoids the dynamic memory from being over used by the huge amount of binary data. Pointers (aggregation links) to resource descriptors are stored in a frame for the frame to access its resources. The disk storage is rather complicated. The database server (MDBMS) allows multiple databases. Two types of databases are allowed: the presentation database (i.e., P.Database) and the object class database (i.e., C.Database). Each database has two files: a data file and an index file. A database may store a number of presentations or object classes. Each presentation contains several pointers to frame groups and resource groups. Each object group (frame or resource) contains a number of chained records. Similarly, an object class has a number of chained records. These records of resource groups (or resource object classes) are pointers to the BLOBs and attributes of multimedia resources, which can be shared. The index file has two types for presentation indices (P. Indices) and object class indices (C. Indices). Each part is a hashing table that contains data file offsets and other information, such as locking statuses. 4.1 Space Complexity We estimate the space complexities of memory and disk in this section. In section 4.2, procedures and time complexities are given. 4.1.1 Memory Usage We define some terms representing sizes of database elements and the average number of items in a composed object (e.g., frame group): PDm: the size of general presentation information

Fm: the size of a frame Rm: the size of a resource descriptor #F: the average number of frames in a presentation #R: the average number of resource descriptors in a presentation FGDAm: the size of a frame group dynamic array RGDAm: the size of a resource group dynamic array #FG: the average number of frame groups in a presentation #RG: the average number of resource groups in a presentation Pm: the size of a presentation FCDAm: the size of a frame object class dynamic array RCDAm: the size of a resource object class dynamic array FCm: the size of a frame object class RCm: the size of a resource object class The amount of memory used can be calculated from the equations below: Pm = PDm + #F * Fm + #R * Rm + #FG * FGDAm + #RG * RGDAm.. Also, FCm = #F * Fm + FCDAm, and RCm = #R * Rm + RCDAm. 4.1.2 Disk Usage

Similarly, the amount of disk space used is described in terms of: PDd: the size of general presentation information on disk FGd: RGd: Pd: the size of a frame group on disk the size of a resource group on disk the size of a presentation on disk

#P: the average number of presentations in a database #FC: the average number of frame object classes in a database #RC: the average number of resource object classes in a database FCd: the size of a frame object class on disk

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

109

RCd: disk PId: CId:

the size of a resource object class on the size of a presentation index file the size of a class index file

of object groups. Complexity: O (n) x O (j ) (where j is the number of objects in a group). To create, insert, delete, or update objects in an object group or an object class, one needs to: 1. change or create dynamic arrays of object groups or object classes. Complexity: O (1) (create), O (j ) (insert, delete, and update, where j is the number of objects in a group or a class). change or create data of individual frames or resources if necessary. Complexity: O (1) (create, insert, delete, and update). update hashing tables of presentations or object classes. Complexity: O (1) (if table is not full), O (n) x O (j ) (if table is full, where n is the number of object groups). update chained records. Complexity: O (1) (if record is not overflow), O (n) x O (j ) (if record is overflow).

MDBd: the size of a multimedia database on disk We have, FGd = FCm, and RGd = RCm, and Pd = PDd + #FG * FGd + #RG * RGd. Moreover, FCd = FGd, and RCd = RGd, PId = #P * 1.2 , and CId = (#FC + #RC) * 1.2, MDBd = PId + CId + #FC * FCd + #RC * RCd + #P * Pd Note that, twenty-percent extra space is used in a hashing table. 4.2 Time Complexity

2.

3.

The storage management of the database requires a number of operations. We present some of the most important operations here. To load a presentation from the disk, five steps are taken: 1. locate the presentation via hashing table. Complexity: O (1) (if table is not full), O (k) x O (n) (if table is full, where k is the number of presentations, n is the number of object groups in each presentation). read presentation and object group data from the chained records to memory. Complexity: O (n). set the dynamic array for group relations. Complexity: O (n) x O (j ) (where j is the number of objects in a group). build inheritance links among frames. Complexity: O (n) x O (j ) x O (m) (where m is the number of links in an object). build association links among resources. Complexity: O (n) x O (j ) x O (m). build aggregation links among frames and resources. Complexity: O (n) x O (j ) x O (m)

4.

The following steps makes an object class from an object group: 1. locate hashing address of the new object class, and update the hashing table of object class. Complexity: O (1) (if table is not full), O (j ) (if table is full, where j is the number of objects in a class). copy data from the object group to the new object class. Complexity: O (j ). discard external links. Complexity: O (j ) x O (m) (where m is the number of links in an object).

2.

2. 3.

3.

4.

5. 6.

The following steps instantiate an object group from an object class: 1. locate hashing address of the presentation where the new object group was inserted. Complexity: O (1) (if table is not full), O (k) x O (n) (if table is full, where k is the number of presentations, n is the number of object groups in each presentation). locate chained record space for the new object group. Complexity: O (1) (if space is not overflow), O (k) x O (n) (if space is overflow). update presentation data and presentation hashing table. Complexity: O (1).

To save a presentation, the following steps are necessary: 1. update hashing table of presentations. Complexity: O (1) (if table is not full), O (k) x O (n) (if table is full, where k is the number of presentations, n is the number of object groups in each presentation). update presentation data and chained records 2.

3.

2.

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

110

4.

copy data from the object class to the new object group. Complexity: O (j ) (where j is the number of objects in a group or a class). interactively restore all external links. Complexity: O (j ) x O (m) (where m is the number of links in an object).

5.

Comparison and Evaluation

We compare our system to other multimedia database approaches [29, 5, 20, 13, 11]. Table 1 summarizes a comparison of our proposed MDBMS and others. All MDBMSs use an object-oriented approach in design of the database. This points out that object orientation seems natural for managing multimedia information. Besides our implementation, the work discussed in [5] also implements the system from the scratch. Others either rely on an existing object-oriented DBMS or an object manager. None of the above multimedia databases specifically focuses on reusability, which is the main strength of our system. Most systems are portable. Portability could be achieved either by re-compilation, or through use of a standard specification, such as CORBA. Some standards are used in many MDBMSs discussed, however, the variability is substantial 3 . Most systems allow object composition/decomposition, but they all take a different approach. Regarding the performance issue -- since it is an interactive process to create a presentation, after the presentation is designed, a resource descriptor is linked to a multimedia resource on the disk. Therefore, the run-time performance of BLOB retrieval is reasonable (i.e., the same as regular disk access of BLOBs). In searching for resources, with a small number of reusable objects, the searching mechanism performs reasonably. The insert/delete operation to different levels of objects in the database is also performed efficiently. The MDBMS proposed in [29] supplies a multimedia class library at the client site of a client-server environment. The database management system has the ability of data transmission. Thus, the client site uses the class

Regarding to the issue of following standards, we use standard file formats of MS Windows. However, this is not the strength of our system.

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

111

library to store information on the server site. The work discussed in [5] has an object-oriented data model allowing object composition/decomposition, which supports a limited reuse mechanism. The MDBMS for news-on-demand applications discussed in [20] has a multimedia type system, which provides a limited object composition mechanism. However, the news-on-demand MDBMS focuses on a query mechanism to retrieve news from a large base of multimedia information. Other MDBMS systems [11, 13] are based on object-orientation, but no discussion of object reusability is focused in these articles. As discussed in previous sections, our MDBMS provides a prototype-based reuse mechanism that allows objects to be reused easily. We use an event-based synchronization in our system. Upon receiving a message (sent as the result of an event), a window will respond to the message by showing some actions. We did not deal with intra-stream, or inter-stream synchronizations simply because the system runs on a stand alone computer instead of run across the network (e.g., distributed multimedia presentations may require

an inter-stream synchronization solution). We use the standard AVI (Audio Video Interleaving) format for video resources, so the intra-stream synchronization is provided. However, if an animation resource and a MIDI resource are played simultaneously, the result may be different if the presentation is running on multimedia personal computers of different performances. We need to face the inter-stream synchronization (or point synchronization and lip synchronization) problems when we are extending the system to a distributed environment. Our early experience shows that most users are satisfied with the database functions. It is not difficult to understand the hierarchy from the perspective of building a multimedia presentation. Our test database contains several presentations with about 500 resource files. For the small amount of objects in the test database, it is not difficult for the database server to search for particular objects the user specifies in queries. However, we have not yet tested this database server using a large number of objects.

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

112

Conclusions

In spite of the successful implementation of our database server and a few applications that we have built utilizing the server, there are a number of improvements that we are considering as our future research. Firstly, we are extending the server to a distributed environment. Due to the physical transmission rate limitation on the network (e.g., a typical Ethernet), some multimedia resource data are difficult to transmit within constraints for real time presentations. For this reason, we are now extending our system with:

Formal specification of the database is then presented. This database is implemented on Windows 954. Finally, our reuse mechanism allows the user of our system to organize and reuse their presentation components easily. We hope the proposed mechanism provides a contribution to the development of multimedia databases in the literature of multimedia computing.

Acknowledgement
I would like to thank Dr. Ruth E. Davis at Santa Clara University, California, U.S.A. for her careful proofreading of the manuscript and her many suggestions in the organization of this paper.

A centrally controlled Multimedia Resource Server (MRS) A number of distributed Resource Facsimile Servers (RFS) A mechanism for network transmission

References
[1]. Anthony Gargaro, et al. "Reusability Issues and Ada," IEEE Software, July 1987, pp 43 -51. [2]. Atsuo Yoshitaka, Setsuko Kishida, Masahito Hirakawa, and Tadao Ichikawa, "Knowledge-Assisted Content-Based Retrieval for Multimedia Database," IEEE Multimedia Magazine, Winter 1994, pp 12 -21. [3]. Bruce A. Burton, et al. "The Reusable Software Library," IEEE Software, July 1987, pp 25 -- 33. [4]. Chi-Ming Chung, Timothy K. Shih, Jiung-Yao Huang, Ying-Hong Wang, and Tsu-Feng Kuo, "An Object-Oriented Approach and System for Intelligent Multimedia Presentation Designs," In Proceedings of the IEEE International Conference on Multimedia Computing and Systems, 1995, pp 278--281. [5]. C.Y. Roger Chen and Dikran S. Meliksetian and Martin Cheng-Sheng Chang and Larry J. Liu, "Design of a multimedia object-oriented DBMS," Multimedia Systems, Vol. 3, 1995, Springer-Verlag, pp 217--227. [6]. Enn Tyugu. Three New-Generation Software Environments," Communications of the ACM, 34, 6, 1991, pp 46 -- 59. [7]. Enn Tyugu, et al. "NUT -- an object-oriented
4

The MRS contains multimedia information such as resource data and multimedia presentation scripts. We take a centralized control strategy. All resources or presentations are created or designed in an instructor multimedia station. Other stations are associated with RFSs, which serve as partial database mirrors to store information that cannot be transmitted in real time, for instance, a video file. When a presentation is viewed by an application at the instructor multimedia station, only control information (i.e., messages) is transmitted. Thus, distributed multimedia CAI (Computer Aided Instruction) or distance learning is possible. The transmission is controlled by the instructor station. For instance, some multimedia resources may be broadcast to student multimedia stations ahead of time before the instructor is about to present his/her lecture. We are also looking at the semantic modeling of multimedia presentations. As indicated in [30] , the temporal properties of multimedia resources and presentations need to be considered in the semantic model. We are using interval temporal logic to express the temporal properties of multimedia resources and solving the problems of application level synchronization. Another area of our future work is to investigate other database indexing techniques for the fast retrieval of multimedia data. The contributions of this paper are, first, we propose an object-oriented database hierarchy with multimedia object attributes carefully defined.

Our future version of database will run under the Windows NT server.

Huan-Chao Keh and Timothy K. Shih : Formal Specification in Software Reuse Designs:an Object-Oriented Database Example

113

language," Computer and Srtificial Intelligences, Vol. 5, No. 6, 1986, pp. 521 -542. [8]. Gail E. Kaiser, et al. "Melding Software Systems for Reusable Building Blocks," IEEE Software, July 1987, pp 17 -- 24. [9]. Gerhard A. Schloss and Michael J. Wynblatt, "Presentation Layer Primitives for the Layered Multimedia Data Model," in Proceedings of the IEEE 1995 International Conference on Multimedia Computing and Systems, May 15-18, ashington DC, 1995, pp 231 -- 238. [10].Gerhard Fischer. "Cognitive View of Reuse and Redesign," IEEE Software, July 1987, pp 60 -- 72. [11].Heiko Thimm, Ulrich Marder, Gunter Robbert, and Klaus Meyer-Wegener, "Distributed Multimedia Databases as Component of a Teleservice for Workflow Management," in Proceedings of the 1996 Pacific Workshop on Distributed Multimedia Systems, June 25 -28, Hong Kong, 1996, pp 111 -- 117. [12].Henda H. B. Ghezala, et al. "A Reuse Approach Based on Object Orientation: Its Contributions in the Development of CASE Tools," in Proceedings of the SSR'95 conference, Seattle, WA, U.S.A., pp 53 -- 62. [13].Ivan L. M. Ricarte and Carlos M. Tobar, "Towards an Architecture for Distributed Multimedia Databases," in Proceedings of the 1996 IASTED/ISMM International Conference on Intelligent Information Management Systems, June 5 -- 7, Washington, D.C., USA, 1996, pp 65 -- 68. [14].J. A. Rody and A. Karmouch, "A Remote Presentation Agent for Multimedia Database," in Proceedings of the IEEE 1995 International Conference on Multimedia Computing and Systems, May 15-18, Washington DC, 1995, pp 223 -- 230. [15].J. Michael Spivey, The Z Notation: A Reference Manual. International Series in Computer Science. Prentice Hall, 1989. [16].James F. Allen"Maintaining Knowledge about Temporal Intervals," Communications of the ACM, Vol. 26, No. 11, 1983. [17].James M. Bieman, et al. "Reuse Through Inheritance: A Quantitative Study of C++ Software,'' in Proceedings of the SSR'95

conference, Seattle, WA, U.S.A., pp 47 -- 52. [18].James M. Mieman, et al. "Cohesion and Reuse in an Object-Oriented System," in Proceedings of the SSR'95 conference, Seattle, WA, U.S.A., pp 259 -- 262. [19].Keh-Feng Lin, Chueh-Wei Chang, and Suh-Yin Lee, "Design of an Interactive Video Database," in proceedings of the 1994 HD-Media Tech. and Application workshop, Taipei, Taiwan, pp PO2-17--PO2-22. [20].M. Tamer Ozsu and Duane Szafron and Ghada El-Medani and Chiradeep Vittal, "An object-oriented multimedia database system for a news-on-demand application", Multimedia Systems, Vol. 3, 1995, Springer-Verlag, pp 182--203. [21].M. Vazirgiannis and C. Mourlas, "An Object-Oriented Model for Interactive Multimedia Presentations". The Computer Journal, 36(1), 1993. [22].Manfred Lenz, et al. "Software Reuse through Building Blocks," IEEE Software, July 1987, pp 34 -- 42. [23].Philip Johnson. "Supporting Exploratory CSCW with the EGRET Framework Emerging Technologies for Cooperative Work," in Proceedings of ACM CSCW'92 Conference on Computer-Supported Cooperative Work, 1992, pp 298 -- 305. [24].R. Staehli, J. Walpole, and D. Maier. "A quality-of-service specification for multimedia presentations". Multimedia Systems, Springer-Verlag, 3, 1995, pp 251 -263. [25].Raymond Paul, M. Farrukh Khan, Ashfaq Khokhar, and Arif Ghafoor, "Issues in Database Management of Multimedia Information," in proceedings of the 18th IEEE annual international computer software and application conference (COMPSAC'94), Taipei, Taiwan, 1994, pp 209 -- 214. [26].Ruben Prieto-Diaz. "Implementing Faceted Classification for Software Reuse," Communications of the ACM, 34, 5, 1991, pp 88 -- 97. [27].Ruben Prieto-Diaz, et al. "Classifying Software for Reusability," IEEE Software, July 1987, pp 6 -- 16. [28].S. Gibbs, "Composite Multimedia and Active Objects". ACM Object-Oriented Prog. System,

Tamkang Journal of Science and Engineering, vol.1, No. 2, (1998)

114

Languages, and Application, pp 97 -- 112, 1991. [29].Te-Chih Chen, Wei-Po Lin Chin-An Wu, and Chih-Shen Shen, "A Client-Server Database Enviornment for Supporting Multimedia Applications," in proceedings of the 18th IEEE annual international computer software and application conference (COMPSAC'94), Taipei, Taiwan, 1994, pp 215--220. [30].Thomas D. C. Little and Arif Ghafoor, "Synchronization and Storage Models for Multimedia Objects," IEEE Journal on Selected Areas in Communications, Vol. 8, No. 3, April, 1990, pp 413--427. [31].Timothy K. Shih, "An Artificial Intelligent Approach to Multimedia Authoring," in proceedings of the second IASTED/ISMM international conference on distributed multimedia systems and applications, Stanford, California, August 7-9, 1995, pp 71--74. [32].Timothy K. Shih, Chin-Hwa Kuo, Huan-Chao Keh, Chao T. Fang-Tsou, and Kuan-Shen An, "An Object-Oriented Database for Intelligent Multimedia Presentations," in proceedings of the 1996 IEEE International Conference on Systems, Man and Cybernetics, Beijing, China, October 14 -- 17, 1996. [33].Timothy K. Shih, Steven K. C. Lo, Szu-Jan Fu, and Julian B. Chang, "Using Interval Temporal Logic and Inference Rules for the Automatic Generation of Multimedia Presentations," in Proceedings of the IEEE International Conference on Multimedia Computing and Systems, 1996, pp 425 -- 428. [34].Will Tracz. "Software Reuse Myths," ACM SIGSOFT Software Engineering Notes, Vol. 13, No. 1, Jan. 1988, pp 17 -- 21.

Manuscript Received: Oct. 14, 1998 Revision Received: Nov. 23, 1998 and Accepted: Nov. 23, 1998

Вам также может понравиться