On Sat, Dec 27, 2008 at 1:23 AM, Jesús Quiroga <[email protected]> wrote:
> The second way to access the data store that is usually considered is
> the 'indirect' one:
>
>    [wiki] <--- wikiDataL ---> [polyglot translator]
>
>    [polyglot translator] <--- mysDataL ---> [mysql]
>    [polyglot translator] <--- posDataL ---> [postgresql]
>    [polyglot translator] <--- db2DataL ---> [db2]
>
> Here, wikiDataL means 'some relational data definition and manipulation
> language suitable for use by the wiki'.

This is what we currently use, and I don't think we're going to
seriously consider changing it without some very compelling arguments
being presented.  Incremental improvements to our current way of doing
things (cutting back on raw queries, moving MySQL-specific stuff from
Database to DatabaseMySql, defining more clearly what Database methods
mean and avoiding undefined behavior) seem entirely sufficient to
allow support for any number of additional database backends.

> The differences between wikiDataL and wikiNeedL are mainly these:
>   - wikiNeedL would contain just enough wiki concepts to express the
> wiki's needs, so it's effectively confined to that domain. wikiDataL
> belongs to the relational data model domain, which is quite different.
>   - in general, wikiNeedL would have different semantics than the
> dialects understood by the databases, so the translation step becomes
> more like interpretation, rather than just syntactic transformations.
> wikiDataL usually has the same semantics than the dialects.
>   - wikiNeedL would contain just enough concepts to satisfy current
> needs, and will be open to extension. wikiDataL aims to be
> general-purpose and to fulfill current and future needs.

In practice, wikiNeedL would be drastically more complicated, if I
understand you correctly.  Its basic semantic units would be things
like articles, users, revisions, etc., instead of rows, columns, and
tables.  We *have* a wikiNeedL, in fact: it's called "calling the
appropriate Article method" or whatever.  Most code doesn't have to
manually do queries.  Further abstraction of the database queries
would be possible, but I question its usefulness.
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to