✏️ Explanatory Question

Difference between Normal Relation and Foreign Key Relation

👁 17 Views
📘 Detailed Answer
🟢 Easy
No previous question
No next question
💡

Answer with Explanation

Feature Normal Relation Foreign Key Relation
Database Constraint ❌ No ✅ Yes (SQL foreign key)
Defined By Relation node manually EDT ReferenceTable or ForeignKeyRelation
Lookup Support ✅ Yes ✅ Yes
Referential Integrity ❌ No ✅ Enforced
Impact on Database Design Only metadata (AOT level) Physical SQL schema enforced
Suitable For UI-level lookups, loose relations Strong referential data model

🔹 1. Normal Relation

A normal relation is a manually defined relationship between two tables, without enforcing referential integrity at the database level.

✅ Key Features:

  • Defined using Relations node in the table.

  • Does NOT create a foreign key constraint in the SQL database.

  • Relationship exists only in the AOT (Application Object Tree).

  • Used mainly for lookups, joins, and navigation in forms and queries.

🔹 2. Foreign Key Relation

A foreign key relation automatically enforces referential integrity at the SQL database level and creates actual foreign key constraints.

✅ Key Features:

  • Defined using Extended Data Types (EDTs) with ReferenceTable property or via the ForeignKeyRelation property directly.

  • Automatically creates a foreign key constraint in the SQL Server database.

  • Enables cascading actions (delete, update) and improves data integrity.

  • Automatically provides lookups and table references in forms.

No previous question
No next question