Is modeling a database model a good approach for developing a complex and large enterprise application?

We are working on a fancy large service-oriented multi-level application that should be developed from scratch. Now we need to start programming and try to assemble the first bricks.

Question: where to start? Some of them suggest that we should start by developing persistent data models that provide a clearer view. Is this a good approach?

Edit for Suirtimed

There is not much flexible culture here. This is a SOA style project using WCF, SQL Server, Entity Framework (using the POCO generator for domain objects), ASP MVC, and Workflow Foundation. We are a team of 4 developers; quite experienced (but not experts).

+4
source share
4 answers

The broad general approach that I always try to follow is to start with the development of domain models. This is your "ubiquitous language" that will define business objects and concepts, contain business logic (later when you have one) and, as a rule, a common language used in all parts of the system.

The idea is that everyone should be understood (or at least understood). For example, some manager in some other department will not necessarily understand relational databases or anything else about saving his department data. But he understands the business process of his department. Their native language, their concepts, their interactions, etc. The ubiquitous language is a common community shared by groups.

During this process, you must keep your addictions in your mind. The biggest is usually the constancy of the data. There's some kind of golden dream that domain models are persistent or impolite in general, and with the goal of separating issues that are good. However, true ignorance of addiction can paint you in the corner. You may run into serious performance issues or architectural issues that require a lot of redesign later.

So sometimes get distracted by domain modeling to think about persistence (and other external dependencies, such as external services that need to be used, or third-party applications that need to be integrated). When you model the domain, make sure that the model still works properly with everything you need. You may have to slightly compromise the ubiquitous language here and there to take into account the limitations of dependency.

Basically, create a domain model before creating a database. But do not forget about the database during this process.

+6
source

Since the database will be the key element that unites the enterprise application, yes, it is a good idea to start from the beginning again, or at least do it simultaneously with application projects. Do not rely on the application for how the database should be structured. You need to develop data integrity, performance, and security, not object orientation! Start with a database design that is at least in 3rd normal form.

The design of the data model is critical to the performance and integrity of the data. And it's harder to redo later. In addition, for an Enterprise product, you will need some things that are only in the database, such as audit records, which should be developed from the very beginning. You will probably want to know who made the changes to the records, what the change is, and which application it came from. This will help a lot in rollbacks from bad data changes and determining which application caused the problem that caused the bad changes.

+2
source

If you are completely building from scratch, then yes, you have the advantage of deciding what your data will look like.

All I can say is, in my experience, it is useful to get as much of the data / business logic structure developed from the front as possible.

The deeper you get into your application, the harder it will be to rewrite everything if the data needs to change - and the data will change no matter how much you cook, you just need to minimize these changes in front.

I personally would say yes, as much data design as possible. You cannot put a cart before a horse.

+1
source

We usually start with some use cases to initialize some of the objects used to store data. After that, we try to do some modeling of the database and especially look at the relationships between entities.

If there is a basic database model, we will develop a prototype and try to include as many use cases as possible in the prototype.

+1
source

Source: https://habr.com/ru/post/1333682/