NAV Relational database or not?

viriato
Member Posts: 105
One issue I'd like to put up for discussion, is NAV a trully relational database? Do primary keys really represent their tables? What about normalization?
Thanks.
Thanks.
0
Comments
-
Yes NAV is built on a relational database, both in its proprietary database system as well as on SQL Server. You could argue the extent in which certain areas are normalized, but I don't think the fact that it is in fact a relational database is up for any discussion. The primary key of every table in NAV uniquely identifies its records, if that is what you are asking.0
-
Thanks Denster, I tought so, it's a relational database but if we take for example the "Customer" table, it doesn't seem very normalized. I think this table could be broken down a little more, for example city will end up repeating itself over and over again, don't you agree?
Thanks again.0 -
What's your point? Is City not an attribute of the Customer entity in your opinion? Where does it get repeated over and over again? How would you "break it down further"?0
-
Some data in NAV are "repeated" to allow users quickly and easily filter on the data.Because if the field is in another table that you are on, you cannot filter on it. It means e.g. if there will be only post code on the customer, you cannot filter the customers on city and you need first find all post codes for the city and than filter on these codes. It is user un-friendly.
It means, priority is quick filtering and data processing, not some theoretical normalization form.0 -
I feel that it is so to ease the reporting part of the product, as end user is authorised to create reports.Thanks,
Ritesh K Singh0 -
kine wrote:It means, priority is quick filtering and data processing, not some theoretical normalization form.
It's just not practical to completely normalize a database. You'd have so many more tables for very obscure reasons, and at some point it becomes too much to deal with. Addresses are basically looked at as a single attributes, and therefore you put all address fields as attributes of other entities. Sometimes, like for Ship-to Addresses, they are stored in separate tables, but still there you wouldn't have a link to a 'City' table.
Actually, there is a Post Code table that has some of that information, but that relationship is not strictly enforced.0 -
Thanks guys. Maybe it's my impression but i felt some of you felt somehow attacked by this post, which I didn't mean in any way, I was sure there was a reason for doing things like they this.
Thank once again.
Cheers.0 -
-
kine wrote:Some data in NAV are "repeated" to allow users quickly and easily filter on the data.Because if the field is in another table that you are on, you cannot filter on it. It means e.g. if there will be only post code on the customer, you cannot filter the customers on city and you need first find all post codes for the city and than filter on these codes. It is user un-friendly.
It means, priority is quick filtering and data processing, not some theoretical normalization form.
There is yet annother aspect concerning relational issues in NAV. You may have noticed already, but you can delete a Post Code record from the "Post Code" table, though this post code may be used by some customers. There is no "default" security mechanism in NAV which could prevent you from "breaking" relations in this way. The only possibility would be, to put some code into the OnDelete trigger of the "Post Code" table... - on the other hand, because of the fact, that the City is a true field in the customer table, the deletion of the "Post Code" record is not too tragical...New kits on the blog: https://massivedynamicsblog.wordpress.com0 -
Thanks Denster. I just wanted to have that clear
. I'm quite new to NAV (been developing in other environments the last years) so I might post some strange posts from time to time. Thanks again.
Thanks gerdhuebner. The city name was just an example, it was exactly about data consistency i was refering too0 -
Neither the manner in which constraints are enforced, nor the extent in which the data that it contains is normalized, determines whether a database is relational is not. What makes a database relational is having the ability to define relationships between entities within the database.
Having a Description field in the BOM tables is simply there to provide the user with a place to enter any description, without dictating what exactly that description ought to be. It simply defaults to the description of the entity that is selected in there, but it is ultimately up to the user what to type in there, without affecting the description of the entity itself. The same thing applies to prices. The price on the order is the final price, you should be able to modify that per order, without affecting the price of the entity that the order is linked to itself. These fields default in by way of the validation code in the tables, NOT because of their relationship. The relationship is limited to the foreign key into the other table.
You can call having these fields in multiple places redundant, which it might be depending on your motivation, but it always serves a very definite functional purpose. In itself it does not change the fact that the database is relational.0 -
DenSter wrote:...You can call having these fields in multiple places redundant, which it might be depending on your motivation,...
On the other hand the "normalization-degree" of a relational database is clearly defined independently of the companies, which are using the database, and is merely based on the data structures and their constraints (relations, etc.) (see http://en.wikipedia.org/wiki/Database_normalization, e.g.). And with respect to normalization it can clearly be stated that the NAV standard application is not fully normalized, but I wonder whether there exists a fully normalized database in productive environments, at all...New kits on the blog: https://massivedynamicsblog.wordpress.com0 -
gerdhuebner wrote:a whole bunch of stuff
The degree in which the NAV database is normalized depends on functional requirements. Just because there is a description field in both the Item table and the Sales Line table, does not necessarily mean that it is redundant. It only means that it is redundant, if your functional requirement is that those two descriptions must ALWAYS have the same values. Only in that case would you not add a description field to the sales line table. Another reason why it would be in there is performance. It is much faster to read the description from the sales line when you're already in there, than it is to get the descriptions from the item table, the resource table, the G/L Account table, etcetera.
You could make a case that the description field needs to be removed from the sales line table in favor of a linked field to the other tables, but then you would not be able to modify the description on the sales line, which is a functional requirement in standard NAV. The functional requirement causes the field to not be redundant. In reality 99% of the time it will store the same values though, so I understand that there's a case for it.0 -
Filtering, Sorting, History - it is why it is as it is... :-D
History is why the data are copied and not only referred (address on posed invoice must be still same even if the address on the customer was already changed...).
Filtering is, why the data are directly in the tables (filtering on calculated fields is not good...)
Sorting cannot be done without the data directly in the records...
And we cannot use something like joins... ;-)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions