Re: Utterly confused about set_db and db_Main
[prev]
[thread]
[next]
[Date index for 2004/04/28]
Alexander,
On Wed, 28 Apr 2004, Alexander Gr?fe wrote:
> complete packages. But now, I am trying to built a blogging software
> based on Class::DBI and HTML::Mason. And since the CDBI classes for
> different blogs differ only in the database used, I am looking for a way
> to set the DSN, username and password in httpd.conf via PerlSetEnv, so I
> don't have to copy and edit the whole class stuff for each blog.
>
The question here is one of application system design.
If you make seperate databases per blogger user and rely on the database
to keep them separate then you are potentially looking at a source
of error and confusion if you were to restore from backup. THe table
names are all the same how do you know from looking at the contents
which db you dumped? The schema is the same! If you instead put
an additional table for user information -- including authentication
and authorization information as well as identity -- you can then
tag each tuple with its owner. I would go for one database per application
(or one schema instance per machine I suppose is more accurate since
you could have an applicaiton wich goes across multiple databases
each which might have its own applicaitons as well).
|
|
Re: Utterly confused about set_db and db_Main
Dana Hudes 20:14 on 28 Apr 2004
|