Zum Hauptinhalt springen
Nicht aus der Schweiz? Besuchen Sie lehmanns.de
OData Protocol in Depth -  Richard Johnson

OData Protocol in Depth (eBook)

Definitive Reference for Developers and Engineers
eBook Download: EPUB
2025 | 1. Auflage
250 Seiten
HiTeX Press (Verlag)
978-0-00-106447-8 (ISBN)
Systemvoraussetzungen
8,45 inkl. MwSt
(CHF 8,25)
Der eBook-Verkauf erfolgt durch die Lehmanns Media GmbH (Berlin) zum Preis in Euro inkl. MwSt.
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

'OData Protocol in Depth'
'OData Protocol in Depth' offers a comprehensive exploration of the Open Data Protocol (OData), meticulously dissecting its architectural principles, design philosophy, and evolutionary path as an OASIS standard. The book opens with a thorough analysis of OData's RESTful foundations, guiding readers through its motivations, interoperability goals, and the distinct conventions that set it apart from other prominent data access protocols like GraphQL, gRPC, and SOAP. Clear explanations of protocol versioning, compatibility, and the structure of service roots and entity models provide a robust foundation for understanding how OData services are conceptualized and deployed in real-world scenarios.
The heart of this volume delves deeply into the nuances of the Entity Data Model (EDM) and the mechanisms behind metadata representation, emphasizing the pivotal role of Common Schema Definition Language (CSDL) and comprehensive strategies for querying, manipulating, and evolving service metadata. Readers are equipped with advanced querying tactics-including URI conventions, filters, projections, expansions, and server-side custom functions-supported by rigorous discussions on validation, security, and performance optimization. Special attention is given to efficient CRUD operations, batching, concurrency management, and business rule enforcement, providing essential guidance for building reliable and scalable OData APIs.
Further chapters elevate the discussion to extensibility, security, and integration, addressing custom actions and functions, authentication and authorization frameworks, and regulatory compliance requirements. The book illustrates OData's fit within modern application ecosystems, covering resilient client integration patterns, interoperability with analytics tools, adoption in microservices and hybrid cloud architectures, and strategies for lifecycle, governance, and monetization. 'OData Protocol in Depth' is an indispensable reference for solution architects, API developers, and technical leaders aspiring to design robust, secure, and future-proof data APIs using OData.

Chapter 2
Entity Data Model (EDM) and Metadata Representation


Beneath every OData service lies a rich, explicit metadata model: the Entity Data Model (EDM). Understanding this model unlocks the true power of OData—enabling not just seamless integration, but also advanced querying, discoverability, and intelligent tooling. This chapter demystifies how OData describes, exposes, and evolves its data landscape, revealing the mechanics that make dynamic, interoperable services possible.

2.1 Core Types and Entity Relationships


At the foundation of the Entity Data Model (EDM) lie three fundamental categories of properties: primitive, complex, and navigation. Together, these types form the essential building blocks for representing data, defining entities, and expressing the intricate relationships within a domain. Understanding their distinctions and interplay is critical for establishing precise data models that ensure consistent typing, which in turn advances robust interoperability and predictability in APIs.

Primitive properties correspond to the simplest form of data elements. They are the indivisible data types that hold actual values such as integers, strings, or dates. These types map closely to common programming language types, enabling seamless serialization and deserialization in APIs. Examples include Edm.String, Edm.Int32, Edm.Boolean, and Edm.DateTimeOffset.

Formally, a primitive property is declared with an explicit EDM primitive type and optionally constrained by facets such as MaxLength, Precision, Scale, or Unicode. For instance, a property representing a person’s last name might be defined as:

<Property Name="LastName" Type="Edm.String" MaxLength="50" Unicode="false" Nullable="false"/>

The explicit typing of primitive properties enforces data integrity by ensuring values conform to expected formats and sizes. This precision prevents errors during data exchange and aids client applications in input validation.

Complex properties enrich the model by aggregating multiple related primitive or other complex properties under a single named type. Unlike entities, complex types are non-keyed and always exist within the context of containing entities or other complex types. They serve to group logically related data that does not require a unique identity but benefits from structural composition, facilitating clearer, more manageable schemas.

For example, an Address complex type might be defined as:

<ComplexType Name="Address">
<Property Name="Street" Type="Edm.String" Nullable="false"/>
<Property Name="City" Type="Edm.String" Nullable="false"/>
<Property Name="PostalCode" Type="Edm.String" MaxLength="10"/>
<Property Name="Country" Type="Edm.String" Nullable="false"/>
</ComplexType>

