From: Diez B. Roggisch <deets@we...> - 2008-05-21 15:00:09
I've got something I'd like to discuss with a broader audience.
My company *might* adopt SO for it's ORM-needs (if they actually agree on
there being a need...)
Now one thing we use here extensively in the postgres is schemas. I personally
don't care too much, but then they are a namespace-feature - which is a good
thing(tm), if you read
Now - the question is if & if yes how we would could go at implementing these.
- create an attribute on sqlmeta, defaulting to None
- whenever it is not None, prepend the schema-name to the table-name
- on databases that support schemas (postgres so far), do so with a . (dot)
- on all others, user _ (underscore)
Thus a declaration of an object could look like this:
schema = "tg"
display_name = ...
As you can already see - it's something frameworks as e.g. TurboGears could
benefit from, as they currently rely on self-created namespaces by naming
Additionally, one could think of adding some option that would enforce the _
as separator for all DBs, regardless of their support for schemas or not.
And of course adding schema support would mean that the create and drop
commands would have to take that into consideration - at least the create
should also create the schema.
There are also some subtleties regarding relations - however, these eventually
boil down to consistency & potentially new keywords.
Get latest updates about Open Source Projects, Conferences and News.