What are client views in the Entity Framework?

J

Juan Dent

Hi,

In the article Working with Entity Data, the author mentions that the EF
compiles the conceptual and storage schemas and the mappings between them
into bidirectional pairs of Entity SQL statements called client views.

I ask:

what does bidirectional mean in this context? maybe that they define going
from the conceptual level (Entity SQL) to the storage level (SQL) and then
also the other way around (storage to conceptual)?

if this is so, why does it say bidirectional pairs of Entity SQL when this
dialect is only used on one side (the conceptual)?

who are the clients in the phrase 'client views'? My guess is that they are:
1) the data store
2) the applications that use the CLR types representing the entities

Could someone supply some samples?
 
J

Ji Zhou [MSFT]

Hi Juan Dent,

Firstly, I want to ensure that I find the right article we are talking
about, http://msdn.microsoft.com/en-us/library/bb399760.aspx. Please let me
know if it is not what you are referring to.

Based on my understanding, the client-views infrastructure is designed to
manage the transformations between the logical database schema that's
present in the relational store and the conceptual EDM schema used by the
application. For some big applications, we may have many different business
layers, thus we define different entity data models to represent them. But
the data are still stored in the same database. So, we need to figure out
some ways to map the conceptual EDM schema to the database scheme. The
client-views is introduced for this objective. It stores the conceptual
schema, storage schema, as well as their mapping relationships as the
article "Working with Entity Data" says.

1.As to why the articles call the client-views as bidirectional. I think we
can find the answer in the article's image. As a bridge, the client-views
transfer the entity command into the SQL command which database can
understand and execute, while it interprets the returned DBDataReader into
the EntityDataReader which is more convenient for developers to access in
code.

2.Why we call it "client" views? What is the client? The MSDN's explanation
is "ADO.NET client-views work entirely on the client, so each application
developer can create views that adapt the data to a shape that makes sense
for each particular application without affecting the actual database or
other applications. The class of updatable views supported in the Entity
Framework is much broader than those supported by any relational store." I
quote the above statement from this MSDN document
http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx#ado.netenfrmovw
_topic5 which you may be interested in. And I highly recommend you to read
about the first section of this article to understand better about the
client views. So, in my opinion, the client in this context should mean the
client environment on which the end user runs the application.

Please let me know if you have future questions on this.


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top