what is a child table ?

  • Thread starter Thread starter Yoramo
  • Start date Start date
Y

Yoramo

Hello

I'm trieing to use the DataColumn.Expresion and in the documentation I see
"Child Table" what is it?

yoramo
 
Hi,

Child table is a table related to master table via DataRelation. Maybe a
simple example will explain it:
If you have customers and orders tables then technically speaking orders is
a child table of customers (supposing that between exists a DataRelation)
within DataSet of course.
 
does a 'Foreign Key' define this relation?


Miha Markic said:
Hi,

Child table is a table related to master table via DataRelation. Maybe a
simple example will explain it:
If you have customers and orders tables then technically speaking orders is
a child table of customers (supposing that between exists a DataRelation)
within DataSet of course.
 
Hi,

Yoramo said:
does a 'Foreign Key' define this relation?

Foreign key defines the column(s) used at child table for the relation - it
is a part of the relation
 
Yoramo said:
does a 'Foreign Key' define this relation?
The foreign key resides in the child table as the link to the parent table.
Taking Miha's example a step further, if the primary key in the Customers
table is CustomerID, then CustomerID will also exist in the Orders table as
a non-unique foreign key. The CustomerID field in the Orders table allows
each order to be linked to a customer. Because it is non-unique, multiple
orders can be stored for any customer.
 
Back
Top