Hello.
I am setting up a business directory of contact persons and companies. I have this structure in mind:
ou=companies,dc=demo
o=company name 1, ou=companies,dc=demo o=company name 2, ou=companies,dc=demo ...
ou=persons,dc=demo
uid=user1,ou=persons,dc=demo
cn: John Brown o: company name 1 ...
uid=user2,ou=persons,dc=demo
cn: Jason Brown o: company name 2 ...
...
My problem: the system is multi-lingual, means each company can have multiple company names, and most of them do, because we are in a cross-culture location where each company must have two names. Thus maintaining correspondence between person's "o" value is a lot of work. The other trouble: If a company updates its name, all person records should update too.
My idea to solve this problem is to use dynlist, that is for each person the organization he works in is a dynamic list which returns the o attribute value of the company by referring to the company with URI.
Before I actually implement in this way I'd like to ask the list for wisdom. I 'invented' this solution by just looking at the manual of dynlist and not being aware if it brings some down-side (e.g. is the attribute that implements dynlist searchable? a.k.a. can I still search for Jason in "company name 2" with a single filter?) Anyway, do you think this solution works & is practical?
For your first problem, you might want to investigate your options with RFC 2596, which is implemented in OpenLDAP. If your clients are smart enough to localize output, then each company can store a name in every language and users would only see what they can read.
For your second problem, ie. where a company changes name... since the company name is in the DN of each company entry, that would mean deleting and replacing the company entry as well as changing DN values that point to it. Perhaps you need a company handle that doesn't change (e.g. o=company1234), and put the name(s) in another attribute.
Just some quick thoughts.
Jon Roberts www.mentata.com
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
o=company name 1, ou=companies,dc=demo o=company name 2, ou=companies,dc=demo ...
ou=persons,dc=demo
uid=user1,ou=persons,dc=demo cn: John Brown o: company name 1 ... uid=user2,ou=persons,dc=demo cn: Jason Brown o: company name 2 ...
My problem: the system is multi-lingual, means each company can have multiple company names, and most of them do, because we are in a cross-culture location where each company must have two names. Thus maintaining correspondence between person's "o" value is a lot of work.
openldap-software@openldap.org