MSSQL has a history of confusion about what is "owner" and what is "schema",
and there has been shifting back and forth over the years as they tried to
decide if they wanted to be like Oracle, or like Sybase.

Recently the 2005 version added "real" schemas as well, so a table
identifier can I believe now be a *four*-part entity:
database.schema.owner.table or if you like, it's probably just as correct to
say database.owner.schema.table.

That, I think is getting into overkill-land. If SA can support a three-part
table namespace, then let's decide on a convention that makes sense across
most of the supported databases. To me, that convention seems best to be
"schema", "owner" and "table".

How that then maps to MSSQL is up to the user according to local convention.
Whether you're doing cross-joins against database.schema.table, or
schema.owner.table, who cares -- it's partone.parttwo.partthree. As long as
it's clear that for SA, partone is "schema", parttwo is "owner" and
partthree is "table", you can map as you like.

PS - if you like this, ya shoulda be here for the "metadata" debates a while
back....

On 6/5/07, A Monkey <[EMAIL PROTECTED]> wrote:
>
>
> It would be terrific to be able to satisfy my use case, but is
> "schema.owner.table" the right way to go? It seems as though "schema"
> and "owner" mean similar things in MSSQL and it might be confusing to
> use them as Rick proposed. I guess you'd just have to be pretty clear
> in documentation.
>
> What about the quote_schema attribute on the Table? I was going to
> suggest adding a check of  quote_schema in the
> ANSIIdentifierPreparer.format_table(), but that doesn't seem quite
> right either. Even if the quote_schema default were changed to True
> this would still mean that you would not be quoting some identifiers
> that required it. It would feel kind of like a hack.
>
> I guess the "schema.owner.table" thing is probably best.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to