-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy, et al --

...and then Andy Jackman said...
% 
% David,
% > Gah.  That's what I was hoping to avoid.  It's like writing BASIC and
% > having to leave yourself room...
% Yes, but unlike a basic program of 10000 lines (heh, remember that!) you

Yeah :-)


% only need to leave room for n questions. If n is small - no problem,
% even if you have to 'renumber'. If n is large then the original idea of

Right.


% 'order in a field' wouldn't be much easier - imagine a 4000 character
% field for 1000 questions. You imply n may be as small as 10. If so, you

It could be, but 20 is probably more likely.  If I go to five digits then
that's room for 19 questions.

A friend gave me an absolutely brilliant pointer, though, and one that
I'm somewhat embarrassed to say did not occur to me after all of the
proofs that integers are countably infinite.  I'll just use a float!


% really haven't got a problem. In practice on large datasets we use an
% update query to reorder things. Sometimes the reordering is so complex
% we have to temporarily add another field, but it's no big deal. And if
% you're _very_ paranoid (aren't we all), you could always count in

That I am :-)


% millions and still have room for 2000 questions, unless you're running

*ahem* Um, 2^2000 is much more than a few million or so...  I don't
know definitively how big MAXINT is, but I imagine that on a 32b machine
it could well be only 2^32.  The manual, as well, says that arithmetic is
done using signed BIGINTs, so I can only use 2^63 values.  Sixty-four
questions, done just right (er, wrong), and I'd be blown (or have to
reorder).


% on a 16 bit machine... :-)

Heh :-)


% 
% > OK.  We were actually looking at putting ORDER as a field in SURVEY (as
% > renamed), and similarly for the options.  Is there any particular reason
% > to do it as a separate table rather than as part of the questions table
% > itself?
% You are right - you only need a seperate table if questions are used
% more than once. As they are not you can put the question order field in
% the question table.

Excellent; great to know.  Thanks!


% 
% Best regard,
% Andy.


Thanks & HAND

:-D
- -- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/Nse9Gb7uCXufRwARAu4WAKC8gB6r7tEcUowjS9Ix1HRQSTfwsACgzI6k
EzqX5TWDEzFcIkkKFHLoJ7s=
=Koa3
-----END PGP SIGNATURE-----

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to