This invention relates to a method of providing a tree structured view on data items in a data base, which data items each are related to one or more object types, where each object type has any number of attributes.
Tree structured view or tree structures are widely used in all kinds of software applications. Examples are directory structures in file managers, menu systems comprising submenus, content organization in on-line documentation, etc. When tree structures are to be presented to a user, they are often represented as an indented list, starting with a non-indented root element (e.g. the main directory) on a first line followed by indented sub-elements each on a separate succeeding line. Each sub-element can have further sub-elements, which are shown just below the sub-element concerned at a next level of indentation.
Often, a user can expand or collapse individual elements to uncover or hide sub-elements of a particular (sub-) element. “Selecting” an element at any level often has some specific effect, e.g. in a file manager selecting a (sub) directory may cause displaying the files it contains in a separate window. Sometimes, selection of an element causes its expansion or another effect dependent on whether it has sub-elements. For example, selection of a menu item may cause displaying a submenu, or if there is no submenu, the invoking of a corresponding function.
The known tree-structures are generally predefined and use a predetermined subordination relation between objects in the tree. For example, most file managers are based on the concept of directories and subdirectories, and this subordination relation is visualized by means of a tree representation. Such trees may have an indefinite number of levels. More complex systems, such as hierarchical database systems, allow multiple object types in one tree structure, e.g. student data, course enrolment data subordinate to student data, and examination data subordinate to course enrolment data. Another example might be patient data, test data subordinate to patient data. . . . With these systems the data model used prescribes how the tree structures are defined and visualized to the user. The tree structures often have a fixed maximum depth, and users have only little influence on their definitions, typically the only options are to expand or collapse certain levels in the tree structure.
In modern, i.e. semantic or object oriented, database systems, complex relationships may exist between multiple object types, many of which relationships normally would not classify as subordinations relationships. This is in particular true for 1 :1 and n:m relationships (in that I :n relationships often, but not always, suggest some form of hierarchical organization of the object types). Still, a tree structure may be very useful to visualize such complex relationships to enable a user to explore and understand them.
In for instance a company database, it may be useful to produce a tree structure representation of the department objects or of project objects. Such view is typically hard coded in the application on top of the database system. Such coding is costly and time consuming and it is impossible to foresee all possible user needs. The resulting system thus offers little flexibility to the end user and new user needs have to be implemented by a database manager, typically an IT professional.
U.S. Pat. No. 6,341,280 B1 discloses an inline tree filter arranged to give a user defined view of a tree structure, where the inline tree filter can be applied to a traditional interface element, such as a hierarchical tree viewer. U.S. Pat. No. 6,341,280 B1 describes the provision of a technique that enables the user to choose selectively the data that he/she wishes to display, while not otherwise altering the behaviour and interaction of the tree viewer. However, the tree structure is fixed, and the filtering mechanism works to provide a filtered view of a selected part of the contents of the fixed tree structure. Even though this filtering could include removing or adding children nodes to the tree structure, U.S. Pat. No. 6,341,280 B1 does not provide a method of defining the tree structure itself.
It is therefore an object of the present invention to provide a method of the kind mentioned in the introduction, which method allows a user to define tree view representations.
This object is achieved when the method comprises the steps of representing at least one relationship between any object type and other object types related thereto in the data base as a link attribute, which link attribute is expandable, i.e. is related to an object type having one or more further attributes; presenting an object type and its attribute(s); providing the user with the possibility to expand any link attribute, so that one or more further attribute(s) of the object type related to the expanded link attribute(s) is (are) presented; providing the user with the possibility to define a view of data on the basis of the presented attribute(s); and displaying the data items related to attribute(s) in the user defined view of data.
Hereby, the user is not constrained to view data items in a database in a fixed structure, but can define a tree view representation of data items to be displayed. This also facilitates the work of data base managers, who no longer will have to attempt to foresee the user needs regarding display of data items.
One way of providing the user with the possibility to expand any link attribute is to display the link attribute in a manner which differs from the displaying of other kinds of attributes, and facilitating the expansion of the link attribute by clicking on the link attribute by means of a pointing device, such as a mouse.
One way of providing the user with the possibility to expand any link attribute is by enabling him/her to mark certain attribute(s) among the presented attribute(s), which certain attribute(s) relate to the data items to be shown. This possibility could e.g. be provided by means of checkboxes.
It should be noted that the term attribute includes basic attributes and link attributes, whereof basic attributes contain general information regarding the object type to which it is related and link attributes are relating one object type to one or more other object types. Examples of basic attributes could be “Name” and “Age”, and a link attribute of an object type “Person” might refer to the object type “Department” in the company the person is employed in. Whenever the term ‘attribute’ is used herein, it is meant to cover both basic and link attributes.
In a preferable embodiment of the method according to the invention, the method further comprises the step of providing the user with the possibility to select an object type to be presented as the root of the tree structured view. This provides a truly user definable view of data items in a data base.
According to a preferred embodiment of the method according to the invention further comprises the step of displaying the attributes of an object type in an indented view. This gives a clear overview of the data items displayed.
According to yet a preferred embodiment of the method according to the invention, the data items related to the attribute(s) are presented in a first part of a screen and the attribute(s) is (are) presented to the user on a second part of the screen. This facilitates the selection by the user of object types containing data items to be displayed and facilitates a well-arranged display of the data items.
Preferably, the method according to the invention is executed by use of a database model of the database.
Preferably, the method according to the invention is performed in a personal computer, a personal digital assistant, a set-top box or in a television. The displaying of the data takes place on a screen of the respective apparatus.
In a preferred embodiment the method according to the invention further comprises the step of providing the user with the possibility of defining a recursive view by marking a cyclic path through one or more link attributes. Hereby, a user can define a recursive view of data items.
The invention will be explained more fully below in connection with a preferred embodiment and with reference to the drawing, in which:
FIGS. 6 to 9 show examples for defining recursive database views according to the invention;
Throughout this description, like reference numerals refer to like elements.
FIGS. 6 to 9 show further alternative examples for defining database views according to the invention. In the examples described so far, the tree structures have a fixed number of levels. However, in many applications, such as directory structures, etc., tree structures can have an indefinite depth. The invention provides an elegant way of defining such so-called recursive views on a database.
In the view panel 20 in
The user may also choose to first expand a link attribute before defining a recursive view, which is depicted in
It's also possible to define recursion views via one link attribute while another link attribute at the same or higher level is expanded. Checking the checkbox in
Moreover, it is possible to define two or more recursions simultaneously. If for example the parents of a person were not represented by means of the attribute “Parents” but via two distinct attributes, “Father” and “Mother”, a user could check them both, causing a full family tree to be presented, which is shown in
It should be noted that the checking of checkboxes and marking of attributes to be displayed, expanded and/or displayed in a recursive view could be performed by any suitable means, such as a pointing device, e.g. a mouse, a cursor, a touch on a touch screen, etc.
Next, step 102, an object type and its attribute(s) are presented to the user, typically on a screen or display of an electronic device. Each link attribute can be expandable, which means that is contains one or more further attributes of the object type related to the link attribute. For instance a check box can indicate that a link attribute is expandable, or presenting the name of the link attribute as a hyperlink, but of course any other appropriate means can be used to indicate this.
In step 103 the user is allowed to expand any link attribute, for instance by providing check boxes to be checked by the user. In step 104, the user is allowed to define the view of data, (s)he wishes to see. This can be achieved by allowing the user to mark which attributes contains data items to be displayed. In a preferred embodiment, the method is performed in an electronic device with a display or screen, such as a personal computer, a personal digital assistant a set-top box or a television, and preferably the method according to the invention provides information in two distinct parts of the display or screen: one part is a data panel, wherein the data is displayed, and the other part is a view panel, wherein the attributes are shown. In the view panel the user can define the required view of data items, which is shown in the data panel in a well-arranged manner, step 105.
As noted above, the method according to the invention can be used with any type of database. In relational databases, an object type corresponds to a table, i.e. a record type, while attributes correspond to the table columns. A singular link attribute, i.e. an attribute referring to at most one object, may be straightforwardly defined to represent a table column which contains foreign keys of another table. A plural link attribute, i.e. an attribute referring to a set of objects, does not have a direct counterpart in the relational model. A plural link attribute may be defined for a table of which the primary key occurs as foreign key in another table. Effectively, a virtual column is added whose fields may contain multiple foreign keys. Plural link attributes may also be defined to represent relationships between three or more tables, for example if one of the tables is an auxiliary table to establish an m:n relationship.
Number | Date | Country | Kind |
---|---|---|---|
03103327.7 | Sep 2003 | EP | regional |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB04/51588 | 8/27/2004 | WO | 3/2/2006 |