Fred,
If you truly want to adhere to the SQL standard (which does not
define a sorted order for tables ) then you should not try to
maintain a physical order for the rows of the table. If you
need to retrieve data in a particular sequence then you should
us the "ORDER BY" clause along with appropriate INDEXES. Under
the SQL rules absent an ORDER BY clause the sequence for
returned data is undefined. RBase adheres to the SQL92 standard
and is under no oblication to return data in the physical
sequence for records. The fact that the present implementation
performs a certain way is no guarantee that it will present data
in the same sequence in a later version.
v7.6/v8.0 are a long way from the v2.11 implementation in there
implementation to the SQL standard. In stead of spending your
time trying to re-invent v2.11 in v7.6/8.0 you should be
concentrating on using all of the marvelous tools (PRIMARY KEY,
FOREIGN KEY, UNIQUE KEY, improved Indexing capabilities,
inumerable additional Functions) implemented since v2.11.
In my view the closer you adhere to the SQL standards the better
off you are. v2.11 may have been great in it's day but the
world has moved on. The data bases I maintain have been through
at least 4 major revisions since they were initially implemented
in v2.11 (actually one was created in v1.1). Each time I made
the decision to change them to take advantage of the new
features even though it made me change some of my past
programming practices.
Jim Bentley
--- Fred C Kopp <[EMAIL PROTECTED]> wrote:
> Alistair, indeed, you have responded to this issue before and
> I have looked up your message of 5/5/05. Why can something so
> simple in 2.11 be so complicated in 7.6? All I want to do is
> sort my tables and leave my keys undisturbed. Am I to
> understand that everyone else is content to leave their tables
> unsorted? If so, I reluctantly bow to the majority, while I
> continue to search for a way to defy it.
> ----- Original Message -----
> From: Alastair Burr
> To: RBASE-L Mailing List
> Sent: Tuesday, June 10, 2008 6:08 PM
> Subject: [RBASE-L] - Re: Sorted tables
>
>
> Looking back, Fred, I seem to think that I, for one, have
> responded to this question before - on the 7th of Feb to be
> precise!
>
> I have a command file that re-builds my databases with all
> the tables sorted in the sequence I like - it's yours for the
> cost of asking for it - it's a bit too big to post here.
>
> As I said previously:
>
> "I also like to re-build my databases at the turn of each
> year. As briefly discussed here earlier this year I do this by
> unloading the tables in a particular sequence (of tables) so
> that they can be reloaded to a new database without conflicts
> arising due to missing keys from tables that should have been
> loaded first.
>
> Since I have to unload the data anyway I do so with the
> ORDER BY clause that best suits each table for my needs.
>
> This, effectively, kills two birds with one stone: I get a
> clean database and its tables are pre-sorted."
>
> Regards,
> Alastair.
>
> ----- Original Message -----
> From: Fred C Kopp
> To: RBASE-L Mailing List
> Sent: Tuesday, June 10, 2008 8:51 PM
> Subject: [RBASE-L] - Sorted tables
>
>
> What if I'm so anal retentive that I want to keep my
> tables sorted in certain ways?
>
> In 2.11 I simply ran a file that RENAMEd each table to
> Temp and PROJECTed a new, sorted table from Temp. Then I
> REMOVEd TABLE Temp and moved on to the next table. After all
> the sorted tables were projected, my file would BUILD KEY for
> each appropriate column in each appropriate table. A PACK or
> RELOAD removed the wasted space.
>
> But things have changed...
>
> PKs and other Restraints prohibit this naive approach. I
> don't even want to get into the errors I get. I want a single
> control file that sorts my tables and preserves / restores my
> Keys and Restraints. Doesn't seem all that unusual. How do I
> do it?
>
> Thanks,
> Fred
>
> Fred C. Kopp
> Authorized R:Base Developer
> 19 Teri Lane
> Washington, PA 15301
>
> P 724-222-7376
> F 724-222-7376
> C 724-413-5534
> E [EMAIL PROTECTED]
>
>
>
----------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.2.0/1493 - Release
> Date: 09/06/2008 17:25
>
Jim Bentley
American Celiac Society
[EMAIL PROTECTED]
tel: 1-504-737-3293