Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Data Dictionary » Subsystem in Different Database Systems
Subsystem in Different Database Systems [message #574] Thu, 25 January 2007 12:26 Go to next message
stephenboey is currently offline  stephenboey
Messages: 54
Registered: January 2007
Member
An interesting thought came into my mind. Users out there are using many different kinds of database systems.

If it is a relational database, then no problems in integrating with Radicore. Is it really possible to have different subsystems sitting on different types of databases?

How do I make Radicore aware of databases sitting in other database systems?

Re: Subsystem in Different Database Systems [message #576 is a reply to message #574] Thu, 25 January 2007 13:03 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
Generally speaking an application has a single DBMS which may contain any number of database schemas, so the whole application is running on either on one (e.g. MySQL) or another (e.g. PostgreSQL or Oracle). It is extremely unusual to find a web application which accesses different DBMS engines at the same time.

That being said it is possible for Radicore to run different applications which use different DBMS engines, but it would require a little extra effort.

In the first place you would require a separate copy of the Data Dictionary for each DBMS. It would not be possible, for example, to import the details of a PostgreSQL database into a MySQL data dictionary.

As there is usually only one DBMS for the entire application its identity is specified as a global variable in the CONFIG.INC file. This means that you can switch the entire application from one DBMS to another by changing a single line of code.

This global variable is referenced in the constructor for each database table class as follows:
$this->dbms_engine = $GLOBALS['dbms'];

If you wish different tables to be served by different DBMS engines then you will have to change this line in the constructor so that it uses a hard-coded value instead of the global variable, as in:
$this->dbms_engine = 'pgsql';

If you are thinking of trying this be aware of the following:
(a) It is not possible to perform JOINs across different DBMS engines.
(b) It is not possible for a database transaction to span different DBMS engines.


Re: Subsystem in Different Database Systems [message #579 is a reply to message #576] Sun, 28 January 2007 16:11 Go to previous messageGo to next message
stephenboey is currently offline  stephenboey
Messages: 54
Registered: January 2007
Member
Thank you for clarifying on the above.

What would be the suggested approach if I wish to make Radicore talk to other existing systems outside of Radicore?
I mean, instead of introducing a subsystem which connects to another database...

Is it possible to use something like XML-RPC? How do I integrate this into Radicore's ACL system/ workflow?
Re: Subsystem in Different Database Systems [message #580 is a reply to message #579] Sun, 28 January 2007 17:31 Go to previous message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
If you want a subsystem written with the benefit of Radicore to communicate with a non-Radicore application then you will have to write that code yourself.

However, it is possible to connect to different databases on different servers at the same time, as documented in http://www.tonymarston.net/php-mysql/infrastructure-faq.html #faq92.


Previous Topic: Icon Support
Next Topic: Importing a Database from Oracle
Goto Forum:
  


Current Time: Thu Oct 31 20:38:19 EDT 2024

Total time taken to generate the page: 0.01640 seconds