DB tables naming

DB tables naming

by Wolfgang Schneider -
Number of replies: 8
Hi,
is it possible to have a prefix attached to the tables automatically installed by moodle? there are other applications which also use tables names such as "config", for example and then conflicts happen, tables can't be installed etc ...
which scripts will need changes so that the tables used by moodle will be something like "moodle_config", "moodle_...." ?
Average of ratings: -
In reply to Wolfgang Schneider

Re: DB tables naming

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Sorry, Wolfgang, such a change would require quite a lot of work (for very little benefit). It may happen if there's a lot of demand, but I think you're the first person to mention it.

Out of interest, what is the cost to you to create one new database on your database server?

(As an aside, I noticed Claroline requires a new database FOR EACH NEW COURSE! surprise )
In reply to Martin Dougiamas

Re: DB tables naming

by Wolfgang Schneider -
Hi Martin
>Sorry, Wolfgang, such a change would require quite a lot of work (for very
>little benefit). It may happen if there's a lot of demand, but I think you're the
> first person to mention it.

hmn ... I just happened to have an installation "drop" a "config" and a "user" table that had been installed by another application (quite some time ago, and I had not thought of this anymore ...)with my backup, it was no problem to get the tables back, but I can't install moodle at the moment

>Out of interest, what is the cost to you to create one new database on your
> database server?

Well, the cost is $200 for a technician at my ISP to install an additional mySQL database server for just my domain ... and then I don't know how much he'd up the monthly webhosting charges ...

WIth some of the larger ISPs in Germany, in their webhosting packages, the difference is this:
The package I currently have (which includes one mySQL database) goes for about $25 / month ... the packages which allow multiple databases are "dedicated servers" etc where you then do everything yourself and have access to a server etc.m and those begin at about $69/month ....

>(As an aside, I noticed Claroline requires a new database FOR EACH NEW
> COURSE! surprise )

I know .... and the above is the reason why I have not been able to install their application to test it ... and fixing it up for a one db operation is also a headache and more ... smile
In reply to Wolfgang Schneider

Re: DB tables naming

by Jacob Romeyn -
I host my site at modwest.com  who only charges $14.95 month and only $1.00 for each additional database and no setup charge.
In reply to Martin Dougiamas

Re: DB tables naming

by John Windmueller -

Um, well, I'd like to see this feature too shy.gif

Both of my net providers have a set amount of sql databases I'm allowed to have--only one with one isp, 5 with the other.  The added cost is $10 for each additional database on one of the providers, and the other doesn't list any pricing information on getting additional databases. 

The table prefix to allow multiple programs to share the same database comes in handy.  I have about 5 totally seperate phpbb message forums running that all nicely share just one database because I can have each of the scripts set to use a different table prefix and cookie name on the user end of things. 

If its a ton of work, I can understand not making this a big priority.  But yes, I do think it would be a helpful feature for those of us stuck with webhosts that limit or charge costs based on the # of databases. 

John

In reply to John Windmueller

Re: DB tables naming

by Wolfgang Schneider -
The "ton of work" may be there once, but the ton of headaches is certainly there for others more than once smile
In reply to Martin Dougiamas

Re: DB tables naming

by Giacomo Fabbrocino -
Clarolinbe is too large a beast if you run a small website. Moodle should consider this table prefix stuff in order to suit smaller sites needs. In my opinion if it worked with safe mode it would be great! A very light e-learninfg app is being developed by Italians at http://www.spaghettilearning.com/
In reply to Wolfgang Schneider

Re: DB tables naming

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Table prefixes have now been implemented. smile They are working fine for me using the CVS version, and will be 1.0.8 (due in about a week).
In reply to Martin Dougiamas

Re: DB tables naming

by Valerie Lynn -
I realize my (this) post is almost 2 years after yours, but I wanted to tell you that this thread answered my question! And Thank You! for keeping the thread here! I needed to know whether a table prefix would be added prior to taking that great leap of faith with my one database.