1
marionline
Different database for each modules
  • 2010/1/6 17:52

  • marionline

  • Just popping in

  • Posts: 5

  • Since: 2010/1/6 1


Hy, I'm new, I'm Italian so excuse me for my bad english...

I have got this question:
Is it possible to store data of one module in a different MySQL database than the database use from XOOPS core?

For example I have XOOPS 2.4.3, I have installed newbb module to create a forum, can I store all data of newbb (or another module) in a second database?

I think 2 solutions:
1) hack the module,
2) try to use MySQL Engine MERGE, but I don't think is the best solution...

Have you got any ideas?

Thank you

2
mariane
Re: Different database for each modules
  • 2010/1/6 18:43

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


hello Mario, I understand the following :
- you need to export the current database of a module to use it in the same module but in another website?

avete bisogno di esportare il database corrente di un modulo da utilizzare nel modulo stesso, ma in un altro sito web?

3
xsell
Re: Different database for each modules
  • 2010/1/6 19:26

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Short Answer " No you Can not Do that "

But it is Not impossible .. From my View it will be Very Hard .and even if it work u will have truble here and there . as each Module will Have to connect to the Mainfile.php .

4
marionline
Re: Different database for each modules
  • 2010/1/6 23:20

  • marionline

  • Just popping in

  • Posts: 5

  • Since: 2010/1/6 1


Thank you for your replay.

@ mariane
No, I work with only one website.
I can create different MySQL databases on my server. I want store data of a module in a different database, so for example I have two database, the first contain table and data of XOOPS "core" and varius modules, the second database store data of only one module (in my previous example newbb).

@xsell
I suppose that...to overwrite the problem to hack modules or write php code I think that:
Quote:

2) try to use MySQL Engine MERGE

but I don't know really much these tecnology...
Can't I order to MySql to save all data that are insert in one table (with a generic query) in another table present on a different database?

I hope you can understand me...

5
dbman
Re: Different database for each modules
  • 2010/1/6 23:33

  • dbman

  • Friend of XOOPS

  • Posts: 172

  • Since: 2005/4/28


Not sure what your rationale is with this approach. You can do this using the federated engine without hacking modules and XOOPS core.

http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html.


6
ghia
Re: Different database for each modules
  • 2010/1/7 0:30

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Not sure what your rationale is with this approach.
Me neither!
And I'm wondering where did you get the idea for the need to have it separated and what do you think to gain with this needless complication?

7
marionline
Re: Different database for each modules
  • 2010/1/7 9:18

  • marionline

  • Just popping in

  • Posts: 5

  • Since: 2010/1/6 1


@dbman
Wow, it can solve my question...
but:
Quote:

Not sure what your rationale is with this approach.


@ghia
I have got a big database, my provider gives me a limit to my database but I can use another database with the same limit (for example 100Mb per databases, I can have 2 databases = 200Mb, but not only one database with 200Mb ok?)
Some time I have got slow query execution or db connection faild because I have too much users connect at the same time.
So I think to use two or more database, this give me these benefits:
- not too multiple access at the same time with different query at one database, the access or load are distributed to multiple databases; (but this benefit is not real with federated engine isn't?);
- more order in database, not only one database with a hundred of tables but two or more databases with a few tables to mantain.

Is it stupid?
Are there other solutions?

8
ghia
Re: Different database for each modules
  • 2010/1/7 9:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What did you do to have such a big database?
Analyse the size of your tables with phpMyAdmin.

The load is only distributed, if the databases are also placed on another server.
By placing some tables on another database only some queries are diverted eg if they belong to a module, then it is only the case when the user is visiting that module.

9
marionline
Re: Different database for each modules
  • 2010/1/7 10:23

  • marionline

  • Just popping in

  • Posts: 5

  • Since: 2010/1/6 1


Quote:

What did you do to have such a big database?
Analyse the size of your tables with phpMyAdmin.

Newbb forum and other module...I have just analyze and optimize tables...

Quote:

The load is only distributed, if the databases are also placed on another server.

I think this is not a problem, my provider have a cluster of server in theory.

Quote:

By placing some tables on another database only some queries are diverted eg if they belong to a module, then it is only the case when the user is visiting that module.

Yes, the real problem is that just one or two module "block" the access to the database and take up space limit.

10
ghia
Re: Different database for each modules
  • 2010/1/7 18:48

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Check also if all your postings are for real and not eg SPAM.
Educate also your posters to post clear and to the point. I see sometimes fora, where entire listings and loggings are copied inline, where only one or two lines are relevant.

Login

Who's Online

294 user(s) are online (221 user(s) are browsing Support Forums)


Members: 0


Guests: 294


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits