this is not a question i need nice comments on this
"Why did SQL Server can have same name of indexes on different tables, but Oracle do not"
(i maen SQL Server allow same Index name, for any number of time on different tables, but Oracle dont allow to do so)
my personal Opinion is , Oracel is Right.(if so then why SQL Server allow this)
what about you?
Regards,
Thanks.
Gurpreet S. Gill
? Why not? Indexes are scoped per table -- so there is no clash by having multiple tables with similarly-named indexes. It's the same with schemas and table names. Both Oracle and SQL Server allow you to create tables of the same name that exist in different schemas. Do you think that's a problem? -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Gurpreet Singh Gill@.discussions.microsoft..com> wrote in message news:c07ec808-144e-4499-8d5e-bcaf7edeffd5_WBRev1_@.discussions..microsoft.com...This post has been edited either by the author or a moderator in the Microsoft Forums: http://forums.microsoft.com this is not a question i need nice comments on this "Why did SQL Server can have same name of indexes on different tables, but Oracle do not" (i maen SQL Server allow same Index name, for any number of time on different tables, but Oracle dont allow to do so) my personal Opinion is , Oracel is Right.(if so then why SQL Server allow this) what about you? Regards, Thanks. Gurpreet S. Gill|||
hi Adam Machanic
I think you dont understand what my statment is:
As example for SQL Server(2005)
TABLE NAME INDEX NAME
--
ABC ABC_IND
DEF ABC_IND
GHI ABC_IND
JKL ABC_IND
SQL Server allow us to have same index name for different table
But in ORACLE
this thing is not possible, the oracle says, if you create an oblect(ABC_IND) its name shold be unique for the whold schema, if i try to create the other index with same name as ABC_IND, this throws an error.( this is right).
As example for ORACLE(10g)
TABLE NAME INDEX NAME
--
ABC ABC_IND
DEF ABC_IND (this throws error,as the name ABC_IND already used)
GHI ABC_IND(this throws error,as the name ABC_IND already used)
JKL ABC_IND(this throws error,as the name ABC_IND already used)
Why did SQL Server allow to do so?
Any comment?
Regards,
Thanks.
Gurpreet S. Gill
|||I thin kthe question should be the other way round: why does Oracle NOT allow indices with the same name on different object? The answer could be that their dictionary and architecture have a different basic/philosphy than SQL Server. An example for those differences might be that you have only one database in one Oracle instance vs. multiple databases in one SQL Server instance.
It looks like that indexes are treated in Oracle as a separate object and not dependent on other objects, but I am not sure.
Ragrds
Norbert
|||Not sure if this is still the case but this discussion extends to teh size of names.
Why does Oracle only allow short names, SQL Server allows really long names like.
create myTableThatHasAVeryLongNameBecauseSQLServerIsBetterThanOracle_SoThere
:)
|||? Yes, I do understand your statement, and I don't agree that Oracle is "right" in this regard. Indexes are not directly queryable or manipulable objects, and are therefore it does not make sense to have them be schema or database-scoped. They are table-scoped, and only make sense in the context of the table on which they're created. Name resolution can, therefore, act at the table level, and uniqueness across tables does not need to be enforced. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Gurpreet Singh Gill@.discussions.microsoft..com> wrote in message news:37f35485-81a0-4f41-beb7-aca9ffe2866c@.discussions.microsoft.com... hi Adam Machanic I think you dont understand what my statment is: As example for SQL Server(2005) TABLE NAME INDEX NAME -- ABC ABC_IND DEF ABC_IND GHI ABC_IND JKL ABC_IND SQL Server allow us to have same index name for different table But in ORACLE this thing is not possible, the oracle says, if you create an oblect(ABC_IND) its name shold be unique for the whold schema, if i try to create the other index with same name as ABC_IND, this throws an error.( this is right). As example for ORACLE(10g) TABLE NAME INDEX NAME -- ABC ABC_IND DEF ABC_IND (this throws error,as the name ABC_IND already used) GHI ABC_IND(this throws error,as the name ABC_IND already used) JKL ABC_IND(this throws error,as the name ABC_IND already used) Why did SQL Server allow to do so? Any comment? Regards, Thanks. Gurpreet S. Gill|||hi thanks to all who send such a nice comments.
i think this is a question of long debate, but i find two nice comments
i) Indexes having scope only at table level(means, no table can have any relation with index which is on other table), so why to have unique name, for whole database.
ii) Oracel having only one database in one Oracle instance vs. multiple databases in one SQL Server instance.
I think due to these comments, in my opinion SQL-Server wins the race.
Any other comments are welcomed.
Regards,
Thanks.
Gurpreet S. Gill
No comments:
Post a Comment