[Date Prev][Date Next]
Re: Can there be any hierarchy in attributes (ITS#896)
NOTE: Moved discussion from ITS to software list.
> I am new to openldap . As far as I understand the attributes for an
> object is stored in a flat manner. Can the attributes be stored in an
> hierarchal manner ??
An entry can be a branch.
2. dn=trunk=main, o=Tree
3. dn=branch=3,trunk=main, o=Tree
4. dn=arm=6,branch=3,trunk=main, o=Tree
All of these are separate entries, and all can have their own attributes.
> Ex: Suppose I am storing information about hotels in my city, and I want
> to check whether a double room is available in any hotel. Can someone
> please suggest a suitable way of doing this ??
Er.. not the best use for LDAP (this sounds like a relational DB might
be better), but see explanation above for data model. You could walk
> As far as I understand the object hotel should have an attribue Rooms,
> which should have two leaves say single and double, and then I store the
> number of available rooms at each of the leaf. got the idea??
You're almost there. You just need to abstract the attributes away
from the parents, and place them on the children, which each have their
own entries in ldap.
and their children:
But now you're adding a pretty heavy churn, where you're doing a
great deal of updating to keep it all current (which is why you
might want to use an RDBMS, instead.)
Brought to you from iBop the iMac, a MacOS, Win95, Win98, LinuxPPC machine,
which is currently in MacOS land. Your bopping may vary.