In the context of SAP HANA and Core Data Services (CDS), static dependencies refer to the relationships between entities or elements that are defined at design time and remain constant during runtime. These dependencies are established explicitly in the CDS data definition language and are not determined dynamically based on data at runtime.
Let's break down the concept further:
Entity Dependencies:
In CDS, you define entities that represent data structures or views. Static dependencies between entities indicate relationships or associations between them. For example, a sales order entity might have a static dependency on a customer entity, indicating that it refers to customer data.
Association and Composition:
Associations and compositions are two types of relationships that can create static dependencies between entities.
Association: Represents a relationship between two entities where instances of one entity are associated with instances of another entity. It is established using the association keyword.
Composition: Represents a stronger relationship than association, indicating that the child entity is part of the parent entity. It is established using the composition keyword.
Referencing Elements:
Static dependencies can also exist at the level of individual elements within an entity. For example, a foreign key column referencing another entity creates a static dependency on that entity.
Static dependencies are evaluated during the design and compilation phase of the CDS artifacts and are not influenced by data content at runtime. They contribute to a clearer and more structured definition of data models within the SAP HANA database, supporting better design and understanding of the relationships between entities.