An entity can then embed the Address as a complex property:

<EntityType Name="Customer">
<Key>
<PropertyRef Name="CustomerID"/>
</Key>
<Property Name="CustomerID" Type="Edm.Int32" Nullable="false"/>
<Property Name="Name" Type="Edm.String" Nullable="false"/>
<Property Name="BillingAddress" Type="Namespace.Address" Nullable="false"/>
</EntityType>

By nesting complex types within entities, models achieve modularity and avoid redundancy. Complex types also enable fine-grained control of nullability and compositional semantics in API contracts. Unlike collections or navigation properties, complex properties do not establish relationships to other entities, thereby maintaining a contained data scope.

Navigation properties codify the links between entities, representing associations, be they one-to-one, one-to-many, or many-to-many. These properties provide vital contextual references that enable navigation across the graph of interconnected entities within the model.

Each navigation property is paired with a corresponding entity set that represents the target collection or singleton entities linked through this relationship. For example, a Customer entity might have a navigation property to its related Orders as:

<NavigationProperty Name="Orders" Type="Collection(Namespace.Order)" Partner="Customer"/>

The Partner attribute specifies the counterpart navigation from Order back to Customer, maintaining bi-directional consistency in the relationship mappings:

<NavigationProperty Name="Customer" Type="Namespace.Customer" Partner="Orders"/>

Navigation properties rely on foreign key constraints at the storage or protocol level but abstract these details away in the EDM. They define multiplicity semantics (0..1, 1, *), critical for representing cardinality and optionality in relationships. For instance, defining an optional one-to-many relationship is crucial for API clients to understand if linked entities can be absent or if collections might be empty.

Entities themselves are defined as collections of typed properties, including keys, and represent uniquely identifiable concepts in the domain. The Key element is mandatory in entity definitions and enumerates the subset of primitive properties whose values uniquely identify each instance. This uniqueness facilitates identity resolution essential for concurrency control, caching, and querying.

For example:

<EntityType Name="Order">
<Key>
<PropertyRef Name="OrderID"/>
</Key>
<Property Name="OrderID" Type="Edm.Guid" Nullable="false"/>
<Property Name="OrderDate" Type="Edm.DateTimeOffset" Nullable="false"/>
<NavigationProperty Name="Customer" Type="Namespace.Customer" Partner="Orders"/>
</EntityType>

The distinction between entity keys and non-key properties concentrates the model’s focus on identity management. While complex and primitive properties provide the state of an entity, keys ensure stable references and integrity within the database, API surface, and client-side operations.

Uniform typing is paramount across all property categories to secure precise schema contracts that form the backbone of interoperability. Inconsistencies or ambiguities in type definitions lead to fragile integrations, runtime errors, or data loss. Considerations for consistent typing include:

  • Type Compatibility: All consumers must agree on property types. Using well-known EDM primitive types or explicitly defined complex types reduces guesswork and erroneous parsing.
  • Nullability: Clear specification of whether properties are nullable or mandatory impacts deserialization logic and client validation.
  • Multiplicity and Collections: Proper declaration of navigation property multiplicities aids consumers in iterating collections and handling missing links without ambiguity.
  • Facets and Annotations: Declarative facets such as MaxLength, Precision, and ConcurrencyMode inform tooling on how to enforce constraints, improving data alignment.

The EDM’s strongly typed nature elevates model reliability, enabling tooling to perform static analysis, generate client proxies, and optimize queries. Strong typing also allows APIs to communicate failing preconditions through status codes rather than ambiguous exceptions, both improving developer experience and runtime stability.

Entity relationships articulated by navigation properties depend on underlying referential constraints to...

Erscheint lt. Verlag 3.6.2025
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
ISBN-10 0-00-106447-9 / 0001064479
ISBN-13 978-0-00-106447-8 / 9780001064478
Informationen gemäß Produktsicherheitsverordnung (GPSR)
Haben Sie eine Frage zum Produkt?
EPUBEPUB (Adobe DRM)
Größe: 696 KB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Apps programmieren für macOS, iOS, watchOS und tvOS

von Thomas Sillmann

eBook Download (2025)
Carl Hanser Verlag GmbH & Co. KG
CHF 40,95
Apps programmieren für macOS, iOS, watchOS und tvOS

von Thomas Sillmann

eBook Download (2025)
Carl Hanser Verlag GmbH & Co. KG
CHF 40,95