I am setting up a business directory of contact persons and companies. I have this structure in mind:
ou=companies,dc=demo
cn=company1, ou=companies,dc=demo o: Company Name 1 ...
cn=company2, ou=companies,dc=demo o: Company Name 2 ...
ou=persons,dc=demo
uid=user1,ou=persons,dc=demo
cn: John Brown company: cn=company1, ou=companies,dc=demo o: Company Name 1 ...
uid=user2,ou=persons,dc=demo
cn: Jason Brown company: cn=company2, ou=companies,dc=demo o: Company Name 2 ...
My problem: if a company updates its name, it has to be updated in 2 places: the company record, and the person record. If company name change is only updated in ou=company1, the search for "finds all people working in ABC Co.ltd" would not work as expected.
Updating company names in 2 places causes 2 problems: 1: more work; 2: potentially the two doesn't match, then we have to align the records.
I wish to use dynlist for o attribute for the entries in ou=persons. But that means dynlist is used in thousands of records. Is this a proper practical use of dynlist?
Zhang Weiwu wrote:
I am setting up a business directory of contact persons and companies. I have this structure in mind:
ou=companies,dc=demo
cn=company1, ou=companies,dc=demo o: Company Name 1 ... cn=company2, ou=companies,dc=demo o: Company Name 2 ...
ou=persons,dc=demo
uid=user1,ou=persons,dc=demo cn: John Brown company: cn=company1, ou=companies,dc=demo o: Company Name 1 ... uid=user2,ou=persons,dc=demo cn: Jason Brown company: cn=company2, ou=companies,dc=demo o: Company Name 2 ...
My problem: if a company updates its name, it has to be updated in 2 places: the company record, and the person record. If company name change is only updated in ou=company1, the search for "finds all people working in ABC Co.ltd" would not work as expected.
Updating company names in 2 places causes 2 problems: 1: more work; 2: potentially the two doesn't match, then we have to align the records.
I wish to use dynlist for o attribute for the entries in ou=persons. But that means dynlist is used in thousands of records. Is this a proper practical use of dynlist?
This would not work because it seems search would not found an entry with attributes expended by dynlist. dynlist seems to work when the search is finished but not before.
back to the case mentioned in slapo-dynlist manual, if a search finds "cn=Dynamic List,ou=Groups,dc=example,dc=com" by using cn=*, and ask to return mail attributes, dynlist works.
if a search look for a particular email address, it would not return "cn=Dynamic List,ou=Groups,dc=example,dc=com" as one of the search results.
Zhang Weiwu zhangweiwu@realss.com writes:
Zhang Weiwu wrote:
I am setting up a business directory of contact persons and companies. I have this structure in mind:
[...]
back to the case mentioned in slapo-dynlist manual, if a search finds "cn=Dynamic List,ou=Groups,dc=example,dc=com" by using cn=*, and ask to return mail attributes, dynlist works.
if a search look for a particular email address, it would not return "cn=Dynamic List,ou=Groups,dc=example,dc=com" as one of the search results.
With dynamic lists it is up to the client to filter search results, as slapd just presents the results of the search initiated by the labeldURI
-Dieter
Zhang Weiwu zhangweiwu@realss.com writes:
I am setting up a business directory of contact persons and companies. I have this structure in mind:
[...]
My problem: if a company updates its name, it has to be updated in 2 places: the company record, and the person record. If company name change is only updated in ou=company1, the search for "finds all people working in ABC Co.ltd" would not work as expected.
Updating company names in 2 places causes 2 problems: 1: more work; 2: potentially the two doesn't match, then we have to align the records.
I wish to use dynlist for o attribute for the entries in ou=persons. But that means dynlist is used in thousands of records. Is this a proper practical use of dynlist?
It is not so much a matter of quantities but a matter search frequency. I have for example 2 dynamic lists with some 9k entries each and the search results are quite sufficient:
time ldapsearch -Y external -ZZ -H ldap://localhost -b "cn=dynamicgroup,o=avci,c=de" -s base "*"
real 0m2.236s user 0m0.028s sys 0m0.016s
But the search is done quite rarely. so it wouldn't have any influence on the overall performance, but if such a search would occur quite frequently, say a few searches every second, than this would have a bad influence on performance.
-Dieter
openldap-software@openldap.org