Database namespace

View: New views
8 Messages — Rating Filter:   Alert me  

Database namespace

by Claudio Valderrama C. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, since procedures, views and tables share the same namespace, they
can't have the same name.
Wouldn't it be better to forbid packages that have the same name as the
previously mentioned entities, too?
I realized that while trying to fix isql to cope with packages.

Another problem:
grant <role> to cats;
Is this "cats" a procedure or a package? The syntax doesn't allow to specify
the object.

What is the logic of allowing
grant execute on procedure p to procedure p;
and
grant execute on package p to package p;
and
grant select on v to view v;
???

C.
---
Claudio Valderrama C. - www.cvalde.net
Consultant, SW developer.



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Rustam Gadjimuradov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Claudio Valderrama
> Wouldn't it be better to forbid packages that have the same name as the
> previously mentioned entities, too?

In the same schema ? No, it wouldn't.

WBR, GR

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Alexander Peshkoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 11 November 2009 13:46:38 Claudio Valderrama C. wrote:
> Hello, since procedures, views and tables share the same namespace, they
> can't have the same name.
> Wouldn't it be better to forbid packages that have the same name as the
> previously mentioned entities, too?

Agreed.

> I realized that while trying to fix isql to cope with packages.
>
> Another problem:
> grant <role> to cats;
> Is this "cats" a procedure or a package? The syntax doesn't allow to
> specify the object.

If we fix non-unique names, there is no big problem here.

> What is the logic of allowing
> grant execute on procedure p to procedure p;

Suppose no logic at all. If procedure p already executes, it means request
already has execute granted.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Rustam Gadjimuradov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alexander Peshkoff
>> Hello, since procedures, views and tables share the same namespace, they
>> can't have the same name.
>> Wouldn't it be better to forbid packages that have the same name as the
>> previously mentioned entities, too?
>
> Agreed.

Can you give an example ?

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Adriano dos Santos Fernandes-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Claudio Valderrama C. escreveu:
> Hello, since procedures, views and tables share the same namespace, they
> can't have the same name.
> Wouldn't it be better to forbid packages that have the same name as the
> previously mentioned entities, too?
>  
No. You can't have select * from package_name or execute procedure
package_name.

Note there is current some ambiguities and some fbtcs tests fail because
of them. I believe the way we handle line/column positions in the parser
is not safe with backtracking. But introduce this rule will not make
situation better.

> I realized that while trying to fix isql to cope with packages.
>
> Another problem:
> grant <role> to cats;
> Is this "cats" a procedure or a package? The syntax doesn't allow to specify
> the object.
>  
Isn't it an user?

> What is the logic of allowing
> grant execute on procedure p to procedure p;
> and
> grant execute on package p to package p;
> and
> grant select on v to view v;
> ???
Why we should care to prevent that? What problem it causes?


Adriano


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Dmitry Yemanov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Claudio Valderrama C. wrote:

> Hello, since procedures, views and tables share the same namespace, they
> can't have the same name.

Yes, because they all are selectable from.

> Wouldn't it be better to forbid packages that have the same name as the
> previously mentioned entities, too?

I don't think so.

> Another problem:
> grant <role> to cats;
> Is this "cats" a procedure or a package? The syntax doesn't allow to specify
> the object.

Roles can be granted to users only.

> What is the logic of allowing
> grant execute on procedure p to procedure p;
> and
> grant execute on package p to package p;
> and
> grant select on v to view v;
> ???

Do we speak about useless ACL entries or what?
Perhaps we could silently ignore such commands.


Dmitry

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Rustam Gadjimuradov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dmitry Yemanov> Perhaps we could silently ignore such commands.

Wouldn't better to bring exception ?

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: Database namespace

by Dmitry Yemanov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rustam Gadjimuradov wrote:
>
> Wouldn't better to bring exception ?

It would be up to the implementor, I'd say ;-)

As for me, this is not an error per se and it doesn't (I believe) cause
any harm, except of redundant ACL items being stored.


Dmitry

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel