RE: Generate RANDOM number

You asked what is wrong with his select.

Probably he is seeking information regarding the quality of the pseudo
random sequence that is generated.

You see, short of the "I bet you can't get your hands on one" quantum
mechanics based logic chips it is simply impossible for digital computers to
generate numbers that are actually random. Various algorithms exist starting
with various seeds, and there are formal metrics regarding the quality of
the random sequence including such notions as a relatively flat histogram of
values in the produced range without supporting the Monte-Carlo fallicy in
fact.

Consider producing a target range of 1 to 1,000. You'd hope that after
1,000,000 generated numbers the histogram totals would be near 1,000 for
each value. And yet if your algorithm was certain to produce exactly 1,000
of each number then you'd have a real problem calling the millionth number
generated "random" since you could know that it must fill in the last
remaining value that only had 999 so far.

On the other hand if you want a very flat psuedo random seed based set of
number to drive engineering test perturbation values as opposed to security
sequences or anything sensitive to predictability, a generator that
generators exactly 1000 in each bucket might be just fine.

Okay, now that I've made all the numeric methods scientists in the
lurkership puke at my gross oversimplification, my guess is still:

Probably he is seeking information regarding the quality of the pseudo
random sequence that is generated.

And whether someone has published a superior routine (or one merely
different but more suited to his purposes, of which I am uncertain.)

I regret to say I am at a loss to direct you to the documentation (if it
exists) on the value distribution, skewness, kurtosis, etc., etc. of the
dbms_random.value() function.

So while I can't answer his question definitely, I hope I've answered your
question. Maybe he'll comment on my guess.

Regards,

mwf

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Igor Neyman
Sent: Tuesday, January 04, 2005 3:13 PM
To: Muqthar.Ahmed@xxxxxxxxxxxxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: RE: Generate RANDOM number


Why do you need other recommendations?
What's wrong with your "select"?

Igor Neyman, OCP DBA
ineyman@xxxxxxxxxxxxxx



-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Muqthar Ahmed
Sent: Tuesday, January 04, 2005 2:39 PM
To: 'oracle-l@xxxxxxxxxxxxx'
Subject: RE: Generate RANDOM number

Hi,

The one I am using is:

SELECT dbms_random.value(1000000000000001,9999999999999999) FROM   dual;

any other recommendations???

Thanks
Muqthar

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Muqthar Ahmed
Sent: Tuesday, January 04, 2005 2:08 PM
To: 'oracle-l@xxxxxxxxxxxxx'
Subject: Generate RANDOM number


Hi,

I have to generate 16 digit random numbers.......any recommendations.  I
am using Oracle 9.2.x release.

Thanks
Muqthar Ahmed
Oracle9i Certified DBA


* * * * * * * * *

The information contained in this E-mail message is privileged,
confidential, and may be protected from disclosure; please be aware that
any other use, printing, copying, disclosure or dissemination
of this communication may be subject to legal restriction or sanction.
If you think that you have received this E-mail message in error, please
reply to the sender and delete it from your computer. T
hank you.

--
http://www.freelists.org/webpage/oracle-l

* * * * * * * * *

The information contained in this E-mail message is privileged,
confidential, and may be protected from disclosure; please be aware that
any other use, printing, copying, disclosure or dissemination
of this communication may be subject to legal restriction or sanction.
If you think that you have received this E-mail message in error, please
reply to the sender and delete it from your computer. T
hank you.
--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l

Other related posts: