Search Knowledge Base by Keyword

Entity Data Model concept

Here follows a high-level description of the Entity Data Model (EDM): the abstract data model that must be used to describe the data exposed by an OData service.

The main concepts in describing the structure of data in EDM are depicted in Figure 1 and described in the following paragraphs.

Figure 1 – EDM key concepts

The EDM organizes entities into a simple hierarchy. Each entity is part of an entity set (2.1.2), and each entity set belongs to an entity container. Entities, each of which is of some entity type (2.1.1), also have a simple structure: they contain properties, each of which contains data that this entity holds. To describe the data in properties, the EDM defines a variety of data types, such as String, Boolean, Int16, Int32, Binary and DateTime. Special properties –called navigation properties –represent associations and implement connections between entities.

Entity Type

An Entity Type is the fundamental building block for describing the structure of data in the EDM. Entity types represent a specific type of data.

Each Entity Type comprises:

  • a unique name
  • a unique key (for uniquely identifying instances of Entity Types and allowing Entity Type instances to participate in relationships)
  • data in form of Properties
  • Navigation Properties (optional)

Entity Set

EntitySets are collections of instances of EntityTypes. Each instance of an entity within an entity set can be accessed by its unique key.