varchar!
== Quote from strawberry (com)'s article
I'm creating a table of objects, including their year of manufacture. In some cases the year of manufacture will be very precise, '1855', say. In other cases the year will be much more vague - 'circa 1830', '1780 - 1820' or even 'early 19th century'. Indeed, as the objects get more ancient, I can well imagine that their ages become much less precise. Just wondered if anyone had any suggestions about ways of storing this kind of information....
I'm creating a table of objects, including their year of manufacture.
In some cases the year of manufacture will be very precise, '1855',
say. In other cases the year will be much more vague - 'circa 1830',
'1780 - 1820' or even 'early 19th century'. Indeed, as the objects get
more ancient, I can well imagine that their ages become much less
precise. Just wondered if anyone had any suggestions about ways of
storing this kind of information.
varchar!
== Quote from strawberry (com)'s article
strawberry wrote:
I presume you wish to search by date at some point.
Perhaps store a mid-point and a range.
So 1780-1820 would be mid-point = 1800, range = 20 (i.e. +/- 20 years from
mid-point).
Then you can query it using mid-point - range and mid-point + range.
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
I'm sure I posted this message earlier today, so let me know (and
apologies) if it shows up somewhere...
I'm creating a table of antique objects, including their year of
manufacture. In some cases the year will be precisely known - '1855'
or '1930', say. In other instances it will be vaguer - 'circa 1850' ,
'1835 - 1860' or 'mid-19th century'. Just wondering if anyone had any
thoughts on how best to represent this in the table. One idea I had
was simply to provide, in each case, a mid-range value in one column
and a margin of error or 'tolerance' in another - but I'm open to
suggestions.
Any thoughts - or, better yet, a definitive answer, appreciated.
strawberry wrote:
I store the start and end years as integers. This makes comparison with
another potentially overlapping period reasonably straightforward.
Chad
--
Chad Hanna
Systems Developer FamilyHistoryOnline www.familyhistoryonline.net
FreeBSD Apache MySQL Perl mod_perl PHP
On Apr 25, 2:18 am, Chad Hanna <co.uk> wrote:
>
> I store the start and end years as integers. This makes comparison with
> another potentially overlapping period reasonably straightforward.
>
> Chad
>
> --
> Chad Hanna
> Systems Developer FamilyHistoryOnlinewww.familyhistoryonline.net
> FreeBSD Apache MySQL Perl mod_perl PHP[/ref]
Brian, Chad,
Thanks for the suggestions - I think the idea of a mid-point and
tolerance will be the simplest for me to maintain.
Cheers
Bookmarks