Database Reference
In-Depth Information
unique rowid. 4 This includes the Catalog tables, where the metadata is. Since the
reference may be a single cell (an attribute in a row), a single row, or a set of rows,
we create a separate table Refs to store rowids for a given referent.
The Value attribute can be a simple string (for tags and comments) or a
complex object (tuple). Tuples are stored in a separated table Values with
attributes Attribute and Value . This allows us to store any type of tuple
that the user may decide to store. Note that strings can also be stored here with a
special attribute tag or comment .
The type attribute can be stored simply as a string or even an enumerate type if
the system allows this.
Overall, then, the conceptual private view schema (Reference, Type,
Value) is stored in tables Private(refid, type, refval) , Refs
(refid,rowid) , and Values(refval, Attr,Val) . Tuple (r, t,
) in
the conceptual view represents the fact that the user attaches to the data in r some
content v of type t . This tuple is stored by generating tuples (ir, t, i
v
v
) , (ir, r), and (i
v
,a,
v
)
in tables Private , Refs, and Values , respectively, where
(ir, i
are foreign keys in
Refs and Values , respectively. Both Refs and Values have no proper
primary keys; that is, the whole schema of the table is the primary key.
v
) is the primary key in Private , while ir and i
v
l
If t (the type) is
- annotate , Values contains a tuple (iv,tag,st) where st is a string
with the tag or comment;
- meta or enrich , Values contains tuples (iv, At 1 ,Val 1 ),
l
...
,
,Val 1 ) to represent tuple (( At 1 , Val 1 ),
,( At n , Val n )).
(iv, At
...
n
- link , Values contains a tuple (iv, Link
,st) , where i
¼
1 and st is
i
a string representing a URL, or i
¼
2 and st is a file name in a local
3 and st is a file name in another machine (the file name
is preceded by a network name for the machine). The index in Link i . is
used to help the system determine how to handle the value in st (see next
subsection).
l Regardless of type, Refs contains tuples (iv,rowid) where rowid is one
of the identifiers in the referent.
directory, or i
¼
Note that a data tuple may have more than one item of user-created content
attached to it, since the user is not limited to attaching a single tag or comment to a
given data item. Also, the same tuple may be part of more than one referent (i.e., a
tuple may be in the answer set of more than one query and/or may be affected by
more than one write statement). Hence, the relation between data or metadata items
and user-created content is assumed to be many-to-many, and normalizing the
storage solves the problems of schemas like [ 6 ], which create a potentially large
number of nulls.
4 This is already the case in several commercial systems.
Search WWH ::




Custom Search