Electronic Proceedings of the
ACM Workshop on Effective Abstractions in Multimedia
November 4, 1995
San Francisco, California
Filtering Hypermedia Network
by Using View Mechanism
- Georges GARDARIN and Shim YOON
-
- PRiSM Laboratory
- University of Versailles Saint-Quentin
- 45 Avenue des Etats-Unis
- 78035 Versailles Cedex, FRANCE
- email: Georges.Gardarin@prism.uvsq.fr
-
http://www.prism.uvsq.fr/english/databases/geotropics/people/gardarin_us.html
- email: Shim.Yoon@prism.uvsq.fr
-
http://www.prism.uvsq.fr/english/databases/geotropics/people/yoon_us.html
Abstract
This paper presents a view mechanism for hypermedia databases that integrates the object-oriented view concept with the HyOQL hypermedia query language. The work presented in this paper shows that the hypermedia network filtering facility can be provided by using a view mechanism. We provide some improvements of existing view mechanism including : 1) Multiple views, 2) Selective automatic type closing, 3) Object and relationship creation, and 4) New user-defined methods.
Navigational access in hypermedia systems has proven to be insufficient when there are too many nodes in a network. In the domain of hypertext querying, graphical query languages such as G+ [Cruz89] and GraphLog [Consens89] permit to formulate a query by drawing graph patterns. Beeri and Koranatzky [Beeri90] have investigated a logical query language that allows both content-based and structure-based queries, supporting a rich set of quantifiers. Recently, the HyOQL [Gardarin94, Gardarin95] query language has been proposed as a more complete object-oriented hypermedia query language, being an extension of the standard OQL query language of the ODMG [ODMG93].
While these research efforts have extended the hypermedia query facilities, the hypermedia network filtering ability is often too restricted. Regarding a query language as a supplementary access mechanism to the navigation, we need to keep the hypermedia sub-network satisfying query criteria and filter out irrelevant information. In this sub-network, the users could locate the information of interest to them by navigation. The work presented in this paper shows that the hypermedia network filtering facility can be provided by using a view mechanism by integrating the view concept in the HyOQL.
The remainder of this paper is organized as follows. The next section presents briefly the hypermedia database model and the HyOQL query language, and in the following two sections, the view mechanism is explained by giving its definition language and by giving its functional description. The last section concludes the paper.
As our view mechanism is based on the HyOQL query language, we need to know about the HyOQL and the hypermedia database model upon which the language is designed.
Definition 1: A database Schema is a triple S = (C, R, P) where,
- C is a set of classes where a class c is a pair (T, M). T is the type of the class of the form [a1: t1, a2: t2,..., an: tn] where an is a name of an attribute and tn is a type of the attribute an. M is a set of methods.
- R is a set of Is_a relationships that is a subset of { c < c' | c, c'E C} where c < c' denotes that c is a c' meaning that c is a sub class of c' and c' is a super class of c.
- P is a set of persistence entry points.
Definition 2: A Hypermedia Database Schema is a database schema HS = (C, R, P) where,
- C is a set of classes. C = {c | Exist c=HyNode, Exist c=HyLink, Exist c=HyAnchor, c E C}. This means that there exist three predefined classes, HyNode, HyLink and HyAnchor in a set of classes of a schema.
- HyNode is a class of a pair of (T, M) where, T = [inlinks: {HyLink}, outlinks: {HyLink}] where the attribute inlinks is a set of incoming hyperlinks and the attribute outlinks is a set of outgoing hyperlinks from this class.
- HyLink is a class of a pair of (T, M) where, T = [srcanchors: HyAnchor, desanchors: HyAnchor] where the attribute srcanchor is a source anchor and the attribute desanchor is a destination anchor ,being both of type HyAnchor.
- R is a set of Is_a relationship. R = {c < c' | Forall c E C : (c' < HyNode)}. It means that the root class of any application class should be the HyNode class, providing for application classes to inherit from HyNode class capabilities.
For example, the database schema of the Figure 1 can be represented as S = (C, R, P) where, C = { Paper, Author, Abstract, Para, Comment }, Paper = ([title: string, author: {Author}, abstract: {Para}], M), Author = ([name: string], M), Para = ([text: string], M), Comment = ([result: string, text: {Para}], M), R = {}, and P = {Papers, Comments}.
The hypermedia database schema of this example is HS = (C, R, P) where, C = {HyNode, HyLink, HyAnchor, Paper, Author, Abstract, Para, Comment }, R = { Paper < HyNode, Author < HyNode, Abstract < HyNode, Para < HyNode, Comment < HyNode}, and P = {Papers, Comments}.
Figure 1: A Database Schema vs. A Hypermedia Database Schema
HyOQL query facilities are achieved by providing special link operators, additional quantifiers and the methods dealing with both content-based and structure-based access. The operations supporting queries are implemented in HyNode class. HyNode class is the class from which the user document classes inherit their common properties. This class models a node consisting of outgoing and incoming links to/from another node in a hypermedia document network. The following HyOQL query is to find all the paper nodes having at least two comments of "accept" and the comment nodes not having any incoming link. We used the backnodes and backlinks operations defined in the HyNode class to get the incoming nodes.
select p
from p in Papers
where atleast 2 c in p.backnodes: c.result = "accept"
and
not exists l in c.backlinks: true
Definition 3: HyView is a virtual hypermedia database schema HV = (VC, VR) where,
- VC is a set of virtual classes where a virtual class vc is a pair (vT, vM) where vT is the type of the virtual class and vM is a set of virtual methods.
- VR is a set of virtual Is_a relationship. VR = {vc < vc' | vc, vc' E VC}.
Figure 2 shows the syntax of the view definition language. The inherit statement defines the name of the super view. It means that an existing view can be used to define a new view resulting in a hierarchy of views like a hierarchy of classes. The type statement defines the type of a view. The methods statement specifies methods belonging to this view. The as statement is for the population of a view. We define a valid HyOQL query expression that will be executed whenever the view is used in as clause.
view view_name
[ inherit super_class_name]+
[ type type_definition]
[ methods method_list]]+
as
select select_clause
from from_clause
[where where_clause]
end
Figure 2: Syntax of the view definition language.
The functionalities of HyView mechanism can be characterized as follows.
- Multiple views can be defined with a unique query.
- Selective automatic type closing is chosen to complete schema reduction.
- Object and relationship creation permit to create new hypermedia nodes and hyperlinks in the basis of existing nodes.
- A view may be equipped with new user-defined methods. This feature allows the user to define specific methods for a view, including presentation methods.
Giving that the navigation is the principal retrieval method in hypermedia systems, query languages might be used as an auxiliary retrieval method. Query might be formulated to filter some information among a large information network, so that users can navigate in this filtered sub-network. However, with traditional view mechanisms that allow to have only one view not being able to have any relationship with another class, users can not really have a reduced vision of their hypermedia network.
Multiple views are provided for filtering hypermedia network and keeping hyperlinks between nodes in the filtered portion of network. Figure 3 illustrates a multiple view. The arrows represent hyperlinks between nodes. A user interested only in comments and papers can define a multiple view by referring the names of nodes, that is, comment and paper nodes. The user ignores the other nodes and his navigation scope will be in these two nodes.
Suppose that we want to extract a subnetwork of all papers having at least two "strongly accept" comments, and their associated comments. The appropriate view definition is as follows.
view PCview
type paper(p), comment(c)
as select p,c
from p in Papers,c in p.backnodes
where atleast 2 in c: c.note = "strongly accept"
end
Figure 3: Multiple View
The possibility of multiple views is the basis for schema reduction that is essential in filtering hypermedia network. But, in order to complete the schema reduction functionality, we need to consider another aspect. Suppose that Paper and Comment nodes reference paragraph nodes as in the base schema of the Figure 4. If a view is defined by defining the Paper and Comment nodes, what happens when users try to access to paragraph nodes? Should we allow to access this node or not? Even though the paragraph node is not mentioned explicitly in the view definition, it is more natural to let this node be visible to users because that is the parts of the paper or comment nodes. That is the type closure of a view introduced by Heiler [Heiler90] when he defined well-formed views.
Figure 4: Selective Type Closing
If we apply this type closure checking for any referenced nodes, all the hyperlinks outgoing from the nodes must be visible. The hyperlinking structure is expressed by the two attributes, inlinks and outlinks, in the HyNode class from which application classes inherit its properties. If the type closure is done automatically for this structure, all the outgoing nodes referenced by the outlinks attributes could be reached from the chosen node in the view. For example, in the Figure 4, Report, Thesis, and Note nodes could be accessed from Paper node. This choice, however, is not adequate to filter a sub-network since the hypermedia network can not be restrained in this way.
In our view mechanism, we do not enforce the closure property for hyperlinks so that the hypermedia network is limited by the boundary of the view. In the above example, the only hyperlinks permitted are the links between paper nodes and comment nodes. It means that even if there exist other hyperlinks from a paper node to a Report, a Thesis, and a Note, the access to these hyperlinks is not permitted.
We adopt in our view mechanism the automatic selective type closure checking, meaning that the choice whether the type closure should be ensured or not depends on the two types of links.
- For hierarchical links, the type closure is ensured. In the example of Figure 4, even the class Para is not explicitly defined in the view definition, this class must be accessible from the Paper or the Comment classes. If not, users can not display any contents of paper documents since no attribute of the class Paper is defined. To ensure type closure for the hierarchical structure, if there are the classes not defined explicitly in the view definition but used as types of another class, these missed classes are inserted in the view schema automatically. It means that the class Para will be inserted implicitly in the view schema even though they are not defined.
- For hyperlinks, the type closure is not ensured. No type closing for the hyperlinking structure makes invisible the classes that are not included in the view definition. With this choice, we achieve the goal of reducing hypermedia network.
We can create new nodes or new hyperlinks with our view mechanism. This facility allows us to create new hypermedia nodes and hyperlinks from the base hypermedia nodes. Figure 5 shows an example of a relationship creation.
These two views, AcceptedPaper and ConfInfo, defined with the base class Paper and Conf respectively do not have newly created objects because they restrict only part of the extent of the base classes. The objects of these views have the same object identifiers as the objects of base classes.
The new relationship is created from the view AcceptedPaper to the view ConfInfo. This is a hyperlink relationship. In the view definition, we have to redefine the attribute outlinks of the view by using a query that gets information about the conference where the paper is accepted.
Figure 5: Object and Relationship Creation
The visualization of the query results is an important aspect for completing the functionality of the view mechanism. This is not only a problem for hypermedia systems but also a problem for general object-oriented database systems. In relational database systems where the results of a query are in a table structure, the results can be displayed in a flat table on the screen. In object-oriented systems, however, where the results are complex objects, the display of results are not so evident. It is up to the system that what kind of displaying form it will choose.
To respond to the needs of multiple representation of a hypermedia network or complex objects, we can define new presentation methods in a view. We can define the methods in order to represent listing, tree, graph, and tabular form of presentation.
We presented a view mechanism for hypermedia databases that integrates the object-oriented view concept with the HyOQL hypermedia query language. In order to provide the hypermedia network filtering facility, our view mechanism is improved with four additional characteristics including 1) multiple views, 2) selective automatic type closing, 3) object and relationship creation, and 4) new user-defined methods.
- [Beeri90]
- C. Berri and Y. Koranatzky.
"A Logical Query Language for Hypertext Systems."
The First European Conference on Hypertext (ECHT),
Pages 67-80, INRIA, France, November 1990.
- [Consens89]
- M. P. Consens and A. O. Mendelzon.
"Expressing Structural Hypertext Queries in GraphLog."
Hypertext '89,
Pages 269-292, November 1989.
- [Cruz89]
- I. F. Cruz, A. O. Mendelzon, and P. T. Wood.
"G+: Recursive Queries Without Recursion."
In 2nd International Conf. on Expert Database Systems,
Pages 645-666. The Benjamin/Cummings Publishing Company Inc. 1989.
- [Gardarin94]
- G. Gardarin and S. Yoon.
"Modeling and Querying Structured Hypermedia Documents."
Technical Report, PRiSM Laborotory, University of Versailles,
Online document available at URL
file://ftp.prism.uvsq.fr/pub/reports/TR-1994/1994.051.ps.gz,
December 1994.
- [Gardarin95]
- G. Gardarin and S. Yoon.
"Object-Oriented Modeling and Querying of Hypermedia Documents."
DASFAA '95,
Pages 441-448, Singapore, April 1995.
- [Heiler90]
- S. Heiler and S. Zdonik.
"Object Views: Extending the Vision."
Data Engineering,
Pages 86-93, 1990.
- [ODMG93]
- Obect Database Management Group. "The Object Database Standard", Pre-Publication Version, July 1993.