Subject Re: [IB-Architect] Database names
Author Bill Karwin
Jim Starkey wrote:
> The "right" place for the mapping between database names and
> database filenames is the registry for Windows systems and a
> file in either the Interbase install directory or possibly
> /etc on Unix (suggestions solicited).

How about isc_config on all platforms? That way someone can move their
database and aliases config file from a Win32 platform to a non-Win32
platform easily.

> The logical translation point is the Y-valve (why.c).

As Jason observed, this would automatically permit alias names to be
remote connection strings. I like it!

> Among the algorithms that could be used:
>
> 1. Assume a connect string is a name if it doesn't contain
> a dot.

This means that alias names cannot contain a dot. Probably not a big
deal, but...

> 2. Try to translate the connect string, regardless. If it
> doesn't match a name, assume it's a file.

I actually like this better. That way we don't even need any special
syntax or restrictions on names to indicate an alias.

It would allow interesting ways to obscure the physical location of your
database if your alias is "d:\data\mydatabase.gdb". :-)

> My druthers would be to make database names case insensitive to
> match SQL semantics. Thoughts?

Makes sense!

Jason also had good suggestions, which I'll comment on:

o Services API method to create aliases (under sysdba privilege, of
course).
Also to list, alter, and delete aliases.

o Optional server property to disallow non-aliased connections, for
security purposes.
I think an alternative to the "anyone-can-create-a-database" security
issue would be to establish database creation privileges that can be
granted only by SYSDBA. This would be easy by restricting INSERT
privilege in the database registry in isc4.gdb, but if you don't want to
use isc4.gdb it has to be enforced some other way.

Bill Karwin