public interface ForeignKeyConstraint
FOREIGN KEY (columnName (, columnName)*)
REFERENCES refTableName (refColumnName (, refColumnName)*)
(a particular case of linear tuple-generating dependencies
\forall x (\exists y_1 R_1(x,y_1) \to \exists y_2 R_2(x,y_2))
where x, y_1 and y_2 are *tuples* of variables)
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ForeignKeyConstraint.Builder |
static interface |
ForeignKeyConstraint.Component |
| Modifier and Type | Method and Description |
|---|---|
static ForeignKeyConstraint.Builder |
builder(String name,
DatabaseRelationDefinition relation,
DatabaseRelationDefinition referencedRelation)
creates a FOREIGN KEY builder
|
com.google.common.collect.ImmutableList<ForeignKeyConstraint.Component> |
getComponents()
returns the components of the foreign key constraint
each component defines a map from an attribute of the relation
to an attribute of the referenced relation
|
String |
getName()
returns the name of the foreign key constraint
|
DatabaseRelationDefinition |
getReferencedRelation()
returns referenced database relation
|
DatabaseRelationDefinition |
getRelation()
returns the relation with the foreign key
|
static void |
of(String name,
Attribute attribute,
Attribute referencedAttribute)
creates a single-attribute foreign key
|
static ForeignKeyConstraint.Builder builder(String name, DatabaseRelationDefinition relation, DatabaseRelationDefinition referencedRelation)
name - relation - referencedRelation - static void of(String name, Attribute attribute, Attribute referencedAttribute)
String getName()
com.google.common.collect.ImmutableList<ForeignKeyConstraint.Component> getComponents()
DatabaseRelationDefinition getReferencedRelation()
DatabaseRelationDefinition getRelation()
Copyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.