Each suffix has its own rootdn/rootpw. So assuming that you actually wrote a "dbd" backend (or perhaps mean "bdb"?), I think that would be a perfectly valid slapd.conf segment.
If you're looking for companya to write to companyb, or vice versa, see the slapd.access(5) man page.
On Thu, 21 Dec 2006, Rudy Setiawan wrote:
database dbd suffix "dc=companya,dc=com" rootdn "cn=CompanyAManager,dc=companya,dc=com" rootpw {SSHA}as98dyasdhasiduhasiudhashdas directory /var/lib/ldap/companya
database dbd suffix "dc=companyb,dc=com" rootdn "cn=CompanyBManager,dc=companyb,dc=com" rootpw {SSHA}aoshdsadhsaodasdhasdhasih directory /var/lib/ldap/companyb