Database Reference
In-Depth Information
Sect. 7.3 . In this chapter, we focus on the challenge of capturing user-created data
and metadata, storing it in the database, making it available for querying, and
allowing controlled sharing among users. Since the idea of capturing user-created
content in databases may be received with some skepticism, Sect. 7.6 discusses
several issues that arise in giving users the possibility to generate content and add it
to the database. This is a new situation, and hence the consequences of using the
technology should be examined. Thus, we enumerate several possible objections to
the goals of the framework presented and present our answer to them. Finally,
Sect. 7.8 closes with some remarks on the ongoing development of the framework.
7.2 Basic Database Technology
A relational database can be seen as having two parts. The first one is a database
schema , that is, a collection of distinct table names and, associated with each name,
a table schema , a collection of attribute names which are assumed to be unique for
each table. Given relation T , the schema of T is denoted sch ( T ); and given (rela-
tional) database D , the schema of D is denoted sch ( D ). The second component of
the database is a database extension , that is, a set of tuples for each table in the
database. Such a set of tuples is expected to dynamically change over time. Hence,
the extension can be considered as a function from a linearly ordered set of time
values into the database schema, which associates a set of tuples with each table in
the schema. For table T , ext ( T ) denotes the extension of T at a fixed point in time.
Most of our analysis is static, but there are clearly some concepts that could (and
should) be extended to a dynamic viewpoint; this can be achieved by denoting the
extension of T at time t with ext ( T , t ). For the rest of the chapter, though, we stick to
the static view; we will say more about the dynamic view in Sect. 7.5.4 . Thus, given
database D , ext
Þ¼ S T2schðDÞ
.
We assume that each table has a primary key defined, and that foreign keys are
also defined as needed. We also assume that all tables in a database are connected
through primary key-foreign key connections. In other words, the graph created by
generating a node for each table, and adding an edge ( t 1 , t 2 ) between tables (nodes)
t 1 , t 2 if t 1 has a foreign key referencing t 2 is a connected graph.
By a relational query language, we mean SQL or the Relational Algebra
(henceforth
ð
D
ext
ð
T
Þ
) extended by a group by operator and basic aggregates (at least,
count ). Given a database D , a relational query q can be seen as a function from D
into a fixed relational schema, expressed in SQL or in
RA
. q ( D ) will denote
the result of applying q to ext ( D ), that is, the answer to q in D. 1 For a given query
q , rels ( q )
RA
sch ( D ) is the set of relation names used in q (that is, if q is an SQL
query, the relations in the FROM clause, including the FROM clauses of any
subquery).
1 Once again, a dynamic analysis will add a time component, as ext ( D ) changes over time.
Search WWH ::




Custom Search