Building a data model is an art and a huge responsibility … Don’tt underestimate this stage of software development project.
An Australian researcher named Daniel L Moody says that changes to the database can cost 33 times more than building a correct model.
Don’t just deliver an application, I know you want to go beyond … You want to deliver successful applications and one of the mistakes that prevent you from achieving this goal is not to model your database!
A huge set of lines of code is not the suficinete to have a great application… And knowing that I’m sure you’re going to listen to me and you’ll create a data model before you start coding your application. And you know why it’s so important you create the model? Because the data is the company greatest asset and you as part of the company also have to watch over them, because the most terrible errors for an application are those that do not have a text message … For example, when inconsistent data saved in DB.
This article is the third in a series of four articles, where I want to alert you about 3 mistakes that beginner developers which prevent the creation of great applications. The first error is not choosing the database, the second is not modeling your data. And in this article we’ll talk about the beloved and hated data model.
Data Modeling
Data modeling is an activity that can be performed at various stages of the system process development. Understand the requirements, model the database, choose the database type, create the database and then start coding your application.
The purpose of data modeling is to collect and document information for obtaining data structures that lead us to the database design.
After identifying the objects that are part of the model, its characteristics, its relationships with other objects and its behavior, we can apply one of the techniques of data modeling.
More important than modeling techniques is to understand the concepts of reality being modeled. So if you don’t understand, don’t model!
What is a data model?
It is a graphic and textual representation of the structures and rules that define the data.
You will need to understand the reality that will be modeled. And how do you understand that often you will not get perfect documentation?
Observation – interviews, meetings, questionnaires, analysis of documents allied to the knowledge and experience that you acquire with the time and the challenges of the day;
Understanding the concepts: this is the core of the modeling process! Many developers find it difficult to model the data because they do not understand the concepts correctly. At this stage you must identify, conceptualize (yes my friends! It is indispensable to explain each “piece” of your data model. Don’t trust your memory!), Understand and assimilate the observed object.
Representation of objects: application of modeling techniques. Applying the modeling techniques guarantees the understanding of your model, and aims to simplify its construction.
Check for loyalty and lack: detect faults and anomalies and their causes. Such causes may be due to poorly formed concepts, mistaken points of view, faulty conception, or incorrect application of the representation technique.
Validations: Seek approval for your model. In order for this item to be reached it is necessary the participation of several professionals in the technical area: data architect, database administrators, system architects.
Conceptual model
It is the highest level model, it is a data description independently of the implementation. It records which data is important for the modeled reality, but does not record how this data is stored.
Dani’s advice moment … It doesn’t always have to be so formal at this stage. I advise you to draw your understanding before formalizing the model. Literally scribble, draw, put down your initial understanding. Discuss with the professionals involved. Don’t implement anything if you have a doubts.
Logical model
It is the one where objects, their characteristics and relationships have representation according to the rules and limitations of some type of technique. This representation is independent of the physical storage devices or means of the data structures.
Physical model
It is the one where the representation of objects is made under the focus of the structures implementation in a given database type.
To build this model, you will need the help of the DBA, who is the professional responsible for administering the database.
Conclusion
Building the data model for your application is not a secondary task and should not be seen as such. At this stage you will need to understand and document the observed reality, have contact with many people and have an important input into the creation of your application.
This is just the beginning of our journey, it is important that you have understood:
What is the data model?
Why model the database?
What are the levels of abstraction of the data model?
We will have other posts focused on this subject. I am sure you will acquire more and more knowledge and will create applications more and more incredible!!!
If you liked, share this post! And if do you have any questions talk to me!