different databases in a single project

Posts   
 
    
jovball
User
Posts: 443
Joined: 23-Jan-2005
# Posted on: 31-Jan-2012 19:44:19   

I am working with an application that has currently has one database (DB2) that contains business data and another database (MSSQL) contains application data (for example, user authentication, profiles and roles).

Can I use a single LLBLGen project (3.1 adapter) for both backends? What would be a good approach for working with something like this?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 01-Feb-2012 00:45:08   

You can add multiple target databases from various database types in LLBLGen. However this feature was created to those people that have the same schema in both databases and want to switch at runtime between them.

So if you add two databases (say one from SQLServer and one from Oracle) and map entities from each one, then if you validate the project it will complain because there are mappings missing, this is: there are entities in SQLServer that are mapped to tables in SQLServer but they are not mapped to Oracle and viceversa. So this mean that if you want to pass it you have to map the missing entities/fields to the other database type.

The recommended template set for this is Adaper, if you plan to use LLBLGen Pro Runtime as the target OR/M framework. You will end up with one DBGeneric project with all entities and two DatabaseSpecific projects (one for each database type). In your scenario you won't gain much merging those in one project I think. So, if it's not completely necessary work them in separate LLLBGen projects.

David Elizondo | LLBLGen Support Team