Can a conceptual model mix different data sources?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
object
Posts: 89
Joined: Tue 26 Oct 2010 08:29

Can a conceptual model mix different data sources?

Post by object » Fri 29 Oct 2010 19:19

Devart supports various database vendors, but can they be mixed withing the same conceptual model? For example:

1. Different entities point to tables from different data sources of the same vendor (e.g. two instances of Oracle data base)

2. A single entity consists of fields that are mapped to different data sources of the same vendor

3. Same as (1), but different vendors (e.g. MS SQL Server and Oracle)

4. Same as (3), but different vendors

Are these scenarios supported?

Thanks in advance

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 01 Nov 2010 13:58

1. Entity Framework allows to have only one connection per context. This condition actually gives a negative answer to your first question.
There is a number of workarounds for this problem, for example, EDM Wizard and Entity Developer are capable of creating a model from several schemas of the same Oracle database, in case the GRANTs are set correctly.
Another way is to create database links in Oracle (actually, it is the only way to work with two instances of an Oracle database).
One more solution is changing the connection in runtime. It is possible, the only problem is the fact that you either clean up the whole context or just use the context in the read-only mode.
2. You can create a view that performs a select from database links in Oracle.
3 and 4 were actually answered above.

However, one has an opportunity to work with one conceptual model and a set of storage models from different vendors. For more information, take a look at this post at our forum.

object
Posts: 89
Joined: Tue 26 Oct 2010 08:29

Post by object » Mon 01 Nov 2010 14:26

Andrey,

Thank you very much for the clarification. Right now it looks like creating a view (p.2) is a relatively simple way to go, however I am interested in knowing more about technique you mentioned earlier: creating a model from several schemas of the same db using Entity Developer. Is this straightforward, do you have an example or description of steps that it involves?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 01 Nov 2010 15:26

If the user you are connecting with has grants to select from other schemas, you can simply add objects from those schemas to the model. Click the Show all objects button to display these schemas.

object
Posts: 89
Joined: Tue 26 Oct 2010 08:29

Post by object » Mon 01 Nov 2010 15:36

Thanks!

Post Reply