[horde] Fwd: [turba]: entity relation ship model of turba database
Jens Wahnes
wahnes at uni-koeln.de
Mon Feb 26 14:56:39 UTC 2018
Carsten <horde-groupware at familie-lahme.de> wrote:
> The main issue is, how to decide, whether an object is bound to a
> shareng or not.
> If I use just .share_owner, I always get the same output, regardless
> which share (phonebook) I select.
>
> If the user has more than one phonebook, there is a crypted value in
> turba_objects.owner_id, that points to turba_sharesng.share_id.
> But unless there is only one phonebook (shareng), the
> turba_shareng.share_owner is mapped.
>
> This seems somehow odd to me, if I view from ER-Model perspektive.
I don't think there is an ER schema available. If you find one or are
able reconstruct it in any way, please share it here.
I suppose the Horde developers would probably tell you to access that
information through some API and not on the database level.
If I recall correctly, however, you should be able to relate address
book entries to certain address books using the horde_histories table.
There should be a column that contains entries that look like this:
"appname:adressbookid:entryid" (yeah, this is not even 1NF). It could
be that I'm mixing this up with the ways things are for Kronolith, but
in general, you should be able to relate things through the
information given in the horde_histories table. It is possible to
construct JOIN statements (at least with MySQL/MariaDB) for this using
some "indexof"/"substr" magic, but this neither yields high
performance nor is it elegant in any way. You may still want to give
this a try if you are really desperate.
Jens
--
Jens Wahnes
Regionales Rechenzentrum der Universität zu Köln (RRZK)
Weyertal 121 · 50931 Köln · Lageplan: http://ukoeln.de/BDKS6
Tel. (0221) 470-89614
More information about the horde
mailing list