Home > Importers, Presentation > CodeFluent Entities Importer: Deducing Relationships

CodeFluent Entities Importer: Deducing Relationships

Last week we hosted a live webcast – which by the way was recorded and is available here – and following it we had several questions regarding the demo where we created a model from the Northwind database, and especially on how the tool deduced the relationships between entities.

The CodeFluent Entities importer detects foreign keys and transforms them into model relations, so we’re sorry to disappoint so many of you but there is absolutely no magic here!

The importer in fact relies on a database abstraction layer that presents a common interface for all supported databases or modeling systems that can be imported.

Here is a screenshot demonstrating how this intermediary abstraction layer « sees » an « old » Northwind Access Database, prior being imported, in a tool we call « Model and Database Explorer ».


Here you see two foreign keys that will be transformed into relations between entities if this database is imported as a model.

Now, back to magic! Even if there are no foreign keys on tables, the importer is truly capable of casting some voodoo spells Smile

There is a parameter to the importer which is highlighted here:


When this parameter is set to true (the default value), the importer will try to determine automatically relations using column names. For example, say you have two tables like these:


  + CustomerId

  + Name


  + OrderId

  + Reference

  + CustomerId

If no foreign key is declared, the importer will « guess » if this is a 1:M or 0:M relation.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s