Questions tagged [multiple-databases]

631 questions
12
votes
10 answers

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

We are designing a product which could support multiple databases. We are doing something like this currently so that our code supports MS SQL as well as MySQL: namespace Handlers { public class BaseHandler { protected string…
Kalpak
  • 3,510
  • 4
  • 22
  • 21
11
votes
1 answer

Dynamic JPA Connection

I have a fairly standard Java EE6 web application using JPA 2 with dependency injection connecting to a MySQL database and everything is working fine. What I would like to do now is have this application interact with the databases of other…
wobblycogs
  • 4,083
  • 7
  • 37
  • 48
11
votes
1 answer

Spring Data JPA: Repositories for multiple database / Entitymanger configurations

I have two Entitymanager bean configurations. Each pointing to a separate database with a different schema (one is Oracle, the other one is an in-memory H2) What could I do to solve the ambiguity of what Entitymanager should be used for each…
simou
  • 2,467
  • 4
  • 30
  • 39
11
votes
1 answer

CoreData with multiple stores: configuration woes

I have an iOS project with a large, preloaded database and a small user database (both CoreData SQLite stores). Previous questions have suggested using configurations to control which Entities are used with which store. I'm having trouble getting…
Aneel
  • 1,403
  • 1
  • 17
  • 22
10
votes
4 answers

.NET migrations: Setup and migrate multiple databases at runtime

Brief introduction: I have this ASP.NET Webforms site with the particularity that it doesn't have only 1 database, it has many. Why? Because you can create new "instances" of the site on-the-fly. Every "instance" share the same codebase, but has its…
empz
  • 11,509
  • 16
  • 65
  • 106
10
votes
2 answers

symfony2 - using multiple connections in a repository or class

I have multiple connections and I have a repository class. I would like the repository class to have access to the multiple connections. Its for a report that requires fetching data from multiple database hosts. config.yml doctrine: dbal: …
Robbo_UK
  • 11,351
  • 25
  • 81
  • 117
9
votes
2 answers

Multiple Databases in play framework

I'm trying to establish a second database connection to another database on another server. We're using play framework 1.2.4 and I found the following documentation for…
n4cer
  • 155
  • 2
  • 8
9
votes
2 answers

EJB3 - using 2 persistence units within a transaction (Exception: Local transaction already has 1 non-XA Resource)

I am trying to use 2 persistence units within the same transaction in a Java EE application deployed on Glassfish. The 2 persistence units are defined in persistence.xml, as follows:
9
votes
4 answers

CodeIgniter: Multiple Databases - Accessing database config in a second database

I've been looking into using multiple databases with CodeIgniter. If I know what the databases are ahead of time, then I can set the information in the config file and then call whichever database group I need. In my situation, however, I need to…
spacemunkee
  • 216
  • 1
  • 2
  • 8
9
votes
1 answer

multi-tenant database architecture

I am building a SAAS application and we are discussing about one database per client vs shared databases. I have read a lot, incluisve some topics here at SO but I have still many doubts. Our plataform should be highly customizable by each client.…
8
votes
5 answers

Migrating multiple databases using doctrine2 with Symfony2

I have 2 databases db1 and db2 in symfony2 + doctrine2 and both databases are different from each other in terms of tables and their fields. I need to work on migration. Things work fine as long as there is one database. But it does not works when…
Ajinder Singh
  • 89
  • 1
  • 3
8
votes
1 answer

Join tables in two databases using SQLAlchemy

I am working with two MySQL Databases. I want to join a table from DB 1 with a table from DB2 in SQLAlchemy. I am using automap_base while creating data access layer in sqlalchemy as follows... class DBHandleBase(object): def __init__(self,…
Atul K.
  • 352
  • 1
  • 6
  • 16
8
votes
1 answer

Managing multiple databases with NHibernate and Autofac

I thought I'd get this question out there while I noodled on a solution on my own. After having built out the bulk of an application, I have a last minute requirement to support reading/writing to an additional database (2 total, no known others). …
nkirkes
  • 2,635
  • 2
  • 21
  • 36
8
votes
3 answers

BigQuery - combine tables

I have monthly Data in BigQuery but I want to create a yearly database, meaning combine the 12 subdatabase to 1. How can it be done? The structure is identical for all 12 databases in form: Date, Name, Amount, Value, Type_of_Good I thought JOIN…
Ilja
  • 611
  • 3
  • 9
  • 19
8
votes
3 answers

EF Code First Migration with Multiple Database / DbContext

I have two database each with their own dbcontext. I've setup two migration configurations. I can add a migration for the first db ust fine (Add-Migration DB1_InitialCreate -ConfigurationTypeName DB1Configuration). When I try to create an initial…
1
2
3
41 42