Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^4: modeling overlapping generations

by punkish (Priest)
on Nov 26, 2011 at 19:16 UTC ( #940207=note: print w/replies, xml ) Need Help??

in reply to Re^3: modeling overlapping generations
in thread modeling overlapping generations

Fabulous... thanks for pointing out that link. So, take a look at this, or, specifically, at the image at Now, imagine you have a rock that is estimated to be from between 25 Ma (million years ago) to 20 Ma. So, it started in the Oligocene and ended in the Miocene. The Tertiary period is the "closest" period that completely encompasses the sample rock. So, I want to model the following --

given a point in time or a duration of time, find the closest period that completely encompasses your sample.

Right now we are storing these "periods" with there start and end times in a SQL table, and then doing a lot of nested SQL queries to return our results. I am trying to determine if there are better ways to model such relationships. Intuitively SQL seems wrong for this.

when small people start casting long shadows, it is time to go to bed

Replies are listed 'Best First'.
Re^5: modeling overlapping generations
by BrowserUk (Pope) on Nov 26, 2011 at 22:05 UTC

    Set::IntSpan should do everything you need.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940207]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2018-08-20 06:29 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (190 votes). Check out past polls.