Introduction
Before you start your work and get your hands dirty in database designing, it is very important to gather the complete requirements of the system. Because when you’re developing something from the start, it is easy to design it according to the system requirement. But it would be difficult to change the things in the existing system.
So if you’ve already made some of your database parts and then you notice that something is remaining which it was not clear before then would be so difficult to change the things in the existing system. There are 2 information sources out there.
- People (interviews)
- Documentation (Problem Statement)
So, different stakeholders are part of the People category. Managers, requirement engineer gather the requirements from the customers by conducting meetings, interviews, and many approaches out there to gather the live requirement of the system. And documentation is the written requirements bundle and here we conclude all the things which we need to implement.
Data and Fact Types
People who design databases sometimes forget what all is about. Data Model (Database Design) is not all about in entity types, attributes, relationships, tables, columns but all of these are just tools. For the end-users, the content of any database is a collection of facts. I’ve found a few things we need to do to create a good data model and it would be a lot of easier if we occasionally return to the level of those facts.
Data Model determines 2 things
- What type of facts (data) database can store?
- What are the constraints we need to apply to those facts?
What Type of Facts to Store?
Finding the right set of facts to store is very important. If the database is unable to store information that the end-user needs to do their work, the application is worthless. End-user either will not use it or start using creative ways to work around the limitations. So we need to make sure about the data and what data type we can use to store this data in our database because data is the most prior thing. If we’re successful to store the data into the database then obviously we’ve created the tables and now we can make them normalize or we can apply different relationships upon the tables very easily.
Constraints
Constraints are also important. Constraints are the rules or restrictions which we apply on the data like
- Valid data (Data Pattern Mach or Not)
- Valid Range of Data
- Duplication
- Consistent with other data
How to create a Data Model?
First of all, we need to make our problem statement or mission statement more clear. Most of the time it is just general, contains a broad overview. It doesn’t have a detailed discussion on the things. This document usually is not complete.
The 2nd source of information is the interviews. Most Data Modelers schedules interviews with Management and with Designated Subject Matter Experts either to get the general overview of the application to build or to clarify the questions that come from processing earlier interviews or the mission statements. The benefit of these interviews is the management and subject level experts, these people are usually comfortable discussing data design at the abstraction layer of the data model. And the downside is they are too far away from the everyday reality to really know exactly what is happening on the workflow.
3rd source of information is the end-user. The problem with the end-user is that they are not always able to think and discuss the abstraction layer of a data model. So, we just ask the simple questions which they can understand very easily. And here we use very simple examples for the better understandability of the things for the end-user.
And after clear requirement gathering, we create our data model. And there is no additional information needed to start. And then we develop the design of the database and start developing it.
Analyzing the Requirement Document
When you’ve to create a data model for a new application, there often already is a documented outline of how the new application will look. Those documents can have different names and here we’re using the name ‘Requirement Document or Mission Statement’ for that document.
To read a mission statement (requirement document)
- Use Highlighters of Various Colors to assign each sentence or even part of the sentence in the document for data modeling purposes.
- Fact Types (Green)
- Constraints (Red)
- Concrete Examples (Blue)
- Other (Yellow)
And if your role is more than the data modeler than obviously, you may have more things to mention in the document and you can use different colors for it.
- For better understandability of the requirement document, we use concrete examples when needed. And we verify these examples from the Subject Matter Experts if the text is giving the right interpretation of the text or not.
- In the first reading just read the complete document thoroughly from the start to end. And in the 2
nd turn, use highlighters to highlight the important points.
So, this is the approach to how we read our requirement document.
If there is no required document?
Now, might be there is no required document given to you then you might think in that case how will you make your requirements complete. In that case, here we have got the tool of the mindmap. Take a look at my article to know how to start the project.
Interviews
Interviews are an essential part of data modeling unless you’re creating a data model for purely personal use. You conduct the interviews and you can use the mind mapping approach to make your requirement complete.
You’ve to verify with the people about your understanding of the system. Use concrete and simple examples while you’re talking with the end-user to get the requirements because he can’t understand the logical terms and things of your level. Assumptions are always dangerous. The things which are not clear to you in interviews, you can ask from subject matter experts. This approach can save your lot of time and effort.
Use their jargon, notation forms, language during communication. Avoid our jargon like entity types, relationships, attributes, cardinality, constraints, etc.
Creating the Initial ER Model
So here we’ll create the first version of the Entity-Relationship Model. So we’re ready to create an Entity Relationship Diagram (ERD).
- We first classify similar facts and different kinds of facts and finalize different fact types.
- Then we’ll use the collection of fact types to identify what entity types we need in the diagram.
- Each of those entity types will have an identifying fact type that may or may not already be in your collection.
- Each of those entity types will have an identifying fact type that may or may not already be in your collection.
- Draw the ERD
- We first put the entity types in the diagram.
- We add their attributes.
- And their relationships.
- Some fact types are not represented as normal entity types, attributes, or relationships. To represent them, we need to introduce extra Artificial Entity Types.
Generalizing Fact Types
We’ve discussed how to gather data from various information sources. You should now know exactly what facts need to be stored and you should have a lot of information about constraints that tell you what combination of the facts is invalid. Ideally, you should also have examples to illustrate how facts are represented by the end-user. And some examples of invalid fact combinations to illustrate the constraints.
Before we can use this information to draw the first data model, we must move away from the level of individual concrete facts to the more abstract level of collections of similar facts called fact types. So instead of discussing the individual facts,

So we can describe all members of this class of facts with templates. And in this template, members and dates are placeholders. Indicates the instances of these fact types’ occurrences of the collection of all members and from the collection of all dates should be inserted at these places.
Now, let’s take a look on another example,







Muthu KumarPosted Oct 1, 2018, 12:40 AM
Nice Article. Thanks for sharing..