DB schemas

22 views
Skip to first unread message

kaare

unread,
May 24, 2011, 6:00:40 AM5/24/11
to DBIx::Skinny
Hi

Just stumbled upon DBIx::Skinny / Teng and I've got some questions.
Please bear with me if they are not appropriate for Teng or have been
touched before.

I use PostgreSQL - and I use database schemas a lot. In PostgreSQL
(and Oracle, AFAIK) there's one default schema, but you can create as
many schemas you'd like. Tables and other entities are prefixed with
schema name if they aren't in the search_path. So a full table name
inside a database is <schema>,<table>

Teng views the database definition as two separate parts, Model and
Schema. I compare Model to the database and Schema to the schema(s).
So AFAICS it would be rather easy for Teng to support multiple
database schemas in a database. It would require

1. Model.
Allow multiple Teng::Schema classes
Teng Model should have some way of registering the schemas. Default
as it is today,
2. Schema
Tell which database schema to use
3. Something I've overlooked
4. Teng::Schema::Dumper should take a db_schema argument

I'll see if I can find time to write code to show what I mean.

atsushi kobayashi

unread,
May 24, 2011, 9:03:06 PM5/24/11
to dbix-...@googlegroups.com
Hi kaare.

When you summarize your idea,
Do you want to treat two or more database schema by one Teng instance?

now Teng(and DBIx::Skinny) support one database schema.
if you want to treat some database schema, create some Teng instance
each database schema.

It is possible to take it if there is a simple code.

Is my understanding to your opinion correct?

sorry my poor English.

thank you.


2011/5/24 kaare <rasmuss...@gmail.com>:

--
Atsushi Kobayashi

Reply all
Reply to author
Forward
0 new messages