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

Namespace Design Question



Greets,

I have a namespace design question.  I want to model my hospital campus using LDAP.  I have the following structure:

dn: o=sbgh
objectClass: organization
o: sbgh

dn: ou=locations,o=sbgh
objectClass: organizationalUnit
ou: locations

Now, in locations, I would like to model the campus.  The campus is a collection of buildings.  Each building has 1 or more floors.  Each floor has 1 or more rooms.

Now, I thought I could do this:

dn: ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: B

dn: ou=1,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: 1

dn: ou=1,ou=1,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: 1

dn: ou=2,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: 2

dn: ou=1,ou=2,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: 1

This is a collection of organizationalUnits representing physical locations.  However, in order to search by floor in ldapsearch, I would need to extend the LDIF to reflect the dn components as so:

dn: ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: B

dn: ou=1,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: B
ou: 1

/*  Building B, Floor 1, Room 1  */
dn: ou=1,ou=1,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: B
ou: 1
ou: 1

dn: ou=2,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: B
ou: 2

/*  Building B, Floor 2, Room 1  */
dn: ou=1,ou=2,ou=B,ou=locations,o=sbgh
objectClass: organizationalUnit
ou: B
ou: 2
ou: 1

So, I have 2 locations: Building B, Floor 1, Room 1 and Building B, Floor 2, Room 1.  However, it would be difficult for me to isolate floor 1 of building B, since it is an "ambiguous" ou that matches the room ou.  A search for ou=1 would return both results.

So, do I extend the schema to create "building", "floor" and "room" properties?  Do I create new classes?  Are there any other suggestions?  Are there schemas that already model this information?  Any information online that I can look at?  I am a relational database designer, and I am relying on that when modelling LDAP, which may be a good or bad thing.

Thanks for any help.

Thanks,
Jason


Jason Mowat - Systems Analyst
St. Boniface General Hospital
jmowat@sbgh.mb.ca
v. 204.235.3676
f. 204.237.6229