Entity Relationship Modeling (ER modeling) is by far the most common way to express the analytical result of an early stage in the construction of a new database. In this ebook, Alf Pedersen describes the principles for ER modeling, as well as the most important terms used in modeling a new database.
Entity Relationship Modeling - Building Queries (Page 16 of 21 )
Actually, problems with building queries against a relational database are very often an effect of an inadequate (denormalized) database structure. The opposite is also a fact: It is much easier to write optimal queries and updates against a normalized database structure.
The business probably do not know data modeling in detail. That is why they use consultants. However, some basic knowledge is required in order to participate in the analysis phase. You may forward them this free eBook on ‘Entity Relationship Modeling – Principles’ as a primer to understand it. You find it in our Lectures section. If the customer learns the basic principles, he is much better prepared to communicate his business and have a dialogue with the system analyst(s). Here are some common errors in ER modeling.
Failing to understand that the same information is repeated
The business may say: For each customer, we need his business address and his delivery address. That is two addresses. If you model it like this, you are violating the First Normal Form: Repeating attributes/group of attributes.
Ask questions such as:
* Does the customer have more than one delivery address after all?
* Does it ever happen that some customer asks for delivery, not to his address, but to his customer’s address?
* Do customers sometimes refer to a branch address for business or delivery?
This model will let him have as many choices as he may wish. I do not say this is good enough, though.