Oracle ADF associations are business components that define a relationship between two Oracle ADF entity object definitions (the "source" and "destination" entity objects) based on sets of entity attributes (the "source" and "destination" attributes) from each. These can range from simple one-to-many relationships based on foreign keys to complex many-to-many relationships. For example, associations can represent:
To create an association, see Representing Foreign Key Relationships.
Associations map to relationships between single objects in the
datasource. In the vast majority of cases, these are relationships among
tables, views, synonyms, and snapshots in a database. Advanced
programmers can use associations to represent relationships within other
datasources, such as spreadsheets, XML files, or flat text files.
When the datasource is a database, one-to-one and one-to-many associations usually map to foreign key relationships between tables in the database. Although you do not need to actually create a foreign key constraint between tables to create a one-to-one or one-to-many association between the corresponding entity objects, there should at least be an appropriate logical relationship between the tables.
Many-to-many associations are more complex than single foreign key relationships. A single many-to-many association corresponds to two foreign key relationships:
When the datasource is not a database, associations represent the relationships between objects in that datasource, as defined by the programmer.
For more information, see the related topics list.
Because associations are business domain components, you do not need to develop associations around your application's data needs. They should instead be the most logical representation of relationships within your data. If your datasource is well-designed, their structure can be isomorphic to that of the datasource.
JDeveloper will help you both engineer associations from existing foreign key constraints and generate foreign key constraints from associations.
There are two kinds of one-to-many relationships:
You can represent this difference by making associations of the second type into compositions. Making a one-to-many association into a composition has four effects:
For more information, see the related topics list.
About Business Components
About the Business Components Framework
About
Entity Objects
About View Links
About Intersection Tables
Making an Association into a Composition
Copyright © 1997, 2004, Oracle. All rights reserved.