Paul Gielens:ThoughtsService

another Endpoint to my thoughts

News

Syndication

Ads


Favorites

Projects

ADO.NET Entity Framework Metadata

Fix the ambiguity! 

Store Schema (SSDL) contains the metadata that describes the schema of your datastore. The central concept in the store schema are entities. Entities are instances of Entity Types (e.g., Product) where an instance represents a single record.

Example:
<EntityType Name="Order" Key="OrderID">

Entities are grouped into an Entity Set (i.e., Orders) where an entity set represents a table.

Example:
<EntitySet Name="Orders" EntityType="Self.Order" />

Conceptual EDM schema (CSDL) contains the metadata that describes the conceptual Entity Data Model (EDM) schema. The central concepts in the EDM are entities and relationships. Entities are instances of Entity Types (e.g., SalesOrder, Customer).

Example:
<EntityType Name="SaleOrder" Key="ID">

Entities are grouped into Entity Sets (i.e., SalesOrders is a set of SaleOrder instances).

Example:
<EntitySet Name="SalesOrders" EntityType="Self.SaleOrder" />

Relationships are instances of Relationship Types which are associations among two or more entity types (e.g, SaleOrder PlacedBy Customer).

Example:
<Association Name="SaleOrder_Customer">

Relationships are grouped in Relationship Sets.

Example:
<AssociationSet Name="SaleOrderCustomer"
               
 Association="Self.SaleOrder_Customer">
  <End Role="SaleOrder" EntitySet="SalesOrders"/>
  <End Role="Customer" EntitySet="Customers" />
</AssociationSet>

Mapping schema (MSL) contains the metadata that describes the mapping between the schema contains in the SDDL file and the conceptual schema contained in the CSDL file. The central concepts in the mapping schema are entity mappings and relationship mappings. Entity mappings are instances of EntityMapping Types. Relationship mappings are instances of AssiciationSetMapping Types. In the mapping schema EDM entity types are mapped against tables and columns in the store schema and EDM relations against foreign key relations.

I hope Microsoft changes the ambiguity between the store schema and EDM schema since they both use the same terminology. A more intuitive approach would be to express these concepts through Entity and Relation types in the store schema and Object and Association types in the EDM. Thoughts?

Posted: Aug 21 2006, 10:05 PM by p.gielens | with 2 comment(s)
Filed under:

Comments

Paul Gielens:ThoughtsService said:

Syntax sugar for Store Schema (SSDL) is a solution for the ambiguity I mentioned in my ADO.NET Entity

# August 22, 2006 2:32 PM

How to Set Up Entity Framework for Npgsql and Dynamic Data projects – Part 1 | Npgsql Blog said:

Pingback from  How to Set Up Entity Framework for Npgsql and Dynamic Data projects &#8211; Part 1  | Npgsql Blog

# November 2, 2009 10:04 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)