Table Relations in Ax -2012
Table level mainly 4
Types of relations there.
1). Normal Relation.
2). Field Fixed Relation.
3). Related Field Fixed Relation.
4). Foreign Key relation.
1.
primary Key Based
2. Single Field
Alternative Key Base.
1). Normal Relation:
To specify the
Relation field without any condition.
2). Field Fixed Relation:
To specify the
Relation fields to restrict the Record in the Parent or base table.
3). Related Field Fixed
Relation:
To specify the
Relation fields to restrict the Record in the related table.
4). Foreign Key
Relation:
To specify the
Relation fields to EDT.
Note: if we want give Field Fixed and Related
Field Fixed Relation Base Enum is mandatory.
Examples:
1). Normal Relation:
Normal Relation:
I have taken 2 tables.
1. Na_Class Table
2. Na_Student table
The parent table (Na_Class Table) data is:
Then I did give Normal relation on Child Table (Na_Student
table)
Data
Displayed in below Fig and show all
Records.
Here using
Normal Relation.
3). Related Field Fixed
Relation:
Here I am
using Related Field fixed Relation. And
I have Restrict only first class Student id.
Note: Here Base Enum Is
placed on Parent Table(Na_ClassTable).
Here first I
gave normal relation and then give Related Field Fixed Relation.
Then We got First Class Filter records.
2). Field Fixed Relation:
Here I Have Taken 4 Table. That is 3 parent tables and One
Child Table.
1.Na_EEE_Table.
2.Na_ECE_Table.
3.Na_CSE_table.
4.Na_collegeTable---Child Table.
Note:
Here Base Enum Is Placed on Child table(Na_CollegeTable).
Here full fill the Records on base tables.
Here I gave a relation in Childtable(Na_CollegeTable).
We got a filter records from parent tables.
4). Foreign Key
Relation:
Foreign key
nothing but if we want to Create Relationship between parent table to child
table through Record id then we will give foreign key relation.
Foreign key Relation has been unique id relations.
Means Surrogate Key (or) Primary Key Index based relation.
Foreign key Relation has two types:
1.Primary
Key based.
2.Single
field Alternative key based.
Primary Key based:
I Have Taken 2 tables:
1.
Nar_ForeignKey.
2.
Nar_ForeignKeyChildTable.
I
gave a primary key based Foreign Key Relation in Nar_ForeignKeyChildTable .
Once Gave a Primary Key Based foreign key Relations It’s Automatically
added Int64 filed in Child Table with Parent Table Name.
And Then Automatically added relation with Parent Table
Record Id.
After Gave a Relations. Go to child table open the table
check Primary key base foreign key relation.
Single field
Alternative key based:
I Have Taken 2 tables:
1.
Nar_ForeignKey.
2.
Nar_ForeignKeyChildTable.
I
gave a single filed Alternative key based Foreign Key Relation in Nar_ForeignKeyChildTable.
Once Gave a single field Alternative Key Based foreign key
Relations It’s Automatically added string filed in Child Table with Parent
Table Name.
And Then Automatically added relation with Parent Table Primary
Key Id
After Gave a Relations. Go to child table open the table
check single field Alternative key base foreign key relation.
No comments:
Post a Comment