Subject Re: [Firebird-Architect] Multi-level name space
Author Arno Brinkman
Hi,

> No single feature would make me happier than a multilevel name space.
> The question is how to implement one without rewriting the database from
> scratch.
>
> Here is a modest proposal, more or less off the top of my header:
>
> 1. We increase the size of RDB$RELATION_NAME from 31 to 256 bytes
> (and make it a varchar, this time, please).

No problem with increasing the datatype size for RDB$RELATION_NAME.

> 2. Schemas are undeclared, just used (this is topic for debate, folks)

Ofcourse i want easy a list of schema's already present in the database.
Also avoid using almost simular schema's due typos by different DBA's.
create table financial.invoice (...)
create table financiel.invoiceitems (...)

> 3. A qualified table name is represented in the system tables as
> <schema>.<tablename> as in "myschema.mytable"

What about:
create table "myschema.mytable" ()
and
create table "myschema"."mytable" ()

?

> 4. When fetching tables, we parse the table name, look for the dot,
> and consider the prefix the schema name, the suffix the table name
> 5. In BLR we recognize and parse table names containing dots as
> qualified names

See point 3

> Almost nothing changes except the max length of table names and the name
> matching rules in the BLR and SQL compilers.
>
> It seems too simple. What am I missing?

Adding RDB$SCHEMA_NAME (to stay consistent) to RDB$RELATIONS
Adding something like RDB$SCHEMAS (RDB$SCHEMA_NAME VARCHAR(xx) NOT NULL PRIMARY KEY, CREATOR
VARCHAR(31) DEFAULT CURRENT_USER)

Comments?

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info