Académique Documents
Professionnel Documents
Culture Documents
ÄåäïìÝíùí
1 2 1
Efty
hia Koletsou , Kostas Stefanidis , Marina Drosou , Evaggelia Pitoura
1
1
Dept. of Computer S
ien
e, University of Ioannina, Gree
e. {ekoletso, mdrosou, pitoura}
s.uoi.gr
2
Dept. of Computer S
ien
e and Engineering, Chinese University of Hong Kong, Hong Kong. kstef
uhk.edu.hk
Abstra
t| Óå áõÞí çí åðßäåéîç ëïãéóìéêïý ðáñïõóéÜ- returns a set of results Res(Q) in the form of tuples, possibly
æïõìå éò Ymal óõóÜóåéò, Ýíá ðëáßóéï åñãáóßáò ðïõ åðåêåßíåé produ
ed by joining several relations of D. Besides Res(Q), we
á ó÷åóéáêÜ óõóÞìáá âÜóåùí äåäïìÝíùí ìå ëåéïõñãéêüçá would like to lo
ate and re
ommend to users a set of tuples
óõóÜóåùí. ÓõãêåêñéìÝíá, ðñïåßíïõìå, ìáæß ìå á áðïåëÝ-
óìáá ìßáò åñþçóçò, íá óõóÞíïõìå óï ÷ñÞóç åðéðëÝïí that may also be of interest to them. We
all this set of tuples
áðïåëÝóìáá ðïõ ïíïìÜæïõìå \You May Also Like" Þ Ymal \You May Also Like" tuples or Ymal results. We denote this
áðïåëÝóìáá. éá íá õðïëïãßóïõìå á Ymal áðïåëÝóìáá set as Ymal(Q).
ãéá ìßá óõãêåêñéìÝíç åñþçóç, ÷ñçóéìïðïéïýìå åßå ìüíï ï To
ompute Ymal re
ommendations, we exploit the
ontent
ðåñéå÷üìåíï ïõ áðïåëÝóìáïò çò åñþçóçò (ïðéêÞ ðñïóÝã-
ãéóç) åßå êáé ï ðåñéå÷üìåíï çò âÜóçò äåäïìÝíùí (êáèïëéêÞ and s
hema of the
urrent query result and database instan
e.
ðñïóÝããéóç). We
onsider an SPJ query Q of the form:
sele
t A from R where P1 AND P2,
I. Introdu
tion
R denotes a set of relations of D, A a set of attributes
The typi
al intera
tion of a user with a database system is {A1 ; : : : ; An } of the relations of D, P1 the
onjun
tion of the
by formulating queries. This intera
tion mode assumes that join
onditions for Q and P2 the
onjun
tion of the remaining
users are to some extent familiar with the
ontent of the sele
tion
onditions for Q. For pro
essing re
ommendation
database and also have a
lear understanding of their infor- requests, we re-write the submitted query Q into a set of queries
mation needs. However, as databases get larger and a
essible referred to as Ymal queries. An Ymal query is of the form:
to a more diverse and less te
hni
ally-oriented audien
e, a new sele
t B from S where P.
\re
ommendation"-oriented form of intera
tion seems attra
- In the following, we will show our query re-writing me
hanism
tive and useful. for
omputing B, S, and P. This me
hanism is based on either
In this paper, motivated by the way re
ommenders work, (i) lo
al analysis of the intrinsi
properties of the result Res(Q)
we
onsider \re
ommending" to the users tuples not in the or (ii) global analysis of the properties of the database D.
results of their queries but of potential interest. For instan
e, The union of the results of Ymal queries
onstitute the Ymal
when asking for movies with dete
tives, we
ould re
ommend re
ommendations, or Ymal(Q).
movies with poli
emen as well. When looking for drama movies Next, we des
ribe the main
omponents of the ar
hite
ture
produ
ed in England with Os
ar nominations, we
ould also of our system. A high level representation is depi
ted in Fig. 1.
re
ommend similar movies with BAFTA awards. We
all su
h On
e a query Q is submitted, we
ompute its a
tual result set.
results \You May Also Like" or Ymal results for short. Ymal Using the query results, we
onstru
t a set of Ymal queries
results are useful be
ause they let users see other tuples in the by re-writing Q. The results of these queries
orrespond to the
database that they may be unaware of. Ymal results.
Extending database queries with re
ommendations has also Attribute Sele
tion Generator. This
omponent takes as input
been suggested in two very re
ent works, namely [2℄ and [1℄. the submitted query Q and returns the attributes B that will ap-
[2℄ proposes a general framework and a related engine for the pear in the sele
t
lause of the Ymal queries. In a lo
al-based
de
larative spe
i
ation of the re
ommendation pro
ess, while approa
h, where only Res(Q) is employed, all Ymal queries
here, instead, we propose a spe
i
re
ommendation method for have the same sele
t
lause whi
h
ontains all attributes B
relational databases. Re
ommendations in [1℄ are based on the that appear in the
onditions P2 of the initial query.
past behavior of similar users whereas we
onsider the
ontent
of the database. A preliminary version of our re
ommendation In a global-based approa
h, where the
ontent of the
fun
tionality is presented in [3℄. database is also taken into a
ount, we use a spe
ial sele
t
In this demonstration paper, we brie
y des
ribe Ymal re
-
lause. We simply
onstru
t this
lause by removing from the
ommendations for relational databases and present the ar
hi- set of attributes appearing in the relations of the from
lause
te
ture of our system for pro
essing re
ommendation requests of the under-
onstru
tion Ymal query, the non-informative
(Se
tion II). We also des
ribe our demonstration of Ymal attributes, su
h as the primary and foreign key attributes
re
ommendations for a relational movies database system (Se
-
ontaining meaningless values.
tion III). Relation Sele
tion Generator. This
omponent takes as input
the query Q and returns the relations S that will appear in the
II. Ymal Re
ommendation System Overview
from
lause of the Ymal queries. In the lo
al-based approa
h,
Assume a relational database system D and a set of users S = R, while in the global-based approa
h, S is a superset of
intera
ting with it by posing traditional sele
t-proje
t-join R. To
ompute S, we maintain
orrelations among relations. A
(SPJ) queries. Given a query Q, a typi
al database system relation Ri is
orrelated to a relation Rj with a s
ore p that
Fig. 1. Ymal system ar
hite
ture.
re
e
ts the result size of their join. This way, we
onstru
t S by
adding to R the k most
orrelated relations to those in R, where
k is determined by an input
ardinality
onstraint. The higher
the s
ore p of a relation, the more
orrelated the relation.
Constraint Sele
tion Generator. This
omponent generates the
sele
tion
onditions that the Ymal queries
ontain taking as
input both Q and Res(Q). Again, we distinguish between two
ases; sele
tion
onditions are lo
ated either with respe
t to a
lo
al analysis of the intrinsi
properties of the result Res(Q),
or based on a global analysis of the properties of the database
D.
In the former
ase, given a query Q with attributes A =
{A1 ; : : : ; Am } appearing in the relations R, we rst
ompute the
power-set A∗
onsisting of all subsets of A. Then, the sele
tion
operator
onstru
ts the Ymal queries'
onstraints with respe
t
to A∗ .
Denition 1: Given a query Q, its attribute power-set A∗
and the result set Res(Q), the sele
tion operator outputs, for
ea
h set of attributes of the form {Ai ; : : : ; Aj } in A∗ , a sele
tion
ondition of the form:
Ai = aix AND : : : AND Aj = ajy ,
Fig. 2. Query results and Ymal re
ommendations.
where aix ∈ dom(Ai ), ajy ∈ dom(Aj ) and the set of values
{aix ; : : : ; ajy } is the most frequently appeared value set in MySQL. Implementation on top of an existing database system
Res(Q) for {Ai ; : : : ; Aj }. has a number of advantages, su
h as portability and ease of
For ea
h sele
tion
ondition that is returned by the sele
tion implementation. Our system
an be a
essed via a simple web
operator, a dierent Ymal query is
onstru
ted. browser using an intuitive GUI.
In the latter
ase, sele
tion
onditions are generated taking We demonstrate our method using a movies database. Users
into
onsideration not only the query results but also statisti
s
an submit their queries via SQL or by employing available
maintained for the database
ontent. In parti
ular, for ea
h input forms. After exe
uting the query, users are presented with
attribute set in A∗ , we lo
ate the relative value set V that the results of the query and also a set of Ymal results (Fig. 2).
appears frequently in both Res(Q) and D using the formula: An explanation is also provided along with ea
h Ymal result,
freqRes(Q) (V) where f req Res(Q) (V) denotes the number of o
- i.e. how this spe
i
re
ommendation is related to the original
freqD (V) query result. At rst, we present one result tuple of ea
h YMAL
urren
es of V in Res(Q) and f req D (V) denotes the number of
o
urren
es of V in D. query. If the user
li
ks on this, more tuples from the result of
this Ymal query appear as well.
Ymal Query Generator. In this step, we
onstru
t the Ymal
queries. To perform this operation, we employ the outputs of Referen
es
the previous steps. This
omponent is also responsible for iden- [1℄ G. Chatzopoulou, M. Eirinaki, and N. Polyzotis. Query re
-
tifying the join
onditions for ea
h generated query. Ymal(Q) ommendations for intera
tive database exploration. In SSDBM,
onsists of the union of results of the produ
ed Ymal queries. 2009.
[2℄ G. Koutrika, B. Ber
ovitz, and H. Gar
ia-Molina. Flexre
s: Ex-
III. Demonstration pressing and
ombining
exible re
ommendations. In SIGMOD,
2009.
We have implemented our system for
omputing a set of [3℄ K. Stefanidis, M. Drosou, and E. Pitoura. \you may also like"
re
ommended results for a given query in Java on top of results in relational databases. In PersDB, 2009.