Are joins possible in LDAP queries?

2019-05-06 20:22发布

I've been doing some simple queries and so far things work. However, I would like to do a join between two objects. Does LDAP support joins like SQL does? How would an example join look like in a query? Do I have to execute multiple queries instead?

标签: java ldap
3条回答
欢心
2楼-- · 2019-05-06 20:56

The UnboundID Directory Server and the commercial edition of the LDAP SDK supports the JoinRequestControl, which provides functionality very much like a SQL join. Other than that, there is no support for a standardized JOIN in the LDAP specifications.

查看更多
叛逆
3楼-- · 2019-05-06 21:08

The equivalent functionality you're looking for in LDAP is achieved using the Deref control. It is not called a JOIN.

https://tools.ietf.org/html/draft-masarati-ldap-deref-00

As noted here https://www.ietf.org/mail-archive/web/ldapext/current/msg02210.html it is implemented in at least OpenLDAP and 389DS so it is already multi-vendor, with multi-implementation interoperability.

查看更多
太酷不给撩
4楼-- · 2019-05-06 21:18

Posting this as an answer, despite having accepted Terry's one, just for future references.

After doing some more research on the topic, I came across this excellent article explaining why LDAP could not and should not be used for joins and why LDAP is not relational like a proper RDBMS.

查看更多
登录 后发表回答