But another use case is that also the public LDAP address books
provide groups (e.g. all students of class X) and these groups will
live in the LDAP directory and are read only.

However, the SQL address book could store group members from other
sources but it'll probably not get notified if one of these foreign
records is deleted in its original source. Another possibility is to
implicitly copy the LDAP contact into the SQL address book when adding
it to a group.

Both solutions seem a little ugly. I guess it's better not to mix ldap and sql sources. And I guess thats where Vladislav's remarks come in. If you want to mix SQL sources, it may be better to allow multiple sources in the current 'contacts' table.  Then mixing sql sources is trivial.  Wonder how mixing multiple LDAP sources would work :)

Cor