[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Primary key equivalent in LDAP.



Yes, indeed that seems to have fixed the problem. I am not getting
duplicate record, when I use query

ldap://localhost/o=mycompany.com,c=US?downStreamminbandwidth?sub?(modemmacaddress=*)

However when I initialize the database using ldif2ldbm
it doesn't warn me that there are "duplicate" records. After reading man
page for ldif2ldbm there doesn't seem to be any flag... 

Is there any way  to figure out if ldif2ldbm had errors while creating
database, or encountered "duplictae" data? 

Thanks!

/Subodh

> At 12:15 PM 9/23/99 -0700, Subodh Nijsure wrote:
> >objectclass modemUser
> >        requires 
> >                objectclass
> >        allows
> >                modemMacAddress,
> >                downStreamMinBandwidth,
> >                downStreamMaxBandwidth,
> >
> >mycompany.at.conf looks like this --
> >attribute       modemMacAddress                 dn
> 
> >From your use, I would expect that cis would be a more
> appropriate syntax for modemMacAddress.
> 
> >Now I am creating database using following input file. 
> >
> >dn: o=mycompany.com,c=US
> >objectClass:organization
> >o:mycompany.com
> 
> 
> >dn: modemMacAddress="123", o=mycompany.com,c=US
> >objectClass:top
> >objectClass:modemUser
> >downStreamMinBandwidth:100
> >downStreamMaxBandwidth:200
> 
> missing:
> modemMacAddress: 123
> 
> (Note: modemMacAddress should not be of syntax DN if you are
> not going to store a DN in it).
> 
> 
> >dn: modemMacAddress="346", o=mycompany.com,c=US
> >objectClass:top
> >objectClass:modemUser
> >downStreamMinBandwidth:105
> >downStreamMaxBandwidth:300
> >
> >
> >The problem is -- I want to create the database so that 'modemMacAddress' 
> >should be the primary key i.e. there should be only one entry in the 
> >database for given modemAddress.
> 
> The "primary key" is the DN.  It must be unique.  However, 2
> entries (each with a unique DN) can have attributes with the
> same values (regardless of syntax).
> 
> >With this schema definition I am able to 
> >add multiple rows with same modemMacAddress.
> 
> Exactly.
> 
> >What am I doing wrong?
> 
> Confusing the DN syntax with the actual DN.
> 
> 
>