Some comments inline, based on what I see as feasible in the near future and allows further long term enhancements.
 
Fred
----- Original Message -----
From: fredt
Sent: 25 July 2004 13:41
Subject: [Hsqldb-developers] Re: [Hsqldb-user] Re: DatabaseMetaData.getSchemas: bug?

Thanks Campbell,
 
This discussion should now move to hsqldb-developers. This message is copied to that list.
 
Please respond in the developers list. I will respond there shortly.
 
Fred
----- Original Message -----
Sent: 23 July 2004 23:00
Subject: Re: [Hsqldb-user] Re: DatabaseMetaData.getSchemas: bug?

Thanks Fred.
 
The issue and its extended discussion is age old (HSQLDB 1.6).
 
The macinery for implementing ident by full cat.schem.name is not that much.
 
Where (as always) the real issues enter are i nthe following areas:
 
1.) What are we willing / do we need to specify concerning the relationship between authorization descriptors and schema descriptors?
 
In some systems, a schema is created per users (implicit) and a schema cannot be created without an "owning" user.
 
In other systems, schemas can be created independent of users, but authorization descriptors can be associated with schema descriptors.
 
This raises the question of how much, if at all, we need to refince the current scheme of things regarding HSQLDB authentication and authorization?
 
Will we need roles?
Will we need a cross-Database instance Authentication/Authorization framework?
 
In general these facilities are intended for better application level compatibility with other RDMS engines and the latest SQL standards. However, they should not change the single-database paradigm. Introducing roles is a good idea regardless of anything else. A cross-database (persistent) framework would complicate things and can be avoided at this stage.
 
 
2.) What are we willing / do we need to specify concerning the relationship between authorization descriptors  and catalog descriptors?
 
This is a larger and more "intrusive" issue than schema support, simply because the current HSQLDB Authentication/Authorization framework is based completely upon th notion of Database instance scoped users (and roles, the only one being ADMIN, currently)
 
The issue here is that there needs to be a standard for what constitutes Authentication/Authorization in an SQL environment that allows the simultaneous existence of several otherwise isolated database (let's call them catalog) instances.
 
What we can implement now is analogous to user/resource authentication/authorization in an ad-hoc windows workgroup which many are familiar with. In such a workgroup there is no central authentication/authorization server. For seamless access to resources on other machines, the user must exist on each machine with the same password and certain access writes.
 
So if a database user has been created on three different database, with certain privileges that are either granted directly or by role, then a logon to one of the database allows access to the others. This is in the context of a server that serves a predefined set of databases.
 
 
As Fred and I have dicussed several times, there is a need for a session language that extend in scope above that of any individual database session.
 
The session language is needed for something else, i.e. management of database in the server, e.g. adding a new database, taking a database offline for maintenance, etc. It is a separate issue. This level of managment needs only the degree of metadata persistence that we already have in a server instance: a list of databases and their aliases for a server.
 
There is also a need, then, for a Session context to carry about, among other things, the union of the Authentication/Authorization tokens successfully obtained against each catalog opened in session scope.
 
This can be done ad-hoc via cross-database system queries. Otherwise changes in grants in another database context will not be reflected in the current session.
 
I have done some work in the HSQLDB MX package to allow delegation of Authentication/Authorization to a java.security (whole JVM) style facility, which can easily be adapted to the Java security policy framework, if desired.  It is also not difficult to implement a cross-JVM ACL-based security manager, for JDK 1.1.
 
But, still, the devil's in the details. 
 
The main limiter here is that what ever we specifiy regarding the behaviour and details of catalog support, it should apply _only_ to the in-process perspective.  There is a perfectly acceptable standard that we can implement regarding the wider scope (i.e. out-of-process federation/clustering), as described in the SQL standards under the heading of SQL MED (management of external data).  I belive that Fred/Bela and crew still have some hopes to see this part implemented as a standard but optional extention item, as exemplified by the existence of the HSQLDB/R demonstration prototype.
 
This can wait until the infrastructure has been implemented. We are still going to implement federation/clustering.
 
Finally, the scopes of the parser/_expression_/commandinterpreter facilities need to be expanded to be able to handle cross catalog concerns.
 
Certainly. This is needed in the first instance.
 
Obviously, there are deeper, more troublesome issues that remain unresolved and that we probably do not want to tackle right away, such as cross-catalog referential integrity, cross-catalog views, cross-catalog routine references, etc., mostly because the current state of affairs does not guarantee that a referenced catalog will remain available for the lifetime of the objects that reference it.
 
Such issues depend on what we allow. For instance, we do not have to allow cross-database referential integrity constraints.  Routine references should resolve in the context of the database that calls the routine or the one that contains the referenced table on which the routine is called depending on the calling context.
 
We should not have to guarantee that a referenced catalog remains open, so we can plan accordingly.
 
Well, that's my small 2 cents worth for now.
 
Exciting stuff, everyone.  I'm looking forward to participating in the discussions and implementation, time allowing.
 
 
----- Original Message -----
From: "fredt" <[EMAIL PROTECTED]>
Sent: 23 Jul, 2004 11:18 AM
Subject: [Hsqldb-user] Re: DatabaseMetaData.getSchemas: bug?

> Broadly agree with Blaine on this. Now that we support multiple DB's in the
> same JVM, it is possible to support both catalogs and schemas. At some point
> Campbell even mentioned what this would take in terms of internal
> modifications--not a huge undertaking.
>
> I missed Jim's post. I must add that if you set the database properties
> use_schema_names etc. you can use the "schema"."table" pattern where the
> "schema" part is just ignored. Campbell described this in his post.
>
> Fred
>
> ----- Original Message -----
> From: "Blaine Simpson" <
[EMAIL PROTECTED]>
> Newsgroups: gmane.comp.java.hsqldb.user
> Sent: 23 July 2004 15:13
> Subject: Re: DatabaseMetaData.getSchemas: bug?
>
>
> Jim Caprioli wrote:
>
> > I use tablenames between "quotes in HSQLDB like "schema.table". For
> > 'schema' SA it is just TABLE. I had to support schema's somehow and I
> > didn't want to give up on HSQLDB. IMO support for schema's should be
> > on  top of the list.
>
> I'm with Jim on this, but not having looked into how much work it would
> be to do it
> right (i.e., being able to assign and restrict storage space, etc., as
> well as permission),]
> it could be that it is just beyond the scope of HSQLDB.
>
> Maybe some other block would have come up afterwards, but I have
> worked on a dozen projects where I couldn't set up HSQLDB as a
> development env database
> because existing code, procedures, infra depends upon independent user
> logins and environments.
>
> My understanding is that HSQLDB is intended for  application-dedicated
> databases and therefore
> simplifies things by not fully implementing schemas.  Just as text
> tables have greatly broadened
> the domain of application of HSQLDB, full implementation of schemas
> could broaden the
> domain from application-dedicated to enterprise.
>
> > I know of several 'generic' tools that don't support  HSQLDB because
> > of lack of schema support.
> >
> > jimcap
> > nilostep.com
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
>
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
>
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Hsqldb-user mailing list
>
[EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>

Reply via email to