|
WebGuide Data Structure
Introduction
WebGuide is a Collaborative Knowledge-Building Environment (CoKBE) developed at the University of Colorado by Gerry Stahl and colleagues. Its distinctive feature is "perspectives", a mechanism for associating notes with individuals and groups. This document describes the Design Rationale behind the WebGuide data structure and provides the following representations of the WebGuide data structure: · eXtensible Markup Language (XML) · MySQL table creation commands
Design Rationale (DR)
The general design of data in a WebGuide
Space includes Nodes, Links, Information (about users, groups and database
tables), Content (of Nodes), Positions and Transactions. Spaces are distinct databases of information used by different WebGuide applications. Nodes contain attributes that are common to all data elements in WebGuide and are necessary for identification and display. Basically, everything in a WebGuide Space is represented as a Node, except for relations among Nodes, which are represented as Links. There are many different kinds of Nodes, distinguished by their Node_Kind attribute. Each Node can have a textual name and description. It is tagged with information about when it was created, by whom and in which Perspective. If there is additional information associated with the Node, then there is a reference to a record within a supplementary Content table. Note that "Nid" refers to the unique identifier of a Node. Much system information is encoded in Nodes rather than being hard-coded in global constants. Thus, the Nodes table serves multiple purposes, including storing the defined Node_Kinds, Link_Types, and definitions of Perspectives, People, Groups and Tables used within the definition of a Node itself. This approach allows for dynamic changes to these lists (e.g., new Link_Types) by end-users. It also makes all data relative to Perspectives and tagged by author for uniform filtering and searching. For an example, see the test data in the XML document below. Links define relationships between pairs of Nodes. This information is stored separately from the Node information so that Links can be used bi-directionally without duplication of information and so that they can be searched efficiently. There are several different types of Links, distinguished by their Link_Type attribute. Information is supplementary Node information for People, Groups, Tables. Tables
contains a coded representation of the structure of additional database tables,
including tables with supplementary node information and other user-defined
tables. Content is supplementary Node content for Statements, Decisions, Books, Multimedia, Objects, Email. Positions define the (X, Y) coordinates of a Node in a Perspective for a graphical display. Transactions
track events, such as changing Perspective, creation of a new Node or Link,
logging in a new Person. This table logs events for research about system usage;
it maintains usage data. It can be used to compute which notes were displayed
for which users. eXtensible
Markup Language – Document Type Definition (XML DTD)
<?xml version="1.0"?> <!-- WEBGUIDE version 1.2 XML data structure --> <!-- created 5/25/99 by GerryStahl --> <!-- revised 6/04/99 by GerryStahl --> <!-- contact: Gerry.Stahl@Colorado.edu --> <!-- to run in DOS, cd d:\program files\xml --> <!-- msxml wg.xml -d1 -o wg.out -p --> <!-- following is the Document Type Definition: --> <!DOCTYPE SPACE [ <!-- SPACE is a database containing a webguide knowledge SPACE --> <!ELEMENT SPACE EMPTY > <!ATTLIST SPACE SID ID #REQUIRED NAME CDATA #REQUIRED DRIVER CDATA #REQUIRED URL CDATA #REQUIRED USERNAME CDATA #REQUIRED PASSWORD CDATA #REQUIRED DBMS CDATA #REQUIRED COMMENT CDATA #IMPLIED > <!-- NODE is an element of information in a SPACE --> <!ELEMENT NODE EMPTY > <!ATTLIST NODE NID ID #REQUIRED KIND IDREF #REQUIRED PERSPECTIVE IDREF #REQUIRED SUPTABLE IDREF #IMPLIED CONTENT IDREF #IMPLIED NAME CDATA #REQUIRED DESCRIPTION CDATA #IMPLIED AUTHOR IDREF #REQUIRED CREATED CDATA #REQUIRED EDITOR IDREF #IMPLIED MODIFIED CDATA #IMPLIED > <!-- LINK is a relation between two NODEs in a SPACE --> <!-- this definition conforms to the XLINK recommendation--> <!ELEMENT LINK EMPTY > <!ATTLIST LINK XML:LINK CDATA #FIXED "extended" INLINE (true | false) "false" ROLE CDATA #IMPLIED TITLE CDATA #IMPLIED SHOW (replace | new | embed) #IMPLIED ACTUATE (auto | user) #IMPLIED BEHAVIOR CDATA #IMPLIED CONTENT-ROLE CDATA #IMPLIED CONTENT-TITLE CDATA #IMPLIED LID ID #REQUIRED TYPE IDREF #REQUIRED PERSPECTIVE IDREF #REQUIRED SEQ CDATA #IMPLIED AUTHOR IDREF #REQUIRED CREATED CDATA #REQUIRED > <!-- FLOCATOR is the location of a NODE From which a LINK is defined --> <!-- this definition conforms to the XLINK recommendation--> <!ELEMENT FLOCATOR EMPTY > <!ATTLIST FLOCATOR XML:LINK CDATA #FIXED "locator" HREF IDREF #REQUIRED ROLE (from | to) "from" > <!-- TLOCATOR is the location of a NODE To which a LINK is defined --> <!-- this definition conforms to the XLINK recommendation--> <!ELEMENT TLOCATOR EMPTY > <!ATTLIST TLOCATOR XML:LINK CDATA #FIXED "locator" HREF IDREF #REQUIRED ROLE (from | to) "to" > <!-- INFORMATION includes People, Groups and Tables --> <!-- PERSON is a user --> <!ELEMENT PERSON EMPTY > <!ATTLIST PERSON ID ID #REQUIRED NID IDREF #REQUIRED USERNAME CDATA #REQUIRED PASSWORD CDATA #REQUIRED PERSPECTIVE IDREF #REQUIRED FULLNAME CDATA #IMPLIED FIRST CDATA #IMPLIED MIDDLE CDATA #IMPLIED LAST CDATA #IMPLIED EMAIL CDATA #IMPLIED HOMEPAGE CDATA #IMPLIED GENDER CDATA #IMPLIED COLOR CDATA #IMPLIED WORK_PLACE CDATA #IMPLIED WORK_TITLE CDATA #IMPLIED HOME_PHONE CDATA #IMPLIED WORK_PHONE CDATA #IMPLIED > <!-- GROUP is a team of users --> <!ELEMENT GROUP EMPTY > <!ATTLIST GROUP ID ID #REQUIRED NID IDREF #REQUIRED PASSWORD CDATA #IMPLIED REPRESENTATIVE IDREF #IMPLIED EMAIL CDATA #IMPLIED HOME_PERSPECTIVE IDREF #IMPLIED > <!-- TABLE is an auxilliary database table --> <!ELEMENT TABLE EMPTY > <!ATTLIST TABLE ID ID #REQUIRED NID IDREF #REQUIRED FIELD0 CDATA #REQUIRED FIELD1 CDATA #IMPLIED FIELD2 CDATA #IMPLIED FIELD3 CDATA #IMPLIED FIELD4 CDATA #IMPLIED FIELD5 CDATA #IMPLIED FIELD6 CDATA #IMPLIED FIELD7 CDATA #IMPLIED FIELD8 CDATA #IMPLIED FIELD9 CDATA #IMPLIED FIELD10 CDATA #IMPLIED FIELD11 CDATA #IMPLIED FIELD12 CDATA #IMPLIED FIELD13 CDATA #IMPLIED FIELD14 CDATA #IMPLIED FIELD15 CDATA #IMPLIED FIELD16 CDATA #IMPLIED FIELD17 CDATA #IMPLIED FIELD18 CDATA #IMPLIED FIELD19 CDATA #IMPLIED > <!-- CONTENT incl. Statements, Decisions, Books, Multimedia, Objects, Email --> <!-- STATEMENT is a textual note --> <!ELEMENT STATEMENT EMPTY > <!ATTLIST STATEMENT ID ID #REQUIRED NID IDREF #REQUIRED STATEMENT CDATA #REQUIRED > <!-- DECISION is a yes or no negotiation decision --> <!ELEMENT DECISION EMPTY > <!ATTLIST DECISION ID ID #REQUIRED NID IDREF #REQUIRED DECISION CDATA #REQUIRED RATIONALE CDATA #IMPLIED > <!-- MULTIMEDIA is a URL for a multimedia file --> <!ELEMENT MULTIMEDIA EMPTY > <!ATTLIST MULTIMEDIA ID ID #REQUIRED NID IDREF #REQUIRED MEDIUM CDATA #IMPLIED URL CDATA #REQUIRED > <!-- OBJECT is a URL for a Java object --> <!ELEMENT OBJECT EMPTY > <!ATTLIST OBJECT ID ID #REQUIRED NID IDREF #REQUIRED CLASS CDATA #IMPLIED URL CDATA #REQUIRED > <!-- EMAIL is an email message --> <!ELEMENT EMAIL EMPTY > <!ATTLIST EMAIL ID ID #REQUIRED NID IDREF #REQUIRED RECIPIENT CDATA #REQUIRED SENDER CDATA #REQUIRED SUBJECT CDATA #REQUIRED THREAD CDATA #IMPLIED CONTENT CDATA #REQUIRED > <!-- POSITION is coordinates of a Node in a graphic display --> <!ELEMENT POSITION EMPTY > <!ATTLIST POSITION ID ID #REQUIRED NID IDREF #REQUIRED PERSPECTIVE IDREF #REQUIRED X CDATA #REQUIRED Y CDATA #REQUIRED > <!-- TRANSACTION is an event in a SPACE --> <!ELEMENT TRANSACTION EMPTY > <!ATTLIST TRANSACTION ID ID #REQUIRED TYPE IDREF #REQUIRED PERSPECTIVE IDREF #REQUIRED FROMNODE IDREF #REQUIRED TONODE IDREF #IMPLIED AUTHOR IDREF #REQUIRED CREATED CDATA #REQUIRED > ]> <!-- following is some test data for the WebGuide XML DTD --> <!-- this defines the information space with the test data --> <SPACE SID="sid1" NAME="Readings '99" DRIVER="JDBC" URL="http://webguide.cs.colorado.edu/" USERNAME="gerry" PASSWORD="*****" DBMS="mysql" COMMENT="for Spring Semester 1999 Seminar" > <!-- this Node defines the Node_Kind "node_kind" --> <NODE NID="nid1" KIND="nid1" PERSPECTIVE="nid8" NAME="node_kind" DESCRIPTION="node_kind" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Node_Kind "link_type" --> <NODE NID="nid2" KIND="nid1" PERSPECTIVE="nid8" NAME="link_type" DESCRIPTION="link_type" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Node_Kind "perspective" --> <NODE NID="nid3" KIND="nid1" PERSPECTIVE="nid8" NAME="perspective" DESCRIPTION="perspective" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Node_Kind "author" --> <NODE NID="nid4" KIND="nid1" PERSPECTIVE="nid8" NAME="author" DESCRIPTION="author" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Node_Kind "statement" --> <NODE NID="nid5" KIND="nid1" PERSPECTIVE="nid8" NAME="statement" DESCRIPTION="statement" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Link_Type "child" --> <NODE NID="nid6" KIND="nid2" PERSPECTIVE="nid8" NAME="child" DESCRIPTION="child" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Link_Type "add_statement" --> <NODE NID="nid7" KIND="nid2" PERSPECTIVE="nid8" NAME="add_statement" DESCRIPTION="add_statement" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Perspective "gerry's perspective" --> <NODE NID="nid8" KIND="nid3" PERSPECTIVE="nid8" NAME="gerry's perspective" DESCRIPTION="gerry's perspective" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines the Author "gerry" --> <NODE NID="nid9" KIND="nid4" PERSPECTIVE="nid8" NAME="gerry" DESCRIPTION="gerry" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines a Statement with name and description = "my first node" --> <NODE NID="nid10" KIND="nid5" PERSPECTIVE="nid8" NAME="my first node" DESCRIPTION="my first node" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines a Statement with name and description = "my second node" --> <NODE NID="nid11" KIND="nid5" PERSPECTIVE="nid8" NAME="my second node" DESCRIPTION="my second node" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Node defines a Statement with name and description = "my third node" --> <NODE NID="nid12" KIND="nid5" PERSPECTIVE="nid8" NAME="my third node" DESCRIPTION="my third node" AUTHOR="nid9" CREATED="05251999" ></NODE> <!-- this Link defines a Child relation between Nodes nid10 and nid11 --> <LINK LID="lid1" TYPE="nid6" PERSPECTIVE="nid8" AUTHOR="nid9" CREATED="05251999" > <FLOCATOR HREF="nid10" > </FLOCATOR> <TLOCATOR HREF="nid11" > </TLOCATOR> </LINK> <!-- this Link defines a Child relation between Nodes nid11 and nid12 --> <LINK LID="lid1" TYPE="nid6" PERSPECTIVE="nid8" AUTHOR="nid9" CREATED="05251999" > <FLOCATOR HREF="nid11" > </FLOCATOR> <TLOCATOR HREF="nid12" > </TLOCATOR> </LINK> <!-- this Statement defines an entry in the Statements table with text for Node nid10 --> <STATEMENT ID="id1" NID="nid10" STATEMENT="my first node" ></STATEMENT> <!-- this Statement defines an entry in the Statements table with text for Node nid11 --> <STATEMENT ID="id2" NID="nid11" STATEMENT="my second node" ></STATEMENT> <!-- this Statement defines an entry in the Statements table with text for Node nid12 --> <STATEMENT ID="id3" NID="nid12" STATEMENT="my third node" ></STATEMENT> <!-- this Position defines an entry in the Positions table with coordinates for Node nid12 --> <POSITION ID="id4" NID="nid12" PERSPECTIVE =" nid8" X="37" Y="242" ></POSITION> <!-- this Transaction defines an entry in the Transactions table for an add_statement transaction --> <TRANSACTION ID="tid1" TYPE="nid7" PERSPECTIVE="nid8" FROMNODE="nid10" AUTHOR="nid9" CREATED="05251999" ></TRANSACTION> <TRANSACTION ID="tid2" TYPE="nid7" PERSPECTIVE="nid8" FROMNODE="nid11" AUTHOR="nid9" CREATED="05251999" ></TRANSACTION> <TRANSACTION ID="tid3" TYPE="nid7" PERSPECTIVE="nid8" FROMNODE="nid12" AUTHOR="nid9" CREATED="05251999" ></TRANSACTION> </SPACE>
Backus-Naur
Form (BNF)
[note: “x-ref”
is a reference to the nid of a particular <node> of kind = x.] <space> = <node> | <space> <node> | <space> <link> | <space> <detail> | <space> <position> | <space> <transaction> <node>
= int, kind-ref, perspective-ref, detail-ref, int, text, text, person-ref,
timestamp, person-ref, timestamp <link> = int, <link_type>, perspective-ref, node-ref, node-ref, int, person-ref, timestamp <detail> = <information> | <content> <link_type> = “edit” | “delete” | “deletelink” | “synonym” | “parent” | “isa” | “vcopy” | “vchild” <information> = <person> | <group> | <table> <content> = <statement> | <decision> | <book> | <multimedia> | <object> | <email> <person> = int, node-ref, person-ref, text, perspective-ref <group> = int, node-ref, text, text, perspective-ref, text, text, text, text, text, text, text, text, text, text, text, text <table> = int, node-ref, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int <statement> = int, node-ref, text <decision> == int, node-ref, (“yes” | “no”), text <book> = int, node-ref, text, text, text, text, text, text, text, text, text, text <multimedia> = int, node-ref, text, (gif file url | jpeg file url | sound clip url | video clip url) <object> = int, node-ref, text, url <email> == int, node-ref, text, text, text, text, text <position> == int, node-ref, perspective-ref, int, int <transaction> = int, type-ref, perspective-ref, node-ref, node-ref, person-ref, timestamp
Relational
Database Schema
Spaces:
Nodes:
Links:
People:
Groups:
Tables:
Statements:
Decisions:
Books:
Multimedia:
Objects:
Email:
Positions:
Transactions:
MySQL Table
Creation Commands
Spaces
"create table spaces ( sid bigint(21) DEFAULT '0' NOT NULL auto_increment, name varchar(100), driver varchar(100), url varchar(100), username varchar(100), password varchar(100), dbms varchar(100), comment varchar(255), PRIMARY KEY (sid) )"; Nodes
"create table nodes ( nid bigint(21) DEFAULT '0' NOT NULL auto_increment, kind bigint(21) DEFAULT '0' NOT NULL, perspective bigint(21) DEFAULT '0' NOT NULL,suptable bigint(21) DEFAULT '0' NOT NULL, content bigint(21), name varchar(100), description varchar(255), author bigint(21), created timestamp(14), editor bigint(21), modified timestamp(14), PRIMARY KEY (nid), KEY (kind), KEY (perspective), KEY (table) )"; Links
"create table links ( lid bigint(21) DEFAULT '0' NOT NULL auto_increment, type bigint(21) DEFAULT '0' NOT NULL, perspective bigint(21)DEFAULT '0' NOT NULL, fromnode bigint(21) DEFAULT '0' NOT NULL, tonode bigint(21)DEFAULT '0' NOT NULL, seq int(11), author bigint(21), created timestamp(14), PRIMARY KEY (lid), KEY (type), KEY (perspective), KEY (from), KEY (to) )"; People
"create table people ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), username varchar(20), password varchar(20), perspective bigint(21), fullname varchar(100), first varchar(20), middle varchar(20), last varchar(20), email varchar(100), homepage varchar(255), gender varchar(4), favorite_color varchar(20), work_place varchar(100), work_title varchar(100), home_phone varchar(20), work_phone varchar(20), PRIMARY KEY (id) )"; Groups
"create table groups ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), password varchar(20), representative bigint(21), email varchar(255), home_perspective bigint(21), PRIMARY KEY (id) )"; Tables
"create table auxtables ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21) DEFAULT '0' NOT NULL, field0 int(11), field1 int(11), field2 int(11), field3 int(11), field4 int(11), field5 int(11), field6 int(11), field7 int(11), field8 int(11), field9 int(11), field10 int(11), field11 int(11), field12 int(11), field13 int(11), field14 int(11), field15 int(11), field16 int(11), field17 int(11), field18 int(11), field19 int(11), PRIMARY KEY (id), KEY (nid) )"; Statements
"create table statements ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), statement text, PRIMARY KEY (id) )"; Decisions
"create table decisions ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), decision varchar(100), rationale text, PRIMARY KEY (id) )"; Books
"create table books ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), author varchar(100), year varchar(4), title varchar(100), editor varchar(100), journal varchar(100), issue varchar (4), location varchar (100), website varchar (255), description text, abstract text, keywords varchar (255), PRIMARY KEY (id) )"; Multimedia
"create table multimedia ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), medium varchar(100), url varchar(255), PRIMARY KEY (id) )"; Objects
"create table objects ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21), class varchar(100), url varchar(255), PRIMARY KEY (id) )"; Email
"create table email ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21) DEFAULT '0' NOT NULL, recipient varchar(255), sender varchar(255), subject varchar(255), thread varchar(255), content text, PRIMARY KEY (id) )"; Positions
"create table positions ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, nid bigint(21) DEFAULT '0' NOT NULL, perspective bigint(21) DEFAULT '0' NOT NULL, x bigint(21) DEFAULT '0' NOT NULL, y bigint(21)DEFAULT '0' NOT NULL )"; Transactions
"create table transactions ( id bigint(21) DEFAULT '0' NOT NULL auto_increment, type bigint(21) DEFAULT '0' NOT NULL, perspective bigint(21)DEFAULT '0' NOT NULL, fromnode bigint(21) DEFAULT '0' NOT NULL, tonode bigint(21)DEFAULT '0' NOT NULL, author bigint(21), created timestamp(14), PRIMARY KEY (id), KEY (type), KEY (perspective), KEY (from), KEY (to) )";
WebGuide
2000 permissions
X = button active or note kind displayed exceptions: Admin can use all buttons in all perspectives Guest cannot use buttons to discuss, propose, vote The preceding table determines the perspectives in which different kinds of notes can be created or manipulated. At the top of the tree display interface are buttons for each of the "perspectives" listed across the top of the preceding table – except for "other's perspective", which is selected from a pull-down list. For each perspective, the table shows which buttons are active. These buttons create the following kinds of nodes: discuss -> Discussion, propose -> Proposal, vote -> Decision, private note -> Private, new note -> Statement (or sub-kind of Statement). The lower part of the table shows the perspectives in which each of the kinds of notes is displayed. For instance, a viewer can always see Private notes that were authored by that viewer but can never see Private notes authored by others. One can view all of one's authored notes in one's own personal perspective. To achieve this, Discussion notes initiated in someone else's personal perspective or in the comparison perspective are actually created in the group perspective (under special headings if the selected note does not appear in the group perspective). One's Discussion, Proposal and Decision notes are then inherited from the group perspective and are displayed in one's own home perspective (but not in other personal perspectives). The effect of these rules is to change the effective perspectives hierarchy. The discussion and negotiation views are simply the group perspective, including the special node kinds. The archive view is the comparison perspective, including deleted notes. The viewer's individual perspective includes private notes authored by the viewer:
The Discuss Button: Discuss selected note from other's perspective or from comparison perspective: If Nid of selected note appears in group perspective, create a new node in group perspective and link it below that note in the group perspective. Else, virtual copy the selected note into the group perspective below "discussions" note and add a new note below it.
Go to top of this page Return to Gerry Stahl's Home Page Send email to Gerry.Stahl@drexel.edu This page last modified on January 05, 2004 |