Articles tagged with "self-join"

Coding a self-join in a cake application

By rene
This tutorial shows how to code your model, controller and views in case of a self join.
A self-join is a query in which a table is joined (compared) to itself. Self-joins are used to compare values in a column with other values in the same column or another column in the same table.
A self join is neccasarry when a database table has has a column that references its own table, for example the table parts has a column that references the table itself (parent-id -> table-id; a part exists of sub-parts).
[Read more]