mail us  |  mail this page

products  |  company  |  support  |  training  |  contact us

ZYTRAX OPEN LOGO

Appendix A - LDAP - Some Notes on Structuring Directories

This note discusses structuring LDAP directories in very general terms. Directory structuring is a horribly contentious subject and books have been written on it. The following notes may help - or there again they may not.

We look at a simple address book example to isolate some general principles - but they could apply equally well to equipment records, catalogues or whatever.

Flat is Good

Directories in general are typically very flat in structure 2 or 3 levels of hierarchy are common - more than that are pretty unusual. While on first glance this seems a little counter intuitive to classic database guys remember LDAP is optimized to power ALONG a level rather than UP and DOWN a hierarchy. That is the whole reason for the powerful indexing methods.

A simple example may suffice to illustrate: When looking at a company and structuring a directory it's pretty obvious the first split is by department. BUT IS IT? The following diagrams show two ways to structure a directory.

LDAP - company directory

DIT 1 makes department an ou entry, DIT 2 makes department an ou attribute of entries under an ou of people. Sounds like a trivial difference.

Now lets look at finding some typical data:

  1. Find all the people in sales:

    1. DIT 1 - Search DN ou=sales,dc=mycompany,dc=com, scope - one level, filter cn=*

    2. DIT 2 - Search DN ou=people,dc=mycompany,dc=com, scope - one level, filter ou=sales

    About the same.

  2. Find all the people in the company:

    1. DIT 1 - Search DN dc=mycompany,dc=com, scope - sub (all levels), filter cn=*

    2. DIT 2 - Search DN ou=people,dc=mycompany,dc=com, scope - one level, filter cn=*

    Structure 2 wins - in speed and simplicity.

Lazy is Good

We'll stick with our structures and perform a simple task: Bill just moved from sales to marketing (a separate corporate department).

  1. DIT 1 - Export Bill's record to an LDIf file, delete it from sales, edit the LDIF file, ldapadd the record to marketing. And hope he does not do this too often.

  2. DIT 2 - modify Bill's ou attribute from sales to marketing.

Wonder who won that round.

So what's the Principle

Copyright © 1994 - 2012 ZyTrax, Inc.
All rights reserved. Legal and Privacy
site by zytrax
Hosted by super.net.sg
web-master at zytrax
Page modified: July 11 2011.

Contents

tech info
guides home
intro
contents
1 objectives
big picture
2 concepts
3 ldap objects
quickstart
4 install ldap
5 samples
6 config files
7 replicate & refer
reference
8 ldif
9 protocol
10 ldap api
operations
11 howtos
12 trouble
13 performance
14 ldap tools
security
15 security
appendices
notes & info
ldap resources
rfc's & x.500
glossary
ldap objects
change log

Creative Commons License
This work is licensed under a Creative Commons License.

If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Mozilla

web zytrax.com
add page to facebook add page to technorati.com add page to digg.com add page to del.icio.us add page to furl.net add page to stumbleupon add page to reddit.com mail this page feature print this page

RSS Feed Icon RSS Feed

Resources

Systems

FreeBSD
NetBSD
OpenBSD
DragonFlyBSD
Linux

Applications

OpenOffice
Mozilla
SourceForge
GNU-Free SW Foundation

Organisations

Open Source Initiative
Creative Commons

Misc.

Ibiblio - Library
Open Book Project
Open Directory
Wikipedia

printer friendly

Print Page

SPF Record Conformant Domain Logo