Subject Re: Newbie: A few questions...
Author lesdean79
Hi Helen,

"Helen Borrie" <helebor@...> wrote in message

> >1. Can you rename a table with SQL syntax in FireBird?
> >(Obviously, one can create a new table, copy data across, and then
> >drop the old table, but is there a 'Alter table RENAME
oldtablename
> >to newtablename'?)
>
> No. Firebird is an organism with relationships and dependencies,
including
> those in triggers and stored procedures. So the question is a bit
like
> asking "Can human arteries be replaced with string?"

Yeah, ok, although many other SQL Server Engines provide a mechanism
for
changing the tablename, and updating all dependancies. Effectively,
I can
handle this by creating a new table, and then re-assigning all the
relationships etc. Obviously not a recommended procedure for daily
use, but
possible if absolutely necessary.

> >2. Does FireBird support Multi-component keys with mixed sort
orders?
> >For example 1 key, 2 fields, 1 ascending, and 1 descending?
>
> Be aware of the distinction between keys and indexes. Keys
implement
> relationships (and sort order, a cardinal attribute, doesn't affect
> relationships), while indexes can facilitate searches and
orderings.

Yes, absolutely right. My apologies for the bad use of the
term 'keys'.
Specifically I am referring to indexes.

> Firebird supports multi-column keys AND multi-column indexes. Be
aware
> that there are tight limits on the total width of indexes, which
get
> tighter with special collations in international character
sets....and
> multi-columnness in index eats some of the available bytes.

Sure, I understand. Where are these limitations documented for my
reference?

> >3. What is the maximum key size in FireBird, and is it affected by
> >the Database Page Size?
>
> 252 or 253 bytes or [much] less, depending on character set,
collation
> order and how many actual key elements an index has.
>
> The maximum key size is not affected by db page size but the
efficiency of
> indexes can be. The smaller the page size, the greater the level
of
> indirection required for storing index images as tables grow.

Cool, no problem. Where is this info documented in detail? I have
downloaded
all the pdf downloads of docs I could find relating to FireBird.
Language
Reference, APIGuide, Developer's Guide, etc etc, but I could not
find any
info on this.

> /heLen

Thanks for the help Helen. :)
--
--------------------------
Lesley Dean
CapeSoft
www.capesoft.com