Re: Adjacency List and nested set -- J celko example -- Guru needed
From: Jack D. Ripper (steve.nospam._at_rac4sql.net)
Date: 07/19/04
- Next message: Souri Challa: "Re: Programatically determining the stored procedure Resultset nam"
- Previous message: Louis Davidson: "Re: declaring UDF in Stored Procedure"
- In reply to: Steve Kass: "Re: Adjacency List and nested set -- J celko example -- Guru needed"
- Next in thread: --CELKO--: "Re: Adjacency List and nested set -- J celko example -- Guru needed"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Jul 2004 16:56:34 -0400
"Steve Kass" <skass@drew.edu> wrote in message
news:OWOZIkabEHA.2340@TK2MSFTNGP10.phx.gbl...
> Let me be clearer. Exactly /how/ do (lft,rgt) represent position?
> What's the formula that gives me the clear position from the (lft,rgt)
> values? Is Elmira the CEO of the company? Her coordinates are (321,
> 4409). [Answer: "I don't know."] This must have a clear answer for
> this to be a useful model. In other words, given a position, how to I
> compute the exact lft,rgt values, and vice versa. I know how to do this
> for latitude and longitude, given maps, or compasses, or a GPS receiver,
> but the bijection between (lft,rgt) and (position in the hierarchy)
> isn't in my encyclopedia.
>
> No, (lft,rgt) and not at all just like (longtitude [sic], latitude).
> Geographical coordinates have absolute meanings, and (lft,rgt) don't.
> Knowing only the (lft, rgt) coordinates of a person tells you nothing,
> while (latitude, longitude) tells you global location precisely. It
> doesn't tell you altitude, of course, but that's fine, since flat maps
> and geographical coordinates aren't intended to model altitude But the
> (lft,rgt) values in one person's row *don't* allow you to discover any
> attribute of the hierarchy that this model is supposed to be providing,
> and least not in the way databases should work - the values in an
> isolated row should give you information on their own, or through FK
> relationships to attributes in another row whose key is in the given row.
>
> If you specify a location on the globe in any precise way (exactly 372.9
> kilometers east of Ouagadougou), the longitude and latitude are not in
> doubt. If you give me to (long,lat) pairs, the distance between the
> cities can be found, etc., etc. If you walk into an office and ask
> Elmira what her position is in the hierarchy, she will tell you who her
> boss is and perhaps also who she supervises, but her (lft, rgt) values
> are artificial aspects of the database mode and you will never find them
> out. I doubt she knows them herself. They might be (12345, 13459) and
> they might be (13, 17) in two (different!) faithful representations of
> the same organization, depending on irrelevant factors like the order in
> which employees were entered into the database, or how many people and
> who were hired and fired before she came on board.
In essence lft,rgt are identity columns (placeholders).The irony
is delicious:)
- Next message: Souri Challa: "Re: Programatically determining the stored procedure Resultset nam"
- Previous message: Louis Davidson: "Re: declaring UDF in Stored Procedure"
- In reply to: Steve Kass: "Re: Adjacency List and nested set -- J celko example -- Guru needed"
- Next in thread: --CELKO--: "Re: Adjacency List and nested set -- J celko example -- Guru needed"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|