We currently use two types of objects (person and company). The o attribute at the person-level is populated through a COS based on the o attribute of the company he belongs to. Our challenge now, is to allow clients to query companies by company name. COS makes searches on o unindexed which is acceptable on a small dataset but impractical in production. A solution was thought of duplicating the o value at the company-level to the cn attribute and have applications query on cn to find companies.
Would there be any better solution, and if not, is there a way to enforce o and cn to always have the same value?