multiple-databases

good way to query many databases in ASP.NET

What I'm trying to do is run the same SQL select on many Oracle databases (at least a dozen), and display the output in a Gridview. I've hacked together something that works but unfortunately it's very slow. I think its exacerbated by the fact that at least 1 of the dozen databases will invariably be unreachable or otherwise in an erro...

Are heterogeneous database systems in practice?

Hi, I was probing around a bit in the realm of databases and hit the notion of having heterogeneous databases. I googled and found this - link text My question is what kind of scenario would put this into practice and is it really useful? Is it just another thing which was thought about but not implemented or in case it was implemented...

(Ruby,Rails) Dynamically connecting a model to databases in a running app...?

Hi All, I've read many of the existing questions/threads on this subject, but keep in mind that none of them have directly addressed my issue. Also keep in mind that this is NOT a situation for database.yml as I won't know the DB info in advance. That said, I need a solution for DYNAMICALLY connecting to multiple databases in a Rails ...

Postgresql PITR backup: best practices to handle multiple databases?

Hy guys, i have a postgresql 8.3 server with many database. Actually, im planning to backup those db with a script that will store all the backup in a folder with the same name of the db, for example: /mypath/backup/my_database1/ /mypath/backup/my_database2/ /mypath/backup/foo_database/ Every day i make 1 dump each 2 hours, overwriti...

Multiple database connection in Rails

I'm using active_delegate for multiple connection in Rails. Here I'm using mysql as master_database for some models,and postgresql for some other models. Problem is that when I try to access the mysql models, I'm getting the error below! Stack trace shows that, it is still using the postgresql adapter to access my mysql models! Runtime...

Multiple Mappers for the same class in different databases

I am currently working on a Wikipedia API which means that we have a database for each language we want to use. The structure of each database is identical, they only differ in their language. The only place where this information is stored is in the name of the database. When starting with one language the straight forward approach to ...

What is the best way to support multiple databases for a .Net product?

Hi, We are designing a product which could support multiple databases. We are doing something like this currently so that our code supports MSSQL as well as MySQL. namespace Handlers { public class BaseHandler { protected string connectionString; protected string providerName; protected BaseHandler() ...

performance of parameterized queries for different db's

A lot of people know that it is important to use parameterized queries to prevent sql injection attacks. Parameterized queries are also much faster in sqlite and oracle when doing online transaction processing because the query optimizer doesn't have to reparse every parameterized sql statement before executing. I've seen sqlite becomi...

multiple db connections vs. centralized/redundant db

I have a project to create a dashboard that will connect to existing systems as well as create new features based on combining data from the existing systems. For example, the dashboard will be able to generate "orders" containing data merged from "members" (MS Access DB), "employees" (MySQL DB) and "products" (flat file), and there wil...

Handling Multiple databases with NHibernate in a single application

At the moment I define the connection properties in a configuration file and only ever connect to one database. I'd like to be able to at some point have a user login, figure out (via a seperate central database maybe) what database they should be connected and from that point on all sessions created will talk to that database. Whats th...

Delegate pattern for Rails remote database?

I am working on a Rails application that requires roles-based permissions (let's call it the "Hidden" application), but the application will not be handling user authentication. The Main application sets an encrypted cookie and the Hidden application uses that as evidence of authentication. The Hidden application needs to implement a v...

How to connect to multiple databases in a single PHP page?

Possible Duplicate: How do you connect to multiple MySQL databases on a single webpage? If I want to connect to one db do some query, and then later do another query from another DB. How do I do it? Do I just mysql_pconnect("host:3306", "user", "password") or die(mysql_error()); mysql_select_db("Test") or die(mysql_error());...

Hibernate on Oracle AND SQLServer

I'm introducing a DAO layer in our application currently working on SQL Server because I need to port it to Oracle. I'd like to use Hibernate and write a factory (or use dependency injection) to pick the correct DAOs according to the deployment configuration. What are the best practices in this case? Should I have two packages with dif...

Subsonic 2.2 InnerJoin Across Two Databases

Can anyone provide an example of how to join across two schemas using subsonic 2.2. This doesn't work: SqlQuery qu = new Select("*") .From(NorthwindLeads.Lead.Schema) .InnerJoin(Northwind.StatsMap.SourceIdColumn, NorthwindLeads.Lead.SourceIdColumn); ...

Multiple websites running on same codebase?

Hi, We are developing an application that would be offered as a hosted solution. I am struck with understanding how can i use multiple sites with same code without duplicating base code. eg: website 1: www.example.com and website 2: www.sample.com will run on same code, but would have different configuration settings, and different them...

multiple database relationship on field other than primary key in CakePHP

I have a project that necessarily spans several databases. One database has tables: CREATE TABLE device { device_uid integer unsigned not null primary key auto_increment, os varchar(50), name varchar(50) } CREATE TABLE platform { platform_id integer unsigned not null primary key auto_increment, name varchar(50) } The oth...

Distributed Databases: Calculating page-shipping cost

Hi, I'm looking to know how to calculate shipping cost for sending pages to remote sites of a distributed database. The explanation I have is: "Tuples are shipped in units of one page by waiting for a page to be filled before sending a message from processor i to processor j" If it helps, each processor have 100 buffer pages of 4000 b...

Django and multiple databases

My current Django setup uses MySQL as the main database to store models. Now for my project I need to connect to a remote PostgreSQL database and retrieve data from it. Is it possible to do this by using built-in Django and Python features or I will need to use library such as Psycopg2? It would be great for me, if I will be able to use...

JPA Multiple Persistence Unit bug

Hi folks, I'm trying to add one more database/schema/persistenceUnit in my project and I'm receiving the error: No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but found 2 I google/api allot and could not found why spring is complaining about my configuration. Here is part of my appl...

How to configure transaction management for working with 2 different db in Spring?

I have 2 databases (MySql and HSQLDB). I configured 2 data sources and 2 EntityManagerFactory beans. I can also configure 2 correspondent JpaTransactionManager beans. But I don't know how to specify which of them should be used to manage transactions for concrete service-class. I want to use @Transactional annotation for that purpose, ...