Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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 http://geology.com/usgs/geologic-time-scale/, or, specifically, at the image at http://geology.com/usgs/geologic-time-scale/geologic-time-scale-one-column-cropped.gif. 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


Comment on Re^4: modeling overlapping generations
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-09-18 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (105 votes), past polls