# Making a Datamodel

**URL:** <https://www.dynamicsuser.net/t/making-a-datamodel/5608>\
**Category:** Developers Forum\
**Created:** [January 3, 2002, 1:50pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608 "2002-01-03T13:50:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://www.dynamicsuser.net/u/maarten)\
**Post date:** [January 3, 2002, 1:50pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/1 "2002-01-03T13:50:21Z")

</div>

I want to make a visual datamodel for documentation purposes. A model that has tables, fields, field types and relations between fields (something like Access). So, I am looking for a easy way to do this. It doesn’t have to be a fancy tool, but a quick way to generate a visual model of some custom made tables. This subject probably has been discussed before, but I’d like to know if anyone has had any solutions for this typical Navision problem.

---

<div class="post-metadata">

**Author:** ![FormerMember](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@FormerMember](https://www.dynamicsuser.net/u/FormerMember)\
**Post date:** [January 3, 2002, 4:06pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/2 "2002-01-03T16:06:23Z")

</div>

We have used the Visio 2002 Reverse Engineer function on a Navi-SQL database. You can prepare model diagrams and listings but you don’t get the ERD stuff with visual links between table keys, etc. Lloyd Freiday Open Door Technology Calgary, AB, Canada

---

<div class="post-metadata">

**Author:** ![Jens\_Rainer](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@Jens\_Rainer](https://www.dynamicsuser.net/u/Jens_Rainer)\
**Post date:** [January 6, 2002, 12:40pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/3 "2002-01-06T12:40:27Z")

</div>

Navision has announced a feature in the next version of Attain (3.10) to document the table relations in the SQL Option. The relations can be read and used by for example external reporting tools but they are not enforced by the SQL Server. The Enterprise Manager contains a nice tool for displaying the table relations as diagrams.

---

<div class="post-metadata">

**Author:** ![robertc](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@robertc](https://www.dynamicsuser.net/u/robertc)\
**Post date:** [January 7, 2002, 8:43am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/4 "2002-01-07T08:43:13Z")

</div>

The feature you mention can also be used nicely by the Visio Reverse Engineering diagramer, including the relationships (the standard SQL Server ODBC or OLEDB data source is used).

---

<div class="post-metadata">

**Author:** ![maarten](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@maarten](https://www.dynamicsuser.net/u/maarten)\
**Post date:** [January 7, 2002, 10:17pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/5 "2002-01-07T22:17:38Z")

</div>

Jens, I don’t have any experience with the combination of Navision and SQL. The databases I work with are Navision. Do you mean I can see the diagrams in MS SQL, or do I have to wait for the next version (3.10). Robert, do you use Vision to make the datamodel and import this into SQL or into Navision. I heard that Navision on a SQL database has all business rules still in the objects in Navision and the tables in SQL are independent/loose tables only, without any table relations. Is this not true? Can I use Visio get a datamodel out of an existing Navision or SQL atabase?

---

<div class="post-metadata">

**Author:** ![robertc](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@robertc](https://www.dynamicsuser.net/u/robertc)\
**Post date:** [January 8, 2002, 7:22am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/6 "2002-01-08T07:22:38Z")

</div>

The feature Jens is talking about, for Attain version 3.10, allows the creation of foreign key constraints, which are disabled but visible, in SQL Server for the TableRelation properties in Attain (i.e. those relations that are valid in SQL). Visio etc can then see these constraints and diagram them, as it would with an Access or other SQL datasource. They are not used for referential integrity or cascaded deletes/updates. The business logic is still handled by Attain as usual - there is no desire to turn all A/L programmers into T-SQL programmers.

---

<div class="post-metadata">

**Author:** ![brians](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@brians](https://www.dynamicsuser.net/u/brians)\
**Post date:** [January 8, 2002, 12:38pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/7 "2002-01-08T12:38:52Z")

</div>

If you need something quick 🙂 , create a codeunit in navision that reads thru the ‘Fields’ system table,creates a access database & tables using automation(DAO). Using automation you can build link b/w tables using the ‘RelationTableNo’ column in the ‘Fields’ table. Ideal solution would be is to allow the user to select relevant tables in navision and it automatically starts up Visio, creates a diagram with relations (again using the Fields table). Visio has components that you can use for automation. Edited by - brians on 2002 Aug 06 03:28:14

---

<div class="post-metadata">

**Author:** ![brians](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@brians](https://www.dynamicsuser.net/u/brians)\
**Post date:** [January 8, 2002, 12:42pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/8 "2002-01-08T12:42:41Z")

</div>

forgot to mention, both solutions i mentioned will be one direction only. You cannot make table changes in Access/Visio and update Navision automatically.

---

<div class="post-metadata">

**Author:** ![rchurchillqpr](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rchurchillqpr](https://www.dynamicsuser.net/u/rchurchillqpr)\
**Post date:** [February 27, 2002, 11:05am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/9 "2002-02-27T11:05:42Z")

</div>

HI, Has there been any advances made using the Jason Prickett Visio Data Modeler from [www.mynavision.net](http://www.mynavision.net). It really looks so promising then if you start to use more tables it becomes a little messy. If anybody can or has taken his idea further please let us know. Thanks

---

<div class="post-metadata">

**Author:** ![Nikolai](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@Nikolai](https://www.dynamicsuser.net/u/Nikolai)\
**Post date:** [August 5, 2002, 6:21am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/10 "2002-08-05T06:21:26Z")

</div>

Has anyone used the Attain 3.10 feature mentioned above? Could you tell me how. Alternatively does anyone know how to reference a Table Relation that has Conditions in it? e.g. Sales Line.No. - the Field table does not hold this.

---

<div class="post-metadata">

**Author:** ![robertc](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@robertc](https://www.dynamicsuser.net/u/robertc)\
**Post date:** [August 5, 2002, 9:07am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/11 "2002-08-05T09:07:04Z")

</div>

The 3.10 feature to create SQL Server foreign key constraints (relationships) from Attain table relations is enabled in the File/Database/Create and Alter window in the Integration tab. You can then build models from the relationships using Enterprise Manager, Visio or other tools able to read this meta data from the database.

---

<div class="post-metadata">

**Author:** ![stryk](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@stryk](https://www.dynamicsuser.net/u/stryk)\
**Post date:** [August 5, 2002, 9:39am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/12 "2002-08-05T09:39:46Z")

</div>

If you have a **impuls Workbench** running, you can also “visualize” certain object-relations … Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP

---

<div class="post-metadata">

**Author:** ![admin1](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/admin1/32/7476_2.png) [@admin1](https://www.dynamicsuser.net/u/admin1)\
**Post date:** [August 6, 2002, 7:25am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/13 "2002-08-06T07:25:08Z")

</div>

Impuls Workbench is no longer supported - but replaced by Navision Attain Developers Toolkit (that basically just is an updated version of IW). **Best regards, _Erik P. Ernst_, webmaster**

---

<div class="post-metadata">

**Author:** ![gco](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gco](https://www.dynamicsuser.net/u/gco)\
**Post date:** [August 6, 2002, 7:47am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/14 "2002-08-06T07:47:01Z")

</div>

As some already pointed out, when you can get your native database on SQL Server you can make a visual (access like) model from the enterprise manager using a diagram wizard.

---

<div class="post-metadata">

**Author:** ![Nikolai](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@Nikolai](https://www.dynamicsuser.net/u/Nikolai)\
**Post date:** [August 6, 2002, 10:02pm UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/15 "2002-08-06T22:02:10Z")

</div>

Ok so I have loaded up the SQL relations and am making a SQL diagram - but it seems to be missing some of the relationships. These always seem to be ones where there is either an IF condition or a WHERE condition on the Table-Relation. Any suggestions? Will I have to manually add these relationships? (Would this affect Navision?)

---

<div class="post-metadata">

**Author:** ![gco](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gco](https://www.dynamicsuser.net/u/gco)\
**Post date:** [August 7, 2002, 7:07am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/16 "2002-08-07T07:07:20Z")

</div>

> quote:
> 
> * * *
> 
> **Originally posted by wlgnles** : Ok so I have loaded up the SQL relations and am making a SQL diagram - but it seems to be missing some of the relationships. These always seem to be ones where there is either an IF condition or a WHERE condition on the Table-Relation. Any suggestions? Will I have to manually add these relationships? (Would this affect Navision?)
> 
> * * *

Probably because native SQL does not know conditional relationship if I’m correct. So the diagram is not showing it.

---

<div class="post-metadata">

**Author:** ![robertc](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@robertc](https://www.dynamicsuser.net/u/robertc)\
**Post date:** [August 7, 2002, 10:31am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/17 "2002-08-07T10:31:49Z")

</div>

SQL Server foreign keys constraints are fixed and cannot contain where conditions with a relationship. For IF TableRelations in Attain, all the relations are created as separate constraints in SQL Server, so these are possible.

---

<div class="post-metadata">

**Author:** ![NaviTools.com](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@NaviTools.com](https://www.dynamicsuser.net/u/NaviTools.com)\
**Post date:** [November 18, 2004, 9:48am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/18 "2004-11-18T09:48:17Z")

</div>

Hi, I managed to create E/R model for Microsoft Navision 🙂 Go to [http://www.NaviTools.com](http://www.NaviTools.com) I hope you find it useful.

---

<div class="post-metadata">

**Author:** ![zachavas](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@zachavas](https://www.dynamicsuser.net/u/zachavas)\
**Post date:** [November 18, 2004, 9:57am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/19 "2004-11-18T09:57:06Z")

</div>

Take a look at the following link… [http://www.mibuso.com/dlinfo.asp?FileID=152](http://www.mibuso.com/dlinfo.asp?FileID=152) There you will find a Visio Data modeller specific for Navision [:D]

---

<div class="post-metadata">

**Author:** ![NaviTools.com](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@NaviTools.com](https://www.dynamicsuser.net/u/NaviTools.com)\
**Post date:** [November 18, 2004, 10:10am UTC](https://www.dynamicsuser.net/t/making-a-datamodel/5608/20 "2004-11-18T10:10:02Z")

</div>

Hi, Jason’s report creates a very useful diagram. You only have to layout tables and you are done (there are 808 tables in Navision 4.0 [:o]). As posted in other posts this report doesn’t include table relations where IFs are used. I’ve managed to include these too. However Jason gave me an idea how to create ER diagram for Navision and I’ll be always grateful for this. It would be great if Jason and his colleagues from MS Visio department would get together and develop a Visio Add-In for Navision?

[Next page](https://www.dynamicsuser.net/t/making-a-datamodel/5608.md?page=2)
