IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New So, I have been dabbling...err
working on an LDAP schema that is (to be honest) a worrysome amount of data, just for the schema objects. I am trying to figure out how to make schema extension to cover ALL Commercial and other Directories. I want >95% compatibility/interoperability for eDIR, ADS, NIS/NIS+, DNS, SLP, Kerberos v5, SunONE/iPlanet, Oracle's OID, IBM's Tivoli DS and Nexor Directory. (prolly any other I can find too)

So, I look at what my choice in LDAP Server, OpenLDAP, uses for storing info, by default. Sleepycat DB4. Filesystem directory storage, HUH!?

OMFG! WAH?

Well, I want to use PostgresQL. Not just for the DB end of it, but for the relational features. I dunno if I this is wise, but it sure the hell makes more sense than the sleepycat stuff. Yes, I know the Sleepycat is mature, it is optimized... but come on.

So, now I have to think about a database schema now too. Sheesh enough with the schemas already.

So here goes with the Database schema only. And I would like some comments, remembering this is my first real "all by myself" data normalization attempt. Also, I haven't really paid much attention to POstgresql's limitations on indexing or what not, so these thing may change.

Data Entry table. This table holds the information the LDAP entries. This for assigning the UniqueID of an entry and to support LDAP_SCOPE_ONELEVEL and LDAP_SCOPE_BASE searching scopes. The parent and child table is in the entry table since all the other attributes are dependent on UniqueID. The columns for this table:
ColumnNameDescriptionIndexed?
UniqueIDThe UniqueID of the LDAP recordYes
ParentUniqueIDThe UniqueID of the parent LDAP record for the LDAP directory heirarchy schemeNo
DNThe distinguished name of the entryNo
DN_SHRTShort DN upto 150 characters of the DN for "meta" lookup Special
RecordDataEntries are stored using ASCII in the form of "attribute: value"
Non-ASCII OR binary values are base64 encoded
No
CreatorThe DN or UniqueID[link|#one|1] of the record creatorNo
create_timestampRecords the time when the entry was createdNo
ModifierThe DN or UniqueID[link|#one|1] of the last record modifier[link|#two|2]No
modify_timestampRecords the time when the entry was last modified[link|#two|2]No
Searchable Attribute table(s). There is one attribute table per searchable attribute.(e.g. 800 searchable attributes == 800 Atributes Tables named after the attribute, for scalability(I hope)) Each LDAP entry is assigned a unique identifier (UniqueID) by the store. The columns in this table are:
ColumnNameDescriptionIndexed?
UniqueIDThe unique identifier of the LDAP entryYes
AttribValueNormalized attribute valuesNo
ShrtAttribValueIf AttribValue is < 151 bytes then == AtrribValue,
If AttribValue is >= 151 bytes then == AtrribValue trunc @ 150 bytes
Special
Descendant table. This table is for the subtree search of LDAP. Each LDAP entry with a UniqueID (AncestUniqueID), this table contains the unique identifiers (DescendUniqueID) of the descendant entries. The columns in this table are:
ColumnNameDescriptionIndexed?
AncestUniqueIDThe unique identifier of the ancestor LDAP entryYes
DescendUniqueIDThe unique identifier of the descendant LDAP entryYes
For every entry in the directory, a row exists in this table for each of its ancestors including itself. If every entry were exactly the same depth, record count at worst case == O(nm), where n is the node count in the directory and m would be the depth of the tree. This could be my achilles heel


So, how is this design, I did have some help... I also referenced a few private docs I have from years ago when I was debuging an NDS schema error.

Now, once I get advice and make changes, I'll have to create or build LDAP<->PGSQL filters. Maybe stored procedures would be better. I'll also have to finger out how to bulk load and so on. Replication shouldn't be an issue, I can do it with the LDAP implementation or the DB implementation. Even Clustering shouldn't be too hard for this...

I do know I have set lofty goals for this... but if I can just make sure the design is good, fixing problems as they arise... things should be good, giving me the ability to extend and addto the setup as needed. As well as multiple methods for assurance.



Footnotes:
  1. DN or UniqueID, that is the question. I am unsure which one will be most efficient/fastest.
  2. At this point Last record modifier only. Perhaps later, split this table out to a "Modifier Table" with RecordNum, ModifiedUniqueID, ModifierUniqueID and ModifiedTimeStamp as the columns.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Miltary Intelligence"]
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
New Sounds like you need a Windows Server 2003 box!
gd&r


Peter
[link|http://www.ubuntulinux.org|Ubuntu Linux]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
New Nah, I want something that works.
Plus, not everything in ADS is exported through LDAP.

/me running after pwhysall "I'll get you, you fecker!"
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Miltary Intelligence"]
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
New In that case, why are YOU doing it?
gd&r again


Peter
[link|http://www.ubuntulinux.org|Ubuntu Linux]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
New Hmmm, fair statement... but
Beats having you screw it up, worseror.

But then, at least I could blame someone that I can claim dunnah know Shiite!
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Military Intelligence"]
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
New I would use unique id for the creator foreign key
dn is a human readable value required to be unique - but you might change it one day. Since you might change it, it makes a bad foreign key. General rule of thumb is to never use meaningful data as any kind of key.

This also implies that dn requires a unique index.



"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New Use nested set trees
If Scott hasn't already chimed in with some links before I get to work, where I've got them bookmarked, I'll put them here.
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New What Drew said.
You could also browse the source from this site.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New Resources for myself and others.
[link|http://www.intelligententerprise.com/001020/celko.jhtml?_requestid=1126911|Some answers to some common questions about SQL trees and hierarchies]

A surprising one: [link|http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro03/html/sql03b8.asp|Trees in SQL Server] at MSDN.

[link|http://www.dbdebunk.com/publications.html|PRACTICAL DATABASE FOUNDATIONS]

[link|http://www.google.com/search?q=Trees+in+SQL|Google for: Trees in SQL]
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Military Intelligence"]
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
Expand Edited by folkert Feb. 21, 2005, 11:15:17 PM EST
New dbdebunk.com? Nah, come on - Fabian Pascal is pretty much...
...a certified whacko -- and judging from that site, Chris Date doesn't come off as too mentally stable either.


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New It is good to read....
Opposing whacked ideals. Seems to get me further knowing what *NOT TO* do, than find what *TO* do.

Yes, there are some good points though, they both do come across rather "cross" when it comes to things I've always done in DB environments, which overtime have been proven a satisfactory.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

[link|http://it.slashdot.org/comments.pl?sid=134485&cid=11233230|"Microsoft Security" is an even better oxymoron than "Military Intelligence"]
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
     So, I have been dabbling...err - (folkert) - (10)
         Sounds like you need a Windows Server 2003 box! - (pwhysall) - (3)
             Nah, I want something that works. - (folkert) - (2)
                 In that case, why are YOU doing it? - (pwhysall) - (1)
                     Hmmm, fair statement... but - (folkert)
         I would use unique id for the creator foreign key - (tuberculosis)
         Use nested set trees - (drewk) - (1)
             What Drew said. - (static)
         Resources for myself and others. - (folkert) - (2)
             dbdebunk.com? Nah, come on - Fabian Pascal is pretty much... - (CRConrad) - (1)
                 It is good to read.... - (folkert)

The telltale breath with sen-sen.
76 ms