Discussion:
accessing metadata in mckoi
Johannes von Stetten
2006-07-13 13:46:18 UTC
Permalink
Hello,

I'm looking for some help in accessing metadata (foreing key and unique
key information) from within McKoi.

The background:
I'm a student in applied computer science at the university of augsburg,
germany, and for my diploma
thesis, I'm enhancing an application developed at our insitute.
This application is called Preference SQL, it enhances standard SQL
with the notion of preferences.
(One can for example state a query like
SELECT * FROM usedcars
WHERE make = 'Ford'
PREFERRING price AROUND 20000
AND HIGHEST(power)
PRIOR TO color IN ('red','blue')
for which I guess the meaning is quite obvious.)

The difference to standard SQL is that the conditions in the PREFFERING
clause don't have to be matched exactely, but rather are treated as soft
constraints. So if there's no exact match, the best matching entries are
returned. (I can give you more background about this if someone should
be interested :) ).

This was implemented as a prototype in an 'on top of the database'
version, and my task is it to implement the so called 'Preference
Engine' directly into McKoi.

Most of the work on the core engine is already done by now, and
preference parsing and evaluating from within McKoi is working very
fine. You can state such preference queries to mckoi via jdbc and the
contained preference is evaluated within the QueryPlan.
We're even implementing a full-scale query optimizer which up to now
looks quite promising.

One problem I couldn't figure out by now is how to comfortably access
the above mentioned metadata from within the core engine (This data is
needed for the optimizer).

I would need a simple way to check for a pair of columns, if these are
part of a foreign or unique key relation.

Alternativly it would be ok to create a list for a given set of tables,
which would contain all key relations in and between these tables.

It would be very helpful if someone could give me some tipps here.. :)


with regards,
Johannes von Stetten


---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to mckoidb-***@mckoi.com

Loading...