DbView         Database visualization






Soft foreign key versus hard foreign key

DbView distinguishes between two kinds of foreign key: soft and hard foreign keys.
Soft foreign keys

Typically, you use soft foreign keys with database systems that don't support foreign key constraints. For exemple : MySql with MyIsam engine.

With this kind of database, you usually use a simple naming convention to declare foreign keys.

For example, the field "fk_product_id" is, by convention associated to the field "id" of the table "product". Plase note that you can use a different naming convention, such as "foreign_key_product_id".

There is no constraint defined in the database. The only way to recognise a foreign key is by looking at its name.

Please note that you need to inform DbView about the naming convention for foreign key detection. That why DbView introduces the concept of "soft foreign key detector".

Exemple (MySql): Please note the use of the MYISAM engine.
 

Hard foreign keys
A hard foreign key is declared as a constraint in the table's definition.
Exemple (MySql): Please note the use of the INNODB engine.