# Term relation and Primary-Foreign key in Define Relation

**URL:** <https://forum.servoy.com/t/term-relation-and-primary-foreign-key-in-define-relation/5220>\
**Category:** Classic Servoy\
**Created:** [December 18, 2005, 12:33pm UTC](https://forum.servoy.com/t/term-relation-and-primary-foreign-key-in-define-relation/5220 "2005-12-18T12:33:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Huber](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Robert\_Huber](https://forum.servoy.com/u/Robert_Huber)\
**Post date:** [December 18, 2005, 12:33pm UTC](https://forum.servoy.com/t/term-relation-and-primary-foreign-key-in-define-relation/5220/1 "2005-12-18T12:33:57Z")

</div>

Hello All

I am wondering for some time now about two naming things in Servoy, may be someone can enlighten me a little bit:

- Why is a relation not called relationship? The term relation is used for a subquantity of a cartesian product? So a relation for me is something different than a relationship.

- The Define Relation window says on the the left column Primary key, and on the right column Foreign key. But when I define a relationship from the m-side table to the 1-side table, the Foreign key is in the left column (labelled Primary key) and the primary key is in the right column (labelled Foreign key), to me this is quite confusing. For an example to see what I mean look at the solution crm, relationship contacts\_to\_companies from table contacts to table companies.

Best regards, Robert

---

<div class="post-metadata">

**Author:** ![MerMer](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@MerMer](https://forum.servoy.com/u/MerMer)\
**Post date:** [December 20, 2005, 2:05am UTC](https://forum.servoy.com/t/term-relation-and-primary-foreign-key-in-define-relation/5220/2 "2005-12-20T02:05:13Z")

</div>

Robert,

I also found it confusing, particularly as I am new to Servoy and database programming in general.

The answer I was given to a similar question is in the following thread.

> **[Relationships in Servoy - PK and FK use](https://forum.servoy.com/viewtopic.php?t=5365&highlight=)**
>
> When creating a one-to-many relationship I thought that standard practice was that you join up the PK in the parent table with the FK in the child table. However, in Servoy I am seeing instances where the FK in a table is being described as the PK...

MerMer
