Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases > Re: Simple disk...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 37 Topic 361 of 386
Post > Topic >>

Re: Simple disk-based sorting method

by spam@[EMAIL PROTECTED] (Citizen Bob) Apr 15, 2007 at 06:31 AM

On Sat, 14 Apr 2007 17:04:37 -0400, Bob Stearns
<rstearns1241@[EMAIL PROTECTED]
> wrote:

>> Now I want to sort another data set but this time the key consists of
>> a 4 digit number that can be either plus or minus and I want a
>> descending sort order.
 
>How about just using the whole number + 10000 to select the random 
>location in the disk dataset then reading the disk dataset sequentially, 
>ignoring any empty locations? If that won't work, then you don't have 
>unique keys.

I think I may do something similar to that. I create the data set in
another part of the application so I can discover the max and min
values for the key. I can use the min value to offset all the keys to
a positive value and then sort on that pseudo-key. After sorting I can
subtract the offset back out and recover the original keys. I would
use the max value to set the fixed length of the key. By padding the
key with a format like "%05d" (zero fill left side to give a total of
5 digits), the sorting procedure is easier since there is always a
digit in every position.


--

"Nothing in the world can take the place of perseverance. Talent
will not; nothing is more common than unsuccessful men with talent.
Genius will not; unrewarded genius is almost a proverb. Education
will not; the world is full of educated derelicts. Persistence and
determination alone are omnipotent."
--Calvin Coolidge
 




 37 Posts in Topic:
Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-13 12:40:27 
Re: Simple disk-based sorting method
"Ed Prochak" &l  2007-04-13 07:43:19 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-13 15:34:31 
Re: Simple disk-based sorting method
Gene Wirchenko <genew@  2007-04-13 21:52:54 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-14 16:47:00 
Re: Simple disk-based sorting method
Bob Stearns <rstearns1  2007-04-14 17:04:37 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-15 06:31:54 
Re: Simple disk-based sorting method
"--CELKO--" <  2007-04-14 06:02:00 
Re: Simple disk-based sorting method
Gene Wirchenko <genew@  2007-04-17 10:58:15 
Re: Simple disk-based sorting method
Last Boy Scout <BadBil  2007-04-14 15:44:01 
Re: Simple disk-based sorting method
mAsterdam <mAsterdam@[  2007-04-15 02:11:03 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-15 06:41:53 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-15 06:47:37 
Re: Simple disk-based sorting method
David Kelly <n4hhe@[EM  2007-04-14 22:08:10 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-15 06:47:38 
Re: Simple disk-based sorting method
David Kelly <n4hhe@[EM  2007-04-15 16:44:29 
Re: Simple disk-based sorting method
Last Boy Scout <BadBil  2007-04-15 21:03:37 
Re: Simple disk-based sorting method
Last Boy Scout <BadBil  2007-04-15 21:06:21 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-16 11:53:31 
Re: Simple disk-based sorting method
David Kelly <n4hhe@[EM  2007-04-16 22:47:08 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-17 13:09:39 
Re: Simple disk-based sorting method
Lemming <thiswillbounc  2007-04-28 00:44:49 
Re: Simple disk-based sorting method
Brian Inglis <Brian.In  2007-05-27 17:07:02 
Re: Simple disk-based sorting method
"Ed Prochak" &l  2007-04-16 10:37:23 
Re: Simple disk-based sorting method
"Ed Prochak" &l  2007-04-16 10:48:04 
Re: Simple disk-based sorting method
spam@[EMAIL PROTECTED] (  2007-04-16 18:48:01 
Re: Simple disk-based sorting method
--CELKO-- <jcelko212@[  2007-04-18 08:06:06 
Re: Simple disk-based sorting method
toby <toby@[EMAIL PROT  2007-04-20 20:31:10 
Re: Simple disk-based sorting method
Lemming <thiswillbounc  2007-04-28 01:25:34 
Re: Simple disk-based sorting method
toby <toby@[EMAIL PROT  2007-04-20 20:31:46 
Re: Simple disk-based sorting method
toby <toby@[EMAIL PROT  2007-04-20 20:34:48 
Re: Simple disk-based sorting method
"Paul Linehan"   2007-07-05 16:24:54 
Re: Simple disk-based sorting method
Lennart <erik.lennart.  2007-07-05 19:29:15 
Re: Simple disk-based sorting method
"Paul Linehan"   2007-07-06 10:10:11 
Re: Simple disk-based sorting method
David Segall <david@[E  2007-07-06 05:26:22 
Re: Simple disk-based sorting method
"Paul Linehan"   2007-07-06 10:05:24 
Re: Simple disk-based sorting method
David Segall <david@[E  2007-07-06 18:21:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 20:45:35 CDT 2008